/*
 * Globalize
 *
 * http://github.com/jquery/globalize
 *
 * Copyright Software Freedom Conservancy, Inc.
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 */
(function(i,f){var q,v,k,w,o,u,t,s,l,a,j,x,p,m,r,y,n,h,g,c,e,d,b;q=function(z){return new q.prototype.init(z)};if(typeof require!=="undefined"&&typeof exports!=="undefined"&&typeof module!=="undefined"){module.exports=q}else{i.Globalize=q}q.cultures={};q.prototype={constructor:q,init:function(z){this.cultures=q.cultures;this.cultureSelector=z;return this}};q.prototype.init.prototype=q.prototype;q.cultures["default"]={name:"en",englishName:"English",nativeName:"English",isRTL:false,language:"en",numberFormat:{pattern:["-n"],decimals:2,",":",",".":".",groupSizes:[3],"+":"+","-":"-",percent:{pattern:["-n %","n %"],decimals:2,groupSizes:[3],",":",",".":".",symbol:"%"},currency:{pattern:["($n)","$n"],decimals:2,groupSizes:[3],",":",",".":".",symbol:"$"}},calendars:{standard:{name:"Gregorian_USEnglish","/":"/",":":":",firstDay:0,days:{names:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],namesAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],namesShort:["Su","Mo","Tu","We","Th","Fr","Sa"]},months:{names:["January","February","March","April","May","June","July","August","September","October","November","December",""],namesAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",""]},AM:["AM","am","AM"],PM:["PM","pm","PM"],eras:[{name:"A.D.",start:null,offset:0}],twoDigitYearMax:2099,patterns:{d:"M/d/yyyy",D:"dddd, MMMM dd, yyyy",t:"h:mm tt",T:"h:mm:ss tt",f:"dddd, MMMM dd, yyyy h:mm tt",F:"dddd, MMMM dd, yyyy h:mm:ss tt",M:"MMMM dd",Y:"yyyy MMMM",S:"yyyy\u0027-\u0027MM\u0027-\u0027dd\u0027T\u0027HH\u0027:\u0027mm\u0027:\u0027ss"}}},messages:{}};q.cultures["default"].calendar=q.cultures["default"].calendars.standard;q.cultures.en=q.cultures["default"];q.cultureSelector="en";v=/^0x[a-f0-9]+$/i;k=/^[+-]?infinity$/i;w=/^[+-]?\d*\.?\d*(e[+-]?\d+)?$/;o=/^\s+|\s+$/g;u=function(C,B){if(C.indexOf){return C.indexOf(B)}for(var z=0,A=C.length;z<A;z++){if(C[z]===B){return z}}return -1};t=function(A,z){return A.substr(A.length-z.length)===z};s=function(H){var I,B,z,A,F,G,E=arguments[0]||{},D=1,C=arguments.length,H=false;if(typeof E==="boolean"){H=E;E=arguments[1]||{};D=2}if(typeof E!=="object"&&!a(E)){E={}}for(;D<C;D++){if((I=arguments[D])!=null){for(B in I){z=E[B];A=I[B];if(E===A){continue}if(H&&A&&(j(A)||(F=l(A)))){if(F){F=false;G=z&&l(z)?z:[]}else{G=z&&j(z)?z:{}}E[B]=s(H,G,A)}else{if(A!==f){E[B]=A}}}}}return E};l=Array.isArray||function(z){return Object.prototype.toString.call(z)==="[object Array]"};a=function(z){return Object.prototype.toString.call(z)==="[object Function]"};j=function(z){return Object.prototype.toString.call(z)==="[object Object]"};x=function(A,z){return A.indexOf(z)===0};p=function(z){return(z+"").replace(o,"")};m=function(C,A,B){var z;for(z=C.length;z<A;z+=1){C=(B?("0"+C):(C+"0"))}return C};r=function(C,z){var B=0,E=false;for(var D=0,A=C.length;D<A;D++){var F=C.charAt(D);switch(F){case"'":if(E){z.push("'")}else{B++}E=false;break;case"\\":if(E){z.push("\\")}E=!E;break;default:z.push(F);E=false;break}}return B};y=function(D,C){C=C||"F";var B,A=D.patterns,z=C.length;if(z===1){B=A[C];if(!B){throw"Invalid date format string '"+C+"'."}C=B}else{if(z===2&&C.charAt(0)==="%"){C=C.charAt(1)}}return C};n=function(T,X,Y){var L=Y.calendar,H=L.convert;if(!X||!X.length||X==="i"){var aa;if(Y&&Y.name.length){if(H){aa=n(T,L.patterns.F,Y)}else{var I=new Date(T.getTime()),P=c(T,L.eras);I.setFullYear(e(T,L,P));aa=I.toLocaleString()}}else{aa=T.toString()}return aa}var U=L.eras,A=X==="s";X=y(L,X);aa=[];var E,V=["0","00","000"],J,K,z=/([^d]|^)(d|dd)([^d]|$)/g,Z=0,Q=g(),B;function G(ab,ae){var ad,ac=ab+"";if(ae>1&&ac.length<ae){ad=(V[ae-2]+ac);return ad.substr(ad.length-ae,ae)}else{ad=ac}return ad}function W(){if(J||K){return J}J=z.test(X);K=true;return J}function C(ac,ab){if(B){return B[ab]}switch(ab){case 0:return ac.getFullYear();case 1:return ac.getMonth();case 2:return ac.getDate()}}if(!A&&H){B=H.fromGregorian(T)}for(;;){var F=Q.lastIndex,O=Q.exec(X);var M=X.slice(F,O?O.index:X.length);Z+=r(M,aa);if(!O){break}if(Z%2){aa.push(O[0]);continue}var R=O[0],D=R.length;switch(R){case"ddd":case"dddd":var N=(D===3)?L.days.namesAbbr:L.days.names;aa.push(N[T.getDay()]);break;case"d":case"dd":J=true;aa.push(G(C(T,2),D));break;case"MMM":case"MMMM":var S=C(T,1);aa.push((L.monthsGenitive&&W())?L.monthsGenitive[D===3?"namesAbbr":"names"][S]:L.months[D===3?"namesAbbr":"names"][S]);break;case"M":case"MM":aa.push(G(C(T,1)+1,D));break;case"y":case"yy":case"yyyy":S=B?B[0]:e(T,L,c(T,U),A);if(D<4){S=S%100}aa.push(G(S,D));break;case"h":case"hh":E=T.getHours()%12;if(E===0){E=12}aa.push(G(E,D));break;case"H":case"HH":aa.push(G(T.getHours(),D));break;case"m":case"mm":aa.push(G(T.getMinutes(),D));break;case"s":case"ss":aa.push(G(T.getSeconds(),D));break;case"t":case"tt":S=T.getHours()<12?(L.AM?L.AM[0]:" "):(L.PM?L.PM[0]:" ");aa.push(D===1?S.charAt(0):S);break;case"f":case"ff":case"fff":aa.push(G(T.getMilliseconds(),3).substr(0,D));break;case"z":case"zz":E=T.getTimezoneOffset()/60;aa.push((E<=0?"+":"-")+G(Math.floor(Math.abs(E)),D));break;case"zzz":E=T.getTimezoneOffset()/60;aa.push((E<=0?"+":"-")+G(Math.floor(Math.abs(E)),2)+":"+G(Math.abs(T.getTimezoneOffset()%60),2));break;case"g":case"gg":if(L.eras){aa.push(L.eras[c(T,U)].name)}break;case"/":aa.push(L["/"]);break;default:throw"Invalid date format pattern '"+R+"'.";break}}return aa.join("")};(function(){var z;z=function(G,H,O){var E=O.groupSizes,A=E[0],B=1,L=Math.pow(10,H),C=Math.round(G*L)/L;if(!isFinite(C)){C=G}G=C;var F=G+"",N="",K=F.split(/e/i),M=K.length>1?parseInt(K[1],10):0;F=K[0];K=F.split(".");F=K[0];N=K.length>1?K[1]:"";var D;if(M>0){N=m(N,M,false);F+=N.slice(0,M);N=N.substr(M)}else{if(M<0){M=-M;F=m(F,M+1);N=F.slice(-M,F.length)+N;F=F.slice(0,-M)}}if(H>0){N=O["."]+((N.length>H)?N.slice(0,H):m(N,H))}else{N=""}var J=F.length-1,P=O[","],I="";while(J>=0){if(A===0||A>J){return F.slice(0,J+1)+(I.length?(P+I+N):N)}I=F.slice(J-A+1,J+1)+(I.length?(P+I):"");J-=A;if(B<E.length){A=E[B];B++}}return F.slice(0,J+1)+P+I+N};h=function(L,K,E){if(!K||K==="i"){return E.name.length?L.toLocaleString():L.toString()}K=K||"D";var C=E.numberFormat,D=Math.abs(L),F=-1,J;if(K.length>1){F=parseInt(K.slice(1),10)}var I=K.charAt(0).toUpperCase(),M;switch(I){case"D":J="n";if(F!==-1){D=m(""+D,F,true)}if(L<0){D=-D}break;case"N":M=C;case"C":M=M||C.currency;case"P":M=M||C.percent;J=L<0?M.pattern[0]:(M.pattern[1]||"n");if(F===-1){F=M.decimals}D=z(D*(I==="P"?100:1),F,M);break;default:throw"Bad number format specifier: "+I}var A=/n|\$|-|%/g,H="";for(;;){var G=A.lastIndex,B=A.exec(J);H+=J.slice(G,B?B.index:J.length);if(!B){break}switch(B[0]){case"n":H+=D;break;case"$":H+=C.currency.symbol;break;case"-":if(/[1-9]/.test(D)){H+=C["-"]}break;case"%":H+=C.percent.symbol;break}}return H}}());g=function(){return/\/|dddd|ddd|dd|d|MMMM|MMM|MM|M|yyyy|yy|y|hh|h|HH|H|mm|m|ss|s|tt|t|fff|ff|f|zzz|zz|z|gg|g/g};c=function(B,A){if(!A){return 0}var E,D=B.getTime();for(var C=0,z=A.length;C<z;C++){E=A[C].start;if(E===null||D>=E){return C}}return 0};e=function(A,C,z,D){var B=A.getFullYear();if(!D&&C.eras){B-=C.eras[z].offset}return B};(function(){var A,z,C,B,F,E,D;A=function(L,J){var H=new Date(),G=c(H);if(J<100){var I=L.twoDigitYearMax;I=typeof I==="string"?new Date().getFullYear()%100+parseInt(I,10):I;var K=e(H,L,G);J+=K-(K%100);if(J>I){J-=100}}return J};z=function(K,J,H){var G,L=K.days,I=K._upperDays;if(!I){K._upperDays=I=[D(L.names),D(L.namesAbbr),D(L.namesShort)]}J=E(J);if(H){G=u(I[1],J);if(G===-1){G=u(I[2],J)}}else{G=u(I[0],J)}return G};C=function(N,M,I){var G=N.months,H=N.monthsGenitive||N.months,K=N._upperMonths,L=N._upperMonthsGen;if(!K){N._upperMonths=K=[D(G.names),D(G.namesAbbr)];N._upperMonthsGen=L=[D(H.names),D(H.namesAbbr)]}M=E(M);var J=u(I?K[1]:K[0],M);if(J<0){J=u(I?L[1]:L[0],M)}return J};B=function(G,R){var T=G._parseRegExp;if(!T){G._parseRegExp=T={}}else{var K=T[R];if(K){return K}}var Q=y(G,R).replace(/([\^\$\.\*\+\?\|\[\]\(\)\{\}])/g,"\\\\$1"),O=["^"],H=[],N=0,J=0,W=g(),L;while((L=W.exec(Q))!==null){var V=Q.slice(N,L.index);N=W.lastIndex;J+=r(V,O);if(J%2){O.push(L[0]);continue}var I=L[0],M=I.length,S;switch(I){case"dddd":case"ddd":case"MMMM":case"MMM":case"gg":case"g":S="(\\D+)";break;case"tt":case"t":S="(\\D*)";break;case"yyyy":case"fff":case"ff":case"f":S="(\\d{"+M+"})";break;case"dd":case"d":case"MM":case"M":case"yy":case"y":case"HH":case"H":case"hh":case"h":case"mm":case"m":case"ss":case"s":S="(\\d\\d?)";break;case"zzz":S="([+-]?\\d\\d?:\\d{2})";break;case"zz":case"z":S="([+-]?\\d\\d?)";break;case"/":S="(\\"+G["/"]+")";break;default:throw"Invalid date format pattern '"+I+"'.";break}if(S){O.push(S)}H.push(L[0])}r(Q.slice(N),O);O.push("$");var U=O.join("").replace(/\s+/g,"\\s+"),P={regExp:U,groups:H};return T[R]=P};F=function(I,G,H){return I<G||I>H};E=function(G){return G.split("\u00A0").join(" ").toUpperCase()};D=function(G){var J=[];for(var I=0,H=G.length;I<H;I++){J[I]=E(G[I])}return J};d=function(aa,ah,ai){aa=p(aa);var T=ai.calendar,an=B(T,ah),N=new RegExp(an.regExp).exec(aa);if(N===null){return null}var aj=an.groups,Y=null,R=null,am=null,al=null,S=null,L=0,ad,ac=0,ak=0,G=0,I=null,U=false;for(var ae=0,ag=aj.length;ae<ag;ae++){var H=N[ae+1];if(H){var Z=aj[ae],K=Z.length,M=parseInt(H,10);switch(Z){case"dd":case"d":al=M;if(F(al,1,31)){return null}break;case"MMM":case"MMMM":am=C(T,H,K===3);if(F(am,0,11)){return null}break;case"M":case"MM":am=M-1;if(F(am,0,11)){return null}break;case"y":case"yy":case"yyyy":R=K<4?A(T,M):M;if(F(R,0,9999)){return null}break;case"h":case"hh":L=M;if(L===12){L=0}if(F(L,0,11)){return null}break;case"H":case"HH":L=M;if(F(L,0,23)){return null}break;case"m":case"mm":ac=M;if(F(ac,0,59)){return null}break;case"s":case"ss":ak=M;if(F(ak,0,59)){return null}break;case"tt":case"t":U=T.PM&&(H===T.PM[0]||H===T.PM[1]||H===T.PM[2]);if(!U&&(!T.AM||(H!==T.AM[0]&&H!==T.AM[1]&&H!==T.AM[2]))){return null}break;case"f":case"ff":case"fff":G=M*Math.pow(10,3-K);if(F(G,0,999)){return null}break;case"ddd":case"dddd":S=z(T,H,K===3);if(F(S,0,6)){return null}break;case"zzz":var J=H.split(/:/);if(J.length!==2){return null}ad=parseInt(J[0],10);if(F(ad,-12,13)){return null}var P=parseInt(J[1],10);if(F(P,0,59)){return null}I=(ad*60)+(x(H,"-")?-P:P);break;case"z":case"zz":ad=M;if(F(ad,-12,13)){return null}I=ad*60;break;case"g":case"gg":var V=H;if(!V||!T.eras){return null}V=p(V.toLowerCase());for(var af=0,ab=T.eras.length;af<ab;af++){if(V===T.eras[af].name.toLowerCase()){Y=af;break}}if(Y===null){return null}break}}}var Q=new Date(),X,O=T.convert;X=O?O.fromGregorian(Q)[0]:Q.getFullYear();if(R===null){R=X}else{if(T.eras){R+=T.eras[(Y||0)].offset}}if(am===null){am=0}if(al===null){al=1}if(O){Q=O.toGregorian(R,am,al);if(Q===null){return null}}else{Q.setFullYear(R,am,al);if(Q.getDate()!==al){return null}if(S!==null&&Q.getDay()!==S){return null}}if(U&&L<12){L+=12}Q.setHours(L,ac,ak,G);if(I!==null){var W=Q.getMinutes()-(I+Q.getTimezoneOffset());Q.setHours(Q.getHours()+parseInt(W/60,10),W%60)}return Q}}());b=function(C,B,A){var E=B["-"],D=B["+"],z;switch(A){case"n -":E=" "+E;D=" "+D;case"n-":if(t(C,E)){z=["-",C.substr(0,C.length-E.length)]}else{if(t(C,D)){z=["+",C.substr(0,C.length-D.length)]}}break;case"- n":E+=" ";D+=" ";case"-n":if(x(C,E)){z=["-",C.substr(E.length)]}else{if(x(C,D)){z=["+",C.substr(D.length)]}}break;case"(n)":if(x(C,"(")&&t(C,")")){z=["-",C.substr(1,C.length-2)]}break}return z||["",C]};q.prototype.findClosestCulture=function(z){return q.findClosestCulture.call(this,z)};q.prototype.format=function(z,A,B){return q.format.call(this,z,A,B)};q.prototype.localize=function(z,A){return q.localize.call(this,z,A)};q.prototype.parseInt=function(A,z,B){return q.parseInt.call(this,A,z,B)};q.prototype.parseFloat=function(A,z,B){return q.parseFloat.call(this,A,z,B)};q.prototype.culture=function(z){return q.culture.call(this,z)};q.addCultureInfo=function(D,A,C){var B={},z=false;if(typeof D!=="string"){C=D;D=this.culture().name;B=this.cultures[D]}else{if(typeof A!=="string"){C=A;z=(this.cultures[D]==null);B=this.cultures[D]||this.cultures["default"]}else{z=true;B=this.cultures[A]}}this.cultures[D]=s(true,{},B,C);if(z){this.cultures[D].calendar=this.cultures[D].calendars.standard}};q.findClosestCulture=function(z){var H;if(!z){return this.cultures[this.cultureSelector]||this.cultures["default"]}if(typeof z==="string"){z=z.split(",")}if(l(z)){var B,L=this.cultures,J=z,G,C=J.length,K=[];for(G=0;G<C;G++){z=p(J[G]);var A,F=z.split(";");B=p(F[0]);if(F.length===1){A=1}else{z=p(F[1]);if(z.indexOf("q=")===0){z=z.substr(2);A=parseFloat(z);A=isNaN(A)?0:A}else{A=1}}K.push({lang:B,pri:A})}K.sort(function(N,M){return N.pri<M.pri?1:-1});for(G=0;G<C;G++){B=K[G].lang;H=L[B];if(H){return H}}for(G=0;G<C;G++){B=K[G].lang;do{var I=B.lastIndexOf("-");if(I===-1){break}B=B.substr(0,I);H=L[B];if(H){return H}}while(1)}for(G=0;G<C;G++){B=K[G].lang;for(var E in L){var D=L[E];if(D.language==B){return D}}}}else{if(typeof z==="object"){return z}}return H||null};q.format=function(z,A,B){culture=this.findClosestCulture(B);if(z instanceof Date){z=n(z,A,culture)}else{if(typeof z==="number"){z=h(z,A,culture)}}return z};q.localize=function(z,A){return(this.findClosestCulture(A).messages[z]||this.cultures["default"].messages.key)};q.parseDate=function(H,F,D){D=this.findClosestCulture(D);var B,z,A;if(F){if(typeof F==="string"){F=[F]}if(F.length){for(var E=0,C=F.length;E<C;E++){var G=F[E];if(G){B=d(H,G,D);if(B){break}}}}}else{A=D.calendar.patterns;for(z in A){B=d(H,A[z],D);if(B){break}}}return B||null};q.parseInt=function(A,z,B){return Math.floor(q.parseFloat(A,z,B))};q.parseFloat=function(N,G,I){if(typeof G!=="number"){I=G;G=10}var P=this.findClosestCulture(I);var S=NaN,E=P.numberFormat;if(N.indexOf(P.numberFormat.currency.symbol)>-1){N=N.replace(P.numberFormat.currency.symbol,"");N=N.replace(P.numberFormat.currency["."],P.numberFormat["."])}N=p(N);if(k.test(N)){S=parseFloat(N)}else{if(!G&&v.test(N)){S=parseInt(N,16)}else{var B=b(N,E,E.pattern[0]),R=B[0],H=B[1];if(R===""&&E.pattern[0]!=="-n"){B=b(N,E,"-n");R=B[0];H=B[1]}R=R||"+";var M,J,Q=H.indexOf("e");if(Q<0){Q=H.indexOf("E")}if(Q<0){J=H;M=null}else{J=H.substr(0,Q);M=H.substr(Q+1)}var O,F,C=E["."],z=J.indexOf(C);if(z<0){O=J;F=null}else{O=J.substr(0,z);F=J.substr(z+C.length)}var K=E[","];O=O.split(K).join("");var D=K.replace(/\u00A0/g," ");if(K!==D){O=O.split(D).join("")}var L=R+O;if(F!==null){L+="."+F}if(M!==null){var A=b(M,E,"-n");L+="e"+(A[0]||"+")+A[1]}if(w.test(L)){S=parseFloat(L)}}}return S};q.culture=function(z){if(typeof z!=="undefined"){this.cultureSelector=z}return this.findClosestCulture(z)||this.culture["default"]}}(this));


/*

  The MIT License (MIT)

  Copyright (c) 2007-2013 Einar Lielmanis and contributors.

  Permission is hereby granted, free of charge, to any person
  obtaining a copy of this software and associated documentation files
  (the "Software"), to deal in the Software without restriction,
  including without limitation the rights to use, copy, modify, merge,
  publish, distribute, sublicense, and/or sell copies of the Software,
  and to permit persons to whom the Software is furnished to do so,
  subject to the following conditions:

  The above copyright notice and this permission notice shall be
  included in all copies or substantial portions of the Software.

  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
  BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
  ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  SOFTWARE.

*/

(function(){function a(d){return d.replace(/^\s+|\s+$/g,"")}function c(d){return d.replace(/^\s+/g,"")}function b(x,g,p,i){var B,s,q,u,k,A,w,h;g=g||{};if(g.wrap_line_length===undefined&&g.max_char!==undefined){g.wrap_line_length=g.max_char}s=parseInt(g.indent_size||4,10);q=g.indent_char||" ";k=g.brace_style||"collapse";u=g.wrap_line_length===0?32786:parseInt(g.wrap_line_length||250,10);A=g.unformatted||["a","span","bdo","em","strong","dfn","code","samp","kbd","var","cite","abbr","acronym","q","sub","sup","tt","i","b","big","small","u","s","strike","font","ins","del","pre","address","dt","h1","h2","h3","h4","h5","h6"];w=g.preserve_newlines||true;h=w?parseInt(g.max_preserve_newlines||32786,10):0;function f(){this.pos=0;this.token="";this.current_mode="CONTENT";this.tags={parent:"parent1",parentcount:1,parent1:""};this.tag_type="";this.token_text=this.last_token=this.last_text=this.token_type="";this.newlines=0;this.indent_content=false;this.Utils={whitespace:"\n\r\t ".split(""),single_token:"br,input,link,meta,!doctype,basefont,base,area,hr,wbr,param,img,isindex,?xml,embed,?php,?,?=".split(","),extra_liners:"head,body,/html".split(","),in_array:function(D,t){for(var C=0;C<t.length;C++){if(D===t[C]){return true}}return false}};this.traverse_whitespace=function(){var t="";t=this.input.charAt(this.pos);if(this.Utils.in_array(t,this.Utils.whitespace)){this.newlines=0;while(this.Utils.in_array(t,this.Utils.whitespace)){if(w&&t==="\n"&&this.newlines<=h){this.newlines+=1}this.pos++;t=this.input.charAt(this.pos)}return true}return false};this.get_content=function(){var t="",C=[],D=false;while(this.input.charAt(this.pos)!=="<"){if(this.pos>=this.input.length){return C.length?C.join(""):["","TK_EOF"]}if(this.traverse_whitespace()){if(C.length){D=true}continue}t=this.input.charAt(this.pos);this.pos++;if(D){if(this.line_char_count>=this.wrap_line_length){this.print_newline(false,C);this.print_indentation(C)}else{this.line_char_count++;C.push(" ")}D=false}this.line_char_count++;C.push(t)}return C.length?C.join(""):""};this.get_contents_to=function(D){if(this.pos===this.input.length){return["","TK_EOF"]}var t="";var E="";var F=new RegExp("</"+D+"\\s*>","igm");F.lastIndex=this.pos;var C=F.exec(this.input);var G=C?C.index:this.input.length;if(this.pos<G){E=this.input.substring(this.pos,G);this.pos=G}return E};this.record_tag=function(t){if(this.tags[t+"count"]){this.tags[t+"count"]++;this.tags[t+this.tags[t+"count"]]=this.indent_level}else{this.tags[t+"count"]=1;this.tags[t+this.tags[t+"count"]]=this.indent_level}this.tags[t+this.tags[t+"count"]+"parent"]=this.tags.parent;this.tags.parent=t+this.tags[t+"count"]};this.retrieve_tag=function(t){if(this.tags[t+"count"]){var C=this.tags.parent;while(C){if(t+this.tags[t+"count"]===C){break}C=this.tags[C+"parent"]}if(C){this.indent_level=this.tags[t+this.tags[t+"count"]];this.tags.parent=this.tags[C+"parent"]}delete this.tags[t+this.tags[t+"count"]+"parent"];delete this.tags[t+this.tags[t+"count"]];if(this.tags[t+"count"]===1){delete this.tags[t+"count"]}else{this.tags[t+"count"]--}}};this.get_tag=function(L){var G="",I=[],H="",C=false,K,F,D=this.pos,t=this.line_char_count;L=L!==undefined?L:false;do{if(this.pos>=this.input.length){if(L){this.pos=D;this.line_char_count=t}return I.length?I.join(""):["","TK_EOF"]}G=this.input.charAt(this.pos);this.pos++;if(this.Utils.in_array(G,this.Utils.whitespace)){C=true;continue}if(G==="'"||G==='"'){G+=this.get_unformatted(G);C=true}if(G==="="){C=false}if(I.length&&I[I.length-1]!=="="&&G!==">"&&C){if(this.line_char_count>=this.wrap_line_length){this.print_newline(false,I);this.print_indentation(I)}else{I.push(" ");this.line_char_count++}C=false}if(G==="<"&&!K){K=this.pos-1}this.line_char_count++;I.push(G);if(I[1]&&I[1]==="!"){I=[this.get_comment(K)];break}}while(G!==">");var M=I.join("");var E;if(M.indexOf(" ")!==-1){E=M.indexOf(" ")}else{E=M.indexOf(">")}var J=M.substring(1,E).toLowerCase();if(M.charAt(M.length-2)==="/"||this.Utils.in_array(J,this.Utils.single_token)){if(!L){this.tag_type="SINGLE"}}else{if(J==="script"){if(!L){this.record_tag(J);this.tag_type="SCRIPT"}}else{if(J==="style"){if(!L){this.record_tag(J);this.tag_type="STYLE"}}else{if(this.is_unformatted(J,A)){H=this.get_unformatted("</"+J+">",M);I.push(H);if(K>0&&this.Utils.in_array(this.input.charAt(K-1),this.Utils.whitespace)){I.splice(0,0,this.input.charAt(K-1))}F=this.pos-1;if(this.Utils.in_array(this.input.charAt(F+1),this.Utils.whitespace)){I.push(this.input.charAt(F+1))}this.tag_type="SINGLE"}else{if(J.charAt(0)==="!"){if(!L){this.tag_type="SINGLE";this.traverse_whitespace()}}else{if(!L){if(J.charAt(0)==="/"){this.retrieve_tag(J.substring(1));this.tag_type="END";this.traverse_whitespace()}else{this.record_tag(J);if(J.toLowerCase()!=="html"){this.indent_content=true}this.tag_type="START";this.traverse_whitespace()}if(this.Utils.in_array(J,this.Utils.extra_liners)){this.print_newline(false,this.output);if(this.output.length&&this.output[this.output.length-2]!=="\n"){this.print_newline(true,this.output)}}}}}}}}if(L){this.pos=D;this.line_char_count=t}return I.join("")};this.get_comment=function(C){var E="",D=">",t=false;this.pos=C;input_char=this.input.charAt(this.pos);this.pos++;while(this.pos<=this.input.length){E+=input_char;if(E[E.length-1]===D[D.length-1]&&E.indexOf(D)!==-1){break}if(!t&&E.length<10){if(E.indexOf("<![if")===0){D="<![endif]>";t=true}else{if(E.indexOf("<![cdata[")===0){D="]]>";t=true}else{if(E.indexOf("<![")===0){D="]>";t=true}else{if(E.indexOf("<!--")===0){D="-->";t=true}}}}}input_char=this.input.charAt(this.pos);this.pos++}return E};this.get_unformatted=function(C,D){if(D&&D.toLowerCase().indexOf(C)!==-1){return""}var t="";var E="";var F=true;do{if(this.pos>=this.input.length){return E}t=this.input.charAt(this.pos);this.pos++;if(this.Utils.in_array(t,this.Utils.whitespace)){if(!F){this.line_char_count--;continue}if(t==="\n"||t==="\r"){E+="\n";this.line_char_count=0;continue}}E+=t;this.line_char_count++;F=true}while(E.toLowerCase().indexOf(C)===-1);return E};this.get_token=function(){var t;if(this.last_token==="TK_TAG_SCRIPT"||this.last_token==="TK_TAG_STYLE"){var C=this.last_token.substr(7);t=this.get_contents_to(C);if(typeof t!=="string"){return t}return[t,"TK_"+C]}if(this.current_mode==="CONTENT"){t=this.get_content();if(typeof t!=="string"){return t}else{return[t,"TK_CONTENT"]}}if(this.current_mode==="TAG"){t=this.get_tag();if(typeof t!=="string"){return t}else{var D="TK_TAG_"+this.tag_type;return[t,D]}}};this.get_full_indent=function(t){t=this.indent_level+t||0;if(t<1){return""}return Array(t+1).join(this.indent_string)};this.is_unformatted=function(D,C){if(!this.Utils.in_array(D,C)){return false}if(D.toLowerCase()!=="a"||!this.Utils.in_array("a",C)){return true}var E=this.get_tag(true);var t=(E||"").match(/^\s*<\s*\/?([a-z]*)\s*[^>]*>\s*$/);if(!t||this.Utils.in_array(t,C)){return true}else{return false}};this.printer=function(E,D,t,G,F){this.input=E||"";this.output=[];this.indent_character=D;this.indent_string="";this.indent_size=t;this.brace_style=F;this.indent_level=0;this.wrap_line_length=G;this.line_char_count=0;for(var C=0;C<this.indent_size;C++){this.indent_string+=this.indent_character}this.print_newline=function(I,H){this.line_char_count=0;if(!H||!H.length){return}if(I||(H[H.length-1]!=="\n")){H.push("\n")}};this.print_indentation=function(H){for(var I=0;I<this.indent_level;I++){H.push(this.indent_string);this.line_char_count+=this.indent_string.length}};this.print_token=function(H){if(H||H!==""){if(this.output.length&&this.output[this.output.length-1]==="\n"){this.print_indentation(this.output);H=c(H)}}this.print_token_raw(H)};this.print_token_raw=function(H){if(H&&H!==""){if(H.length>1&&H[H.length-1]==="\n"){this.output.push(H.slice(0,-1));this.print_newline(false,this.output)}else{this.output.push(H)}}for(var I=0;I<this.newlines;I++){this.print_newline(I>0,this.output)}this.newlines=0};this.indent=function(){this.indent_level++};this.unindent=function(){if(this.indent_level>0){this.indent_level--}}};return this}B=new f();B.printer(x,q,s,u,k);while(true){var n=B.get_token();B.token_text=n[0];B.token_type=n[1];if(B.token_type==="TK_EOF"){break}switch(B.token_type){case"TK_TAG_START":B.print_newline(false,B.output);B.print_token(B.token_text);if(B.indent_content){B.indent();B.indent_content=false}B.current_mode="CONTENT";break;case"TK_TAG_STYLE":case"TK_TAG_SCRIPT":B.print_newline(false,B.output);B.print_token(B.token_text);B.current_mode="CONTENT";break;case"TK_TAG_END":if(B.last_token==="TK_CONTENT"&&B.last_text===""){var z=B.token_text.match(/\w+/)[0];var o=B.output[B.output.length-1].match(/<\s*(\w+)/);if(o===null||o[1]!==z){B.print_newline(false,B.output)}}B.print_token(B.token_text);B.current_mode="CONTENT";break;case"TK_TAG_SINGLE":var e=B.token_text.match(/^\s*<([a-z]+)/i);if(!e||!B.Utils.in_array(e[1],A)){B.print_newline(false,B.output)}B.print_token(B.token_text);B.current_mode="CONTENT";break;case"TK_CONTENT":B.print_token(B.token_text);B.current_mode="TAG";break;case"TK_STYLE":case"TK_SCRIPT":if(B.token_text!==""){B.print_newline(false,B.output);var m=B.token_text,v,l=1;if(B.token_type==="TK_SCRIPT"){v=typeof p==="function"&&p}else{if(B.token_type==="TK_STYLE"){v=typeof i==="function"&&i}}if(g.indent_scripts==="keep"){l=0}else{if(g.indent_scripts==="separate"){l=-B.indent_level}}var d=B.get_full_indent(l);if(v){m=v(m.replace(/^\s*/,d),g)}else{var j=m.match(/^\s*/)[0];var r=j.match(/[^\n\r]*$/)[0].split(B.indent_string).length-1;var y=B.get_full_indent(l-r);m=m.replace(/^\s*/,d).replace(/\r\n|\r|\n/g,"\n"+y).replace(/\s+$/,"")}if(m){B.print_token_raw(d+a(m));B.print_newline(false,B.output)}}B.current_mode="TAG";break}B.last_token=B.token_type;B.last_text=B.token_text}return B.output.join("")}window.__html_beautify=function(e,d){return b(e,d,window.js_beautify,window.css_beautify)}}());


/**
* @preserve CanvasJS HTML5 & JavaScript Charts - v1.3.0 GA - http://canvasjs.com/
* Copyright 2013 fenopix
*/
!function(){var t,e=!1;t=null!==window.document.body?window.getComputedStyle(window.document.body).getPropertyValue("font-family"):"Arial";var a=!!document.createElement("canvas").getContext,n={Chart:{width:500,height:400,zoomEnabled:!1,backgroundColor:null,theme:"theme1",animationEnabled:!1,colorSet:"dashboardColorSet",culture:"en",interactivityEnabled:!0},Title:{padding:0,text:null,verticalAlign:"top",horizontalAlign:"center",fontSize:20,fontFamily:t,fontWeight:"normal",fontColor:"black",fontStyle:"normal",borderThickness:0,borderColor:"black",cornerRadius:0,backgroundColor:null,margin:5},Legend:{name:null,verticalAlign:"bottom",horizontalAlign:"left",fontFamily:t,fontWeight:"normal",fontColor:"black",fontStyle:"normal",fontSize:"18",cursor:"cursor",itemmouseover:null,itemmouseout:null,itemmousemove:null,itemclick:null},ToolTip:{enabled:!0,borderColor:null,shared:!1,animationEnabled:!0,content:function(t){var e;return t.entries[0].dataPoint.fullLabel&&t.entries[0].dataPoint.fullLabel.length>0?e=t.entries[0].dataPoint.fullLabel+"<br>":t.entries[0].dataPoint.label&&t.entries[0].dataPoint.label.length>0?e=t.entries[0].dataPoint.label+"<br>":t.entries[0].dataPoint.legendText&&t.entries[0].dataPoint.legendText.length>0&&(e=t.entries[0].dataPoint.legendText+"<br>"),t.entries[0].dataSeries.name&&(e=e+t.entries[0].dataSeries.name+"<br>"),e+=t.entries[0].dataPoint.yFormatted}},Axis:{minimum:0,maximum:null,interval:null,intervalType:null,hasNegativeAxisY:!1,title:null,titleFontColor:"black",titleFontSize:18,titleFontFamily:t,titleFontWeight:"normal",titleFontStyle:"normal",labelAngle:0,labelFontFamily:t,labelFontColor:"black",labelFontSize:20,labelFontWeight:"normal",labelFontStyle:"normal",labelAutoFit:!1,labelWrap:!1,labelMaxWidth:null,prefix:"",suffix:"",secondaryPrefix:"",secondarySuffix:"",includeZero:!1,tickLength:5,tickColor:"#595959",tickThickness:0,lineColor:"black",lineThickness:1,gridColor:"#D7D7D7",gridThickness:1,interlacedColor:null,valueFormatString:null,margin:4,stripLines:[]},StripLine:{value:null,startValue:null,endValue:null,color:"orange",thickness:2,label:"",labelBackgroundColor:"#EEEEEE",labelFontFamily:t,labelFontColor:"orange",labelFontSize:12,labelFontWeight:"normal",labelFontStyle:"normal"},DataSeries:{name:null,dataPoints:null,label:"",bevelEnabled:!1,cursor:"default",indexLabel:"",indexLabelPlacement:"outside",indexLabelOrientation:"horizontal",indexLabelFontColor:"black",indexLabelFontSize:20,indexLabelFontStyle:"normal",indexLabelFontFamily:t,indexLabelFontWeight:"normal",indexLabelBackgroundColor:null,indexLabelLineColor:null,indexLabelLineThickness:1,indexLabelMaxWidth:null,indexLabelWrap:!0,lineThickness:2,color:null,startAngle:0,type:"column",xValueType:"number",axisYType:"primary",xValueFormatString:null,yValueFormatString:null,showInLegend:null,legendMarkerType:"square",legendMarkerColor:null,legendText:null,markerType:"circle",markerColor:null,markerSize:null,markerBorderColor:null,markerBorderThickness:null,mouseover:null,mouseout:null,mousemove:null,click:null,toolTipContent:null,visible:!0},CultureInfo:{decimalSeparator:".",digitGroupSeparator:",",zoomText:"Zoom",panText:"Pan",resetText:"Reset",days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]},TextBlock:{x:0,y:0,width:null,height:null,maxWidth:null,maxHeight:null,padding:0,angle:0,text:"",horizontalAlign:"center",fontSize:20,fontFamily:t,fontWeight:"normal",fontColor:"black",fontStyle:"normal",borderThickness:0,borderColor:"black",cornerRadius:0,backgroundColor:null,textBaseline:"top"}},s={en:{}},o={colorSet1:["#369EAD","#C24642","#7F6084","#86B402","#A2D1CF","#C8B631","#6DBCEB","#52514E","#4F81BC","#A064A1","#F79647"],colorSet2:["#4F81BC","#C0504E","#9BBB58","#23BFAA","#8064A1","#4AACC5","#F79647","#33558B"],colorSet3:["#8CA1BC","#36845C","#017E82","#8CB9D0","#708C98","#94838D","#F08891","#0366A7","#008276","#EE7757","#E5BA3A","#F2990B","#03557B","#782970"]},r={theme1:{Chart:{colorSet:"dashboardColorSet"},DataSeries:{indexLabelFontColor:"grey",indexLabelFontFamily:a?"Arial, Calibri, Optima, Candara, Verdana, Geneva, sans-serif":"calibri",indexLabelFontSize:18,indexLabelLineThickness:1}},theme2:{Chart:{colorSet:"colorSet2"},Title:{fontFamily:"impact, charcoal, arial black, sans-serif",fontSize:32,fontColor:"#333333",verticalAlign:"top",margin:10},Axis:{titleFontSize:22,titleFontColor:"rgb(98,98,98)",titleFontFamily:a?"monospace, sans-serif,arial black":"arial",titleFontWeight:"bold",labelFontFamily:a?"monospace, Courier New, Courier":"arial",labelFontSize:16,labelFontColor:"grey",labelFontWeight:"bold",tickColor:"grey",tickThickness:2,gridThickness:2,gridColor:"grey",lineThickness:0},Legend:{verticalAlign:"bottom",horizontalAlign:"center",fontFamily:a?"monospace, sans-serif,arial black":"arial"},DataSeries:{indexLabelFontColor:"grey",indexLabelFontFamily:a?"Courier New, Courier, monospace":"arial",indexLabelFontWeight:"bold",indexLabelFontSize:18,indexLabelLineThickness:1}},theme3:{Chart:{colorSet:"colorSet1"},Title:{fontFamily:a?"Candara, Optima, Trebuchet MS, Helvetica Neue, Helvetica, Trebuchet MS, serif":"calibri",fontSize:32,fontColor:"#3A3A3A",fontWeight:"bold",verticalAlign:"top",margin:10},Axis:{titleFontSize:22,titleFontColor:"rgb(98,98,98)",titleFontFamily:a?"Verdana, Geneva, Calibri, sans-serif":"calibri",labelFontFamily:a?"Calibri, Optima, Candara, Verdana, Geneva, sans-serif":"calibri",labelFontSize:18,labelFontColor:"grey",tickColor:"grey",tickThickness:2,gridThickness:2,gridColor:"grey",lineThickness:2,lineColor:"grey"},Legend:{verticalAlign:"bottom",horizontalAlign:"center",fontFamily:a?"monospace, sans-serif,arial black":"calibri"},DataSeries:{bevelEnabled:!0,indexLabelFontColor:"grey",indexLabelFontFamily:a?"Candara, Optima, Calibri, Verdana, Geneva, sans-serif":"calibri",indexLabelFontSize:18,indexLabelLineColor:"lightgrey",indexLabelLineThickness:2}}},l={numberDuration:1,yearDuration:314496e5,monthDuration:2592e6,weekDuration:6048e5,dayDuration:864e5,hourDuration:36e5,minuteDuration:6e4,secondDuration:1e3,millisecondDuration:1,dayOfWeekFromInt:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]};function h(t,e){t.prototype=function(t){function e(){}return e.prototype=t,new e}(e.prototype),t.prototype.constructor=t,t.parent=e.prototype}function d(t,e,i){return"millisecond"===i?t.setMilliseconds(t.getMilliseconds()+1*e):"second"===i?t.setSeconds(t.getSeconds()+1*e):"minute"===i?t.setMinutes(t.getMinutes()+1*e):"hour"===i?t.setHours(t.getHours()+1*e):"day"===i?t.setDate(t.getDate()+1*e):"week"===i?t.setDate(t.getDate()+7*e):"month"===i?t.setMonth(t.getMonth()+1*e):"year"===i&&t.setFullYear(t.getFullYear()+1*e),t}function x(t,e){return l[e+"Duration"]*t}function c(t,e){var i=!1;for(t<0&&(i=!0,t*=-1),t=""+t,e=e||1;t.length<e;)t="0"+t;return i?"-"+t:t}function m(t){if(!t)return t;for(var e=/\s/,i=(t=t.replace(/^\s\s*/,"")).length;e.test(t.charAt(--i)););return t.slice(0,i+1)}function p(t,e){return t-e}function u(t,e){return t.x-e.x}function g(t){var e=((16711680&t)>>16).toString(16),i=((65280&t)>>8).toString(16),a=((255&t)>>0).toString(16);return"#"+(e=e.length<2?"0"+e:e)+(i=i.length<2?"0"+i:i)+(a=a.length<2?"0"+a:a)}var v={},y=null;function b(t,e,i){var a=t+"_"+e+"_"+(i=i||"normal"),n=v[a];if(isNaN(n)){try{var s="position:absolute; left:0px; top:-20000px; padding:0px;margin:0px;border:none;white-space:pre;line-height:normal;font-family:"+t+"; font-size:"+e+"px; font-weight:"+i+";";if(!y){var o=document.body;(y=document.createElement("span")).innerHTML="";var r=document.createTextNode("Mpgyi");y.appendChild(r),o.appendChild(y)}y.style.display="",y.setAttribute("style",s),n=Math.round(y.offsetHeight),y.style.display="none"}catch(t){n=Math.ceil(1.1*e)}n=Math.max(n,e),v[a]=n}return n}var f,P,T,M,S,k,_,C=(f=/D{1,4}|M{1,4}|Y{1,4}|h{1,2}|H{1,2}|m{1,2}|s{1,2}|f{1,3}|t{1,2}|T{1,2}|K|z{1,3}|"[^"]*"|'[^']*'/g,P=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],T=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],M=["January","February","March","April","May","June","July","August","September","October","November","December"],S=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],k=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,_=/[^-+\dA-Z]/g,function(t,e,i){var a=i?i.days:P,n=i?i.months:M,s=i?i.shortDays:T,o=i?i.shortMonths:S,r=!1;if(t=t&&t.getTime?t:t?new Date(t):new Date,isNaN(t))throw SyntaxError("invalid date");"UTC:"===e.slice(0,4)&&(e=e.slice(4),r=!0);var l=r?"getUTC":"get",h=t[l+"Date"](),d=t[l+"Day"](),x=t[l+"Month"](),m=t[l+"FullYear"](),p=t[l+"Hours"](),u=t[l+"Minutes"](),g=t[l+"Seconds"](),v=t[l+"Milliseconds"](),y=r?0:t.getTimezoneOffset();return e.replace(f,(function(e){switch(e){case"D":return h;case"DD":return c(h,2);case"DDD":return s[d];case"DDDD":return a[d];case"M":return x+1;case"MM":return c(x+1,2);case"MMM":return o[x];case"MMMM":return n[x];case"Y":return parseInt(String(m).slice(-2));case"YY":return c(String(m).slice(-2),2);case"YYY":return c(String(m).slice(-3),3);case"YYYY":return c(m,4);case"h":return p%12||12;case"hh":return c(p%12||12,2);case"H":return p;case"HH":return c(p,2);case"m":return u;case"mm":return c(u,2);case"s":return g;case"ss":return c(g,2);case"f":return String(v).slice(0,1);case"ff":return c(String(v).slice(0,2),2);case"fff":return c(String(v).slice(0,3),3);case"t":return p<12?"a":"p";case"tt":return p<12?"am":"pm";case"T":return p<12?"A":"P";case"TT":return p<12?"AM":"PM";case"K":return r?"UTC":(String(t).match(k)||[""]).pop().replace(_,"");case"z":return(y>0?"-":"+")+Math.floor(Math.abs(y)/60);case"zz":return(y>0?"-":"+")+c(Math.floor(Math.abs(y)/60),2);case"zzz":return(y>0?"-":"+")+c(Math.floor(Math.abs(y)/60),2)+c(Math.abs(y)%60,2);default:return e.slice(1,e.length-1)}}))}),w=function(t,e,i){if(null===t)return"";var a=(t=Number(t))<0;a&&(t*=-1);var n=i?i.decimalSeparator:".",s=i?i.digitGroupSeparator:",";e=String(e);var o,r=1,l="",h=-1,d=[],x=[],m=0,p=0,u=0,g=!1,v=0;o=e.match(/"[^"]*"|'[^']*'|[eE][+-]*[0]+|[,]+[.]|‰|./g);for(var y=null,b=0;o&&b<o.length;b++)if("."===(y=o[b])&&h<0)h=b;else{if("%"===y)r*=100;else{if("‰"===y){r*=1e3;continue}if(","===y[0]&&"."===y[y.length-1]){r/=Math.pow(1e3,y.length-1),h=b+y.length-1;continue}"E"!==y[0]&&"e"!==y[0]||"0"!==y[y.length-1]||(g=!0)}h<0?(d.push(y),"#"===y||"0"===y?m++:","===y&&u++):(x.push(y),"#"!==y&&"0"!==y||p++)}if(g){var f=Math.floor(t);v=(0===f?"":String(f)).length-m,r/=Math.pow(10,v)}h<0&&(h=b);var P=(t*=r).toFixed(p).split("."),T=(P[0]+"").split(""),M=(P[1]+"").split("");T&&"0"===T[0]&&T.shift();for(var S=0,k=0,_=0,C=0,w=0;d.length>0;)if("#"===(y=d.pop())||"0"===y)if(++S===m){var A=T;if(T=[],"0"===y)for(var I=m-k-(A?A.length:0);I>0;)A.unshift("0"),I--;for(;A.length>0;)l=A.pop()+l,++w%C==0&&_===u&&A.length>0&&(l=s+l);a&&(l="-"+l)}else T.length>0?(l=T.pop()+l,k++,w++):"0"===y&&(l="0"+l,k++,w++),w%C==0&&_===u&&T.length>0&&(l=s+l);else"E"!==y[0]&&"e"!==y[0]||"0"!==y[y.length-1]||!/[eE][+-]*[0]+/.test(y)?","===y?(_++,C=w,w=0,T.length>0&&(l=s+l)):l=y.length>1&&('"'===y[0]&&'"'===y[y.length-1]||"'"===y[0]&&"'"===y[y.length-1])?y.slice(1,y.length-1)+l:y+l:l+=(y=v<0?y.replace("+","").replace("-",""):y.replace("-","")).replace(/[0]+/,(function(t){return c(v,t.length)}));for(var L="",X=!1;x.length>0;)"#"===(y=x.shift())||"0"===y?M.length>0&&0!==Number(M.join(""))?(L+=M.shift(),X=!0):"0"===y&&(L+="0",X=!0):y.length>1&&('"'===y[0]&&'"'===y[y.length-1]||"'"===y[0]&&"'"===y[y.length-1])?L+=y.slice(1,y.length-1):"E"!==y[0]&&"e"!==y[0]||"0"!==y[y.length-1]||!/[eE][+-]*[0]+/.test(y)?L+=y:L+=(y=v<0?y.replace("+","").replace("-",""):y.replace("-","")).replace(/[0]+/,(function(t){return c(v,t.length)}));return l+=(X?n:"")+L};function A(t,e,i){t*=z,e*=z;for(var a,n,s,o=i.getImageData(t,e,2,2).data,r=!0,l=0;l<4;l++)if(o[l]!==o[l+4]|o[l]!==o[l+8]|o[l]!==o[l+12]){r=!1;break}return r?(a=o[0],n=o[1],s=o[2],a<<16|n<<8|s):0}var I=function(t){var e=0,i=0;return(t=t||window.event).offsetX||0===t.offsetX?(e=t.offsetX,i=t.offsetY):t.layerX||0==t.layerX?(e=t.layerX,i=t.layerY):(e=t.pageX-t.target.offsetLeft,i=t.pageY-t.target.offsetTop),{x:e,y:i}};function L(t,e,i){var n="",s=t?t+"FontStyle":"fontStyle",o=t?t+"FontWeight":"fontWeight",r=t?t+"FontSize":"fontSize",l=t?t+"FontFamily":"fontFamily";n+=e[s]?e[s]+" ":i&&i[s]?i[s]+" ":"",n+=e[o]?e[o]+" ":i&&i[o]?i[o]+" ":"",n+=e[r]?e[r]+"px ":i&&i[r]?i[r]+"px ":"";var h=e[l]?e[l]+"":i&&i[l]?i[l]+"":"";if(!a&&h){var d=h.split(",")[0];"'"!==d[0]&&'"'!==d[0]&&(d="'"+d+"'"),n+=d}else n+=h;return n}function X(t,e,i){return t in e?e[t]:i[t]}var B=window.devicePixelRatio||1,F=1,z=B/F;function Y(t,e,i){if(a){var n=t.getContext("2d");F=n.webkitBackingStorePixelRatio||n.mozBackingStorePixelRatio||n.msBackingStorePixelRatio||n.oBackingStorePixelRatio||n.backingStorePixelRatio||1,z=B/F,t.width=e*z,t.height=i*z,B!==F&&(t.style.width=e+"px",t.style.height=i+"px",n.scale(z,z))}else t.width=e,t.height=i}function D(t,e){var i=document.createElement("canvas");return i.setAttribute("class","canvasjs-chart-canvas"),Y(i,t,e),a||"undefined"==typeof G_vmlCanvasManager||G_vmlCanvasManager.initElement(i),i}function W(t,e,i){this._defaultsKey=t;var a={};i&&r[i]&&r[i][t]&&(a=r[i][t]),this._options=e||{},this.setOptions(this._options,a)}function E(t,e){e=e||{},E.parent.constructor.call(this,"Chart",e,e.theme?e.theme:"theme1");var i=this;if(this._containerId=t,this._objectsInitialized=!1,this.ctx=null,this.overlaidCanvasCtx=null,this._indexLabels=[],this._panTimerId=0,this._lastTouchEventType="",this._lastTouchData=null,this.panEnabled=!1,this._defaultCursor="default",this.plotArea={canvas:null,ctx:null,x1:0,y1:0,x2:0,y2:0,width:0,height:0},this._dataInRenderedOrder=[],this._container=document.getElementById(this._containerId),this.registeredEvent=[],this._container){this._container.innerHTML="";var n=0,s=0;if(n=this._options.width?this.width:this._container.clientWidth>0?this._container.clientWidth:this.width,s=this._options.height?this.height:this._container.clientHeight>0?this._container.clientHeight:this.height,this.width=n,this.height=s,this._selectedColorSet=void 0!==o[this.colorSet]?o[this.colorSet]:o.colorSet1,this._canvasJSContainer=document.createElement("div"),this._canvasJSContainer.setAttribute("class","canvasjs-chart-container"),this._canvasJSContainer.style.position="relative",this._canvasJSContainer.style.textAlign="left",this._canvasJSContainer.style.cursor="auto",a||(this._canvasJSContainer.style.height="0px"),this._container.appendChild(this._canvasJSContainer),this.canvas=D(n,s),this.canvas.style.position="absolute",this.canvas.getContext){try{this.canvas.style.background=this.backgroundColor}catch(t){}this._canvasJSContainer.appendChild(this.canvas),this.ctx=this.canvas.getContext("2d"),this.ctx.textBaseline="top",this.ctx.roundRect=function(t,e,i,a,n,s,o,r){o&&(this.fillStyle=o),r&&(this.strokeStyle=r),void 0===n&&(n=5),this.lineWidth=s,this.beginPath(),this.moveTo(t+n,e),this.lineTo(t+i-n,e),this.quadraticCurveTo(t+i,e,t+i,e+n),this.lineTo(t+i,e+a-n),this.quadraticCurveTo(t+i,e+a,t+i-n,e+a),this.lineTo(t+n,e+a),this.quadraticCurveTo(t,e+a,t,e+a-n),this.lineTo(t,e+n),this.quadraticCurveTo(t,e,t+n,e),this.closePath(),o&&this.fill(),r&&s>0&&this.stroke()},a?this.plotArea.ctx=this.ctx:(this.plotArea.canvas=D(n,s),this.plotArea.canvas.style.position="absolute",this.plotArea.canvas.setAttribute("class","plotAreaCanvas"),this._canvasJSContainer.appendChild(this.plotArea.canvas),this.plotArea.ctx=this.plotArea.canvas.getContext("2d")),this.overlaidCanvas=D(n,s),this.overlaidCanvas.style.position="absolute",this._canvasJSContainer.appendChild(this.overlaidCanvas),this.overlaidCanvasCtx=this.overlaidCanvas.getContext("2d"),this.overlaidCanvasCtx.textBaseline="top",this._eventManager=new at(this),this.registerAndAddEvent(window,"resize",(function(){i._updateSize()&&i.render()})),this._toolBar=document.createElement("div"),this._toolBar.setAttribute("class","canvasjs-chart-toolbar"),this._toolBar.style.position="absolute",this._toolBar.style.top="0px",this._toolBar.style.right="0px",this._canvasJSContainer.appendChild(this._toolBar),this._toolBar.style.display="none",this.bounds={x1:0,y1:0,x2:this.width,y2:this.height},this.registerAndAddEvent(this.overlaidCanvas,"click",(function(t){i._mouseEventHandler(t)})),this.registerAndAddEvent(this.overlaidCanvas,"mousemove",(function(t){i._mouseEventHandler(t)})),this.registerAndAddEvent(this.overlaidCanvas,"mouseup",(function(t){i._mouseEventHandler(t)})),this.registerAndAddEvent(this.overlaidCanvas,"mousedown",(function(t){i._mouseEventHandler(t)})),this.registerAndAddEvent(this.overlaidCanvas,"mouseout",(function(t){i._mouseEventHandler(t)})),this.registerAndAddEvent(this.overlaidCanvas,window.navigator.msPointerEnabled?"MSPointerDown":"touchstart",(function(t){i._touchEventHandler(t)})),this.registerAndAddEvent(this.overlaidCanvas,window.navigator.msPointerEnabled?"MSPointerMove":"touchmove",(function(t){i._touchEventHandler(t)})),this.registerAndAddEvent(this.overlaidCanvas,window.navigator.msPointerEnabled?"MSPointerUp":"touchend",(function(t){i._touchEventHandler(t)})),this.registerAndAddEvent(this.overlaidCanvas,window.navigator.msPointerEnabled?"MSPointerCancel":"touchcancel",(function(t){i._touchEventHandler(t)})),this._creditLink||(this._creditLink=document.createElement("a"),this._creditLink.setAttribute("class","canvasjs-chart-credit"),this._creditLink.setAttribute("style","outline:none;margin:0px;position:absolute;right:3px;top:"+(this.height-14)+"px;color:dimgrey;text-decoration:none;font-size:10px;font-family:Lucida Grande, Lucida Sans Unicode, Arial, sans-serif"),this._creditLink.setAttribute("tabIndex",-1),this._creditLink.setAttribute("target","_blank")),this._toolTip=new it(this,this._options.toolTip,this.theme),this.layoutManager=new J(this),this.data=null,this.axisX=null,this.axisY=null,this.axisY2=null,this.renderCount=0,this.sessionVariables={axisX:{internalMinimum:null,internalMaximum:null},axisY:{internalMinimum:null,internalMaximum:null},axisY2:{internalMinimum:null,internalMaximum:null}}}}else window.console&&window.console.log('CanvasJS Error: Chart Container with id "'+this._containerId+'" was not found')}function O(t,e){for(var i=[],a=0;a<t.length;a++)if(0!=a){var n,s,o;n=0===(o=a-1)?0:o-1;var r={x:(t[s=o===t.length-1?o:o+1].x-t[n].x)/e,y:(t[s].y-t[n].y)/e},l={x:t[o].x+r.x/3,y:t[o].y+r.y/3};i[i.length]=l,n=0===(o=a)?0:o-1;var h={x:(t[s=o===t.length-1?o:o+1].x-t[n].x)/e,y:(t[s].y-t[n].y)/e},d={x:t[o].x-h.x/3,y:t[o].y-h.y/3};i[i.length]=d,i[i.length]=t[a]}else i.push(t[0]);return i}W.prototype.setOptions=function(t,i){if(n[this._defaultsKey]){var a=n[this._defaultsKey];for(var s in a)this[s]=t&&s in t?t[s]:i&&s in i?i[s]:a[s]}else e},W.prototype.updateOption=function(t){this._defaultsKey;var e=n[this._defaultsKey],i=this._options.theme?this._options.theme:this.chart&&this.chart._options.theme?this.chart._options.theme:"theme1",a={},s=this[t];return i&&r[i]&&r[i][this._defaultsKey]&&(a=r[i][this._defaultsKey]),t in e&&(s=t in this._options?this._options[t]:a&&t in a?a[t]:e[t]),s!==this[t]&&(this[t]=s,!0)},W.prototype.trackChanges=function(t){this._options._oldOptions||(this._options._oldOptions={}),this._options._oldOptions[t]=this._options[t]},W.prototype.isBeingTracked=function(t){return this._options._oldOptions||(this._options._oldOptions={}),!!this._options._oldOptions[t]},W.prototype.hasOptionChanged=function(t){return this._options._oldOptions||(this._options._oldOptions={}),!(this._options._oldOptions[t]===this._options[t])},h(E,W),E.prototype._updateOptions=function(){var t=this;if(this.updateOption("width"),this.updateOption("height"),this.updateOption("theme"),this.updateOption("colorSet")&&(this._selectedColorSet=void 0!==o[this.colorSet]?o[this.colorSet]:o.colorSet1),this.updateOption("backgroundColor"))try{this.canvas.style.background!==this.backgroundColor&&(this.canvas.style.background=this.backgroundColor)}catch(t){}if(this.updateOption("animationEnabled"),this._options.zoomEnabled?(this._zoomButton||(this._zoomButton=document.createElement("button"),this._zoomButton.appendChild(document.createTextNode("Pan")),this._toolBar.appendChild(this._zoomButton),this.registerAndAddEvent(this._zoomButton,"click",(function(){t.zoomEnabled?(t.zoomEnabled=!1,t.panEnabled=!0,t._zoomButton.innerHTML=t._cultureInfo.zoomText):(t.zoomEnabled=!0,t.panEnabled=!1,t._zoomButton.innerHTML=t._cultureInfo.panText),t.render()}))),this._resetButton||(this._resetButton=document.createElement("button"),this._resetButton.appendChild(document.createTextNode("Reset")),this._toolBar.appendChild(this._resetButton),this.registerAndAddEvent(this._resetButton,"click",(function(){t._toolTip.hide(),t.zoomEnabled||t.panEnabled?(t.zoomEnabled=!0,t.panEnabled=!1,t._zoomButton.innerHTML=t._cultureInfo.panText,t._defaultCursor="default",t.overlaidCanvas.style.cursor=t._defaultCursor):(t.zoomEnabled=!1,t.panEnabled=!1),t._options.axisX&&t._options.axisX.minimum?t.sessionVariables.axisX.internalMinimum=t._options.axisX.minimum:t.sessionVariables.axisX.internalMinimum=null,t._options.axisX&&t._options.axisX.maximum?t.sessionVariables.axisX.internalMaximum=t._options.axisX.maximum:t.sessionVariables.axisX.internalMaximum=null,t.resetOverlayedCanvas(),t._toolBar.style.display="none",t.render()})),this.overlaidCanvas.style.cursor=t._defaultCursor),this.zoomEnabled||this.panEnabled||(this._zoomButton?(t._zoomButton.innerHTML===t._cultureInfo.zoomText?(this.panEnabled=!0,this.zoomEnabled=!1):(this.zoomEnabled=!0,this.panEnabled=!1),t._toolBar.style.display="inline"):(this.zoomEnabled=!0,this.panEnabled=!1))):(this.zoomEnabled=!1,this.panEnabled=!1),this.updateOption("culture"),this._cultureInfo=new nt(this,this._options.culture),"none"!==this._toolBar.style.display){var e=this.panEnabled?t._cultureInfo.zoomText:t._cultureInfo.panText;t._zoomButton.innerHTML!==e&&(t._zoomButton.innerHTML=e),t._resetButton.innerHTML!==t._cultureInfo.resetText&&(t._resetButton.innerHTML=t._cultureInfo.resetText)}var i=this.updateOption("creditText"),a=this.updateOption("creditHref");(0===this.renderCount||i||a)&&(this._creditLink.setAttribute("href",this.creditHref),this._creditLink.innerHTML=this.creditText),this.creditHref&&this.creditText?this._creditLink.parentElement||this._canvasJSContainer.appendChild(this._creditLink):this._creditLink.parentElement&&this._canvasJSContainer.removeChild(this._creditLink),this._options.toolTip&&this._toolTip._options!==this._options.toolTip&&(this._toolTip._options=this._options.toolTip),this._toolTip.updateOption("enabled"),this._toolTip.updateOption("shared"),this._toolTip.updateOption("animationEnabled"),this._toolTip.updateOption("borderColor"),this._toolTip.updateOption("content")},E.prototype._updateSize=function(){var t=0,e=0;return this._options.width?t=this.width:this.width=t=this._container.clientWidth>0?this._container.clientWidth:this.width,this._options.height?e=this.height:this.height=e=this._container.clientHeight>0?this._container.clientHeight:this.height,(this.canvas.width!==t*z||this.canvas.height!==e*z)&&(Y(this.canvas,t,e),Y(this.overlaidCanvas,t,e),Y(this._eventManager.ghostCanvas,t,e),!0)},E.prototype._initialize=function(){this.pieDoughnutClickHandler=null,this.animationRequestId&&this.cancelRequestAnimFrame.call(window,this.animationRequestId),this._updateOptions(),this._updateSize(),this.ctx.clearRect(0,0,this.width,this.height),this.ctx.beginPath(),this.axisX=null,this.axisY=null,this.axisY2=null,this._indexLabels=[],this._dataInRenderedOrder=[],this._events=[],this._eventManager&&this._eventManager.reset(),this.plotInfo={axisPlacement:null,axisXValueType:null,plotTypes:[]},this.layoutManager.reset(),this.data=[];for(var t=0,e=0;e<this._options.data.length;e++)if(t++,!this._options.data[e].type||E._supportedChartTypes.indexOf(this._options.data[e].type)>=0){var i=new $(this,this._options.data[e],this.theme,t-1,++this._eventManager.lastObjectId);null===i.color?this._options.data.length>1?(i._colorSet=[this._selectedColorSet[i.index%this._selectedColorSet.length]],i.color=this._selectedColorSet[i.index%this._selectedColorSet.length]):"line"===i.type||"stepLine"===i.type||"spline"===i.type||"area"===i.type||"stepArea"===i.type||"splineArea"===i.type||"stackedArea"===i.type||"stackedArea100"===i.type?i._colorSet=[this._selectedColorSet[0]]:i._colorSet=this._selectedColorSet:i._colorSet=[i.color],null===i.markerSize&&(("line"===i.type||"stepLine"===i.type||"spline"===i.type)&&i.dataPoints&&i.dataPoints.length<this.width/16||"scatter"===i.type)&&(i.markerSize=8),"bubble"!==i.type&&"scatter"!==i.type||!i.dataPoints||i.dataPoints.sort(u),this.data.push(i);var a,n=i.axisPlacement;if("normal"===n?"xySwapped"===this.plotInfo.axisPlacement?a='You cannot combine "'+i.type+'" with bar chart':"none"===this.plotInfo.axisPlacement?a='You cannot combine "'+i.type+'" with pie chart':null===this.plotInfo.axisPlacement&&(this.plotInfo.axisPlacement="normal"):"xySwapped"===n?"normal"===this.plotInfo.axisPlacement?a='You cannot combine "'+i.type+'" with line, area, column or pie chart':"none"===this.plotInfo.axisPlacement?a='You cannot combine "'+i.type+'" with pie chart':null===this.plotInfo.axisPlacement&&(this.plotInfo.axisPlacement="xySwapped"):"none"==n&&("normal"===this.plotInfo.axisPlacement?a='You cannot combine "'+i.type+'" with line, area, column or bar chart':"xySwapped"===this.plotInfo.axisPlacement?a='You cannot combine "'+i.type+'" with bar chart':null===this.plotInfo.axisPlacement&&(this.plotInfo.axisPlacement="none")),a&&window.console)return void window.console.log(a)}this._objectsInitialized=!0},E._supportedChartTypes=["line","stepLine","spline","column","area","stepArea","splineArea","bar","bubble","scatter","stackedColumn","stackedColumn100","stackedBar","stackedBar100","stackedArea","stackedArea100","pie","doughnut","funnel"],E._supportedChartTypes.indexOf||(E._supportedChartTypes.indexOf=function(t){var e=this.length>>>0,i=Number(arguments[1])||0;for((i=i<0?Math.ceil(i):Math.floor(i))<0&&(i+=e);i<e;i++)if(i in this&&this[i]===t)return i;return-1}),E.prototype.render=function(t){t&&(this._options=t),this._initialize();for(var e=0;e<this.data.length;e++)"normal"!==this.plotInfo.axisPlacement&&"xySwapped"!==this.plotInfo.axisPlacement||(this.data[e].axisYType&&"primary"!==this.data[e].axisYType?"secondary"===this.data[e].axisYType&&(this.axisY2||("normal"===this.plotInfo.axisPlacement?this.axisY2=new tt(this,this._options.axisY2,"axisY","right"):"xySwapped"===this.plotInfo.axisPlacement&&(this.axisY2=new tt(this,this._options.axisY2,"axisY","top"))),this.axisY2.isSecondaryAxis=!0,this.data[e].axisY=this.axisY2):(this.axisY||("normal"===this.plotInfo.axisPlacement?this.axisY=new tt(this,this._options.axisY,"axisY","left"):"xySwapped"===this.plotInfo.axisPlacement&&(this.axisY=new tt(this,this._options.axisY,"axisY","bottom"))),this.data[e].axisY=this.axisY),this.axisX||("normal"===this.plotInfo.axisPlacement?this.axisX=new tt(this,this._options.axisX,"axisX","bottom"):"xySwapped"===this.plotInfo.axisPlacement&&(this.axisX=new tt(this,this._options.axisX,"axisX","left"))),this.data[e].axisX=this.axisX);this._processData(),this._options.title&&(this._title=new K(this,this._options.title),this._title.render()),this.legend=new Z(this,this._options.legend,this.theme);for(e=0;e<this.data.length;e++)this.data[e].showInLegend&&this.legend.dataSeries.push(this.data[e]);if(this.legend.render(),"normal"===this.plotInfo.axisPlacement||"xySwapped"===this.plotInfo.axisPlacement){this.layoutManager.getFreeSpace();tt.setLayoutAndRender(this.axisX,this.axisY,this.axisY2,this.plotInfo.axisPlacement,this.layoutManager.getFreeSpace(),this.plotInfo.plotTypes[0].type)}else{if("none"!==this.plotInfo.axisPlacement)return;this.preparePlotArea()}for(e=0;e<this.plotInfo.plotTypes.length;e++)for(var i=this.plotInfo.plotTypes[e],a=0;a<i.plotUnits.length;a++){var n=i.plotUnits[a];"line"===n.type?this.renderLine(n):"stepLine"===n.type?this.renderStepLine(n):"spline"===n.type?this.renderSpline(n):"column"===n.type?this.renderColumn(n):"bar"===n.type?this.renderBar(n):"area"===n.type?this.renderArea(n):"funnel"===n.type?this.renderFunnel(n):"stepArea"===n.type?this.renderStepArea(n):"splineArea"===n.type?this.renderSplineArea(n):"stackedColumn"===n.type?this.renderStackedColumn(n):"stackedColumn100"===n.type?this.renderStackedColumn100(n):"stackedBar"===n.type?this.renderStackedBar(n):"stackedBar100"===n.type?this.renderStackedBar100(n):"stackedArea"===n.type?this.renderStackedArea(n):"stackedArea100"===n.type?this.renderStackedArea100(n):"bubble"===n.type?this.renderBubble(n):"scatter"===n.type?this.renderScatter(n):("pie"===n.type||"doughnut"===n.type)&&this.renderPie(n);for(var s=0;s<n.dataSeriesIndexes.length;s++)this._dataInRenderedOrder.push(this.data[n.dataSeriesIndexes[s]])}this._indexLabels.length>0&&this.renderIndexLabels(),this.attachPlotAreaEventHandlers(),this.zoomEnabled||this.panEnabled||"none"===this._toolBar.style.display||(this._toolBar.style.display="none"),this._toolTip._updateToolTip(),this.renderCount++},E.prototype.dispose=function(){for(;this.registeredEvent.length>0;){var t=this.registeredEvent.pop();t.obj.removeEventListener&&t.obj.removeEventListener(t.eventType,t.fn,t.useCapture)}},E.prototype.registeredEvent=null,E.prototype.registerAndAddEvent=function(t,e,i,a){var n={obj:t,eventType:e,fn:i,useCapture:a=a||!1};this.registeredEvent.push(n),function(t,e,i,a){if(t.addEventListener)t.addEventListener(e,i,a||!1);else{if(!t.attachEvent)return!1;t.attachEvent("on"+e,(function(e){(e=e||window.event).preventDefault=e.preventDefault||function(){e.returnValue=!1},e.stopPropagation=e.stopPropagation||function(){e.cancelBubble=!0},i.call(t,e)}))}}(t,e,i,a)},E.prototype.attachPlotAreaEventHandlers=function(){this.attachEvent({context:this,chart:this,mousedown:this._plotAreaMouseDown,mouseup:this._plotAreaMouseUp,mousemove:this._plotAreaMouseMove,cursor:this.zoomEnabled?"col-resize":"move",cursor:this.panEnabled?"move":"default",capture:!0,bounds:this.plotArea})},E.prototype.categoriseDataSeries=function(){for(var t="",e=0;e<this.data.length;e++)if((t=this.data[e]).dataPoints&&0!==t.dataPoints.length&&t.visible&&E._supportedChartTypes.indexOf(t.type)>=0){for(var i=null,a=!1,n=null,s=!1,o=0;o<this.plotInfo.plotTypes.length;o++)if(this.plotInfo.plotTypes[o].type===t.type){a=!0;i=this.plotInfo.plotTypes[o];break}a||(i={type:t.type,totalDataSeries:0,plotUnits:[]},this.plotInfo.plotTypes.push(i));for(o=0;o<i.plotUnits.length;o++)if(i.plotUnits[o].axisYType===t.axisYType){s=!0;n=i.plotUnits[o];break}s||(n={type:t.type,previousDataSeriesCount:0,index:i.plotUnits.length,plotType:i,axisYType:t.axisYType,axisY:"primary"===t.axisYType?this.axisY:this.axisY2,axisX:this.axisX,dataSeriesIndexes:[]},i.plotUnits.push(n)),i.totalDataSeries++,n.dataSeriesIndexes.push(e)}for(e=0;e<this.plotInfo.plotTypes.length;e++){i=this.plotInfo.plotTypes[e];var r=0;for(o=0;o<i.plotUnits.length;o++)i.plotUnits[o].previousDataSeriesCount=r,r+=i.plotUnits[o].dataSeriesIndexes.length}},E.prototype.assignIdToDataPoints=function(){for(var t=0;t<this.data.length;t++){var e=this.data[t];if(e.dataPoints)for(var i=e.dataPoints.length,a=0;a<i;a++)e.dataPointIds[a]=++this._eventManager.lastObjectId}},E.prototype._processData=function(){this.assignIdToDataPoints(),this.categoriseDataSeries();for(var t=0;t<this.plotInfo.plotTypes.length;t++)for(var e=this.plotInfo.plotTypes[t],i=0;i<e.plotUnits.length;i++){var a=e.plotUnits[i];"line"===a.type||"stepLine"===a.type||"spline"===a.type||"column"===a.type||"area"===a.type||"stepArea"===a.type||"splineArea"===a.type||"bar"===a.type||"bubble"===a.type||"scatter"===a.type?this._processMultiseriesPlotUnit(a):"stackedColumn"===a.type||"stackedBar"===a.type||"stackedArea"===a.type?this._processStackedPlotUnit(a):"stackedColumn100"!==a.type&&"funnel"!==a.type&&"stackedBar100"!==a.type&&"stackedArea100"!==a.type||this._processStacked100PlotUnit(a)}},E.prototype._processMultiseriesPlotUnit=function(t){if(t.dataSeriesIndexes&&!(t.dataSeriesIndexes.length<1))for(var e,i,a=t.axisY.dataInfo,n=t.axisX.dataInfo,s=!1,o=0;o<t.dataSeriesIndexes.length;o++){var r=this.data[t.dataSeriesIndexes[o]],l=0,h=!1,d=!1;if("normal"===r.axisPlacement||"xySwapped"===r.axisPlacement)var x=this.sessionVariables.axisX.internalMinimum?this.sessionVariables.axisX.internalMinimum:this._options.axisX&&this._options.axisX.minimum?this._options.axisX.minimum:-1/0,c=this.sessionVariables.axisX.internalMaximum?this.sessionVariables.axisX.internalMaximum:this._options.axisX&&this._options.axisX.maximum?this._options.axisX.maximum:1/0;for((r.dataPoints[l].x&&r.dataPoints[l].x.getTime||"dateTime"===r.xValueType)&&(s=!0),l=0;l<r.dataPoints.length;l++){if(void 0===r.dataPoints[l].x&&(r.dataPoints[l].x=l),r.dataPoints[l].x.getTime?(s=!0,e=r.dataPoints[l].x.getTime()):e=r.dataPoints[l].x,i=r.dataPoints[l].y,e<n.min&&(n.min=e),e>n.max&&(n.max=e),i<a.min&&(a.min=i),i>a.max&&(a.max=i),l>0){var m=e-r.dataPoints[l-1].x;m<0&&(m*=-1),n.minDiff>m&&0!==m&&(n.minDiff=m)}if(!(e<x)||h)if(!h&&(h=!0,l>0))l-=2;else{if(e>c&&!d)d=!0;else if(e>c&&d)continue;r.dataPoints[l].label&&(t.axisX.labels[e]=r.dataPoints[l].label),e<n.viewPortMin&&(n.viewPortMin=e),e>n.viewPortMax&&(n.viewPortMax=e),null!==i&&(i<a.viewPortMin&&(a.viewPortMin=i),i>a.viewPortMax&&(a.viewPortMax=i))}}this.plotInfo.axisXValueType=r.xValueType=s?"dateTime":"number"}},E.prototype._processStackedPlotUnit=function(t){if(t.dataSeriesIndexes&&!(t.dataSeriesIndexes.length<1)){for(var e,i,a=t.axisY.dataInfo,n=t.axisX.dataInfo,s=!1,o=[],r=[],l=0;l<t.dataSeriesIndexes.length;l++){var h=this.data[t.dataSeriesIndexes[l]],d=0,x=!1,c=!1;if("normal"===h.axisPlacement||"xySwapped"===h.axisPlacement)var m=this.sessionVariables.axisX.internalMinimum?this.sessionVariables.axisX.internalMinimum:this._options.axisX&&this._options.axisX.minimum?this._options.axisX.minimum:-1/0,p=this.sessionVariables.axisX.internalMaximum?this.sessionVariables.axisX.internalMaximum:this._options.axisX&&this._options.axisX.maximum?this._options.axisX.maximum:1/0;for((h.dataPoints[d].x&&h.dataPoints[d].x.getTime||"dateTime"===h.xValueType)&&(s=!0),d=0;d<h.dataPoints.length;d++){if(void 0===h.dataPoints[d].x&&(h.dataPoints[d].x=d),h.dataPoints[d].x.getTime?(s=!0,e=h.dataPoints[d].x.getTime()):e=h.dataPoints[d].x,i=h.dataPoints[d].y,e<n.min&&(n.min=e),e>n.max&&(n.max=e),d>0){var u=e-h.dataPoints[d-1].x;u<0&&(u*=-1),n.minDiff>u&&0!==u&&(n.minDiff=u)}if(!(e<m)||x)if(!x&&(x=!0,d>0))d-=2;else{if(e>p&&!c)c=!0;else if(e>p&&c)continue;h.dataPoints[d].label&&(t.axisX.labels[e]=h.dataPoints[d].label),e<n.viewPortMin&&(n.viewPortMin=e),e>n.viewPortMax&&(n.viewPortMax=e),null!==i&&(i>=0?o[e]?o[e]+=i:o[e]=i:r[e]?r[e]+=i:r[e]=i)}}this.plotInfo.axisXValueType=h.xValueType=s?"dateTime":"number"}for(d in o){if(!isNaN(d))(g=o[d])<a.min&&(a.min=g),g>a.max&&(a.max=g),d<n.viewPortMin||d>n.viewPortMax||(g<a.viewPortMin&&(a.viewPortMin=g),g>a.viewPortMax&&(a.viewPortMax=g))}for(d in r){var g;if(!isNaN(d))(g=r[d])<a.min&&(a.min=g),g>a.max&&(a.max=g),d<n.viewPortMin||d>n.viewPortMax||(g<a.viewPortMin&&(a.viewPortMin=g),g>a.viewPortMax&&(a.viewPortMax=g))}}},E.prototype._processStacked100PlotUnit=function(t){if(t.dataSeriesIndexes&&!(t.dataSeriesIndexes.length<1)){for(var e,i,a=t.axisY.dataInfo,n=t.axisX.dataInfo,s=!1,o=!1,r=!1,l=[],h=0;h<t.dataSeriesIndexes.length;h++){var d=this.data[t.dataSeriesIndexes[h]],x=0,c=!1,m=!1;if("normal"===d.axisPlacement||"xySwapped"===d.axisPlacement)var p=this.sessionVariables.axisX.internalMinimum?this.sessionVariables.axisX.internalMinimum:this._options.axisX&&this._options.axisX.minimum?this._options.axisX.minimum:-1/0,u=this.sessionVariables.axisX.internalMaximum?this.sessionVariables.axisX.internalMaximum:this._options.axisX&&this._options.axisX.maximum?this._options.axisX.maximum:1/0;for((d.dataPoints[x].x&&d.dataPoints[x].x.getTime||"dateTime"===d.xValueType)&&(s=!0),x=0;x<d.dataPoints.length;x++){if(void 0===d.dataPoints[x].x&&(d.dataPoints[x].x=x),d.dataPoints[x].x.getTime?(s=!0,e=d.dataPoints[x].x.getTime()):e=d.dataPoints[x].x,i=d.dataPoints[x].y,e<n.min&&(n.min=e),e>n.max&&(n.max=e),x>0){var g=e-d.dataPoints[x-1].x;g<0&&(g*=-1),n.minDiff>g&&0!==g&&(n.minDiff=g)}if(!(e<p)||c)if(!c&&(c=!0,x>0))x-=2;else{if(e>u&&!m)m=!0;else if(e>u&&m)continue;d.dataPoints[x].label&&(t.axisX.labels[e]=d.dataPoints[x].label),e<n.viewPortMin&&(n.viewPortMin=e),e>n.viewPortMax&&(n.viewPortMax=e),null!==i&&(i>=0?o=!0:r=!0,l[e]?l[e]+=Math.abs(i):l[e]=Math.abs(i))}}this.plotInfo.axisXValueType=d.xValueType=s?"dateTime":"number"}o&&!r?(a.max=99,a.min=1):o&&r?(a.max=99,a.min=-99):!o&&r&&(a.max=-1,a.min=-99),a.viewPortMin=a.min,a.viewPortMax=a.max,t.dataPointYSums=l}},E.prototype.getDataPointAtXY=function(t,e,i){i=i||!1;for(var a=[],n=this._dataInRenderedOrder.length-1;n>=0;n--){var s;(s=this._dataInRenderedOrder[n].getDataPointAtXY(t,e,i))&&a.push(s)}for(var o=null,r=!1,l=0;l<a.length;l++)if("line"===a[l].dataSeries.type||"stepLine"===a[l].dataSeries.type||"area"===a[l].dataSeries.type||"stepArea"===a[l].dataSeries.type){var h=X("markerSize",a[l].dataPoint,a[l].dataSeries)||8;if(a[l].distance<=h/2){r=!0;break}}for(l=0;l<a.length;l++)r&&"line"!==a[l].dataSeries.type&&"stepLine"!==a[l].dataSeries.type&&"area"!==a[l].dataSeries.type&&"stepArea"!==a[l].dataSeries.type||(o?a[l].distance<=o.distance&&(o=a[l]):o=a[l]);return o},E.prototype.getObjectAtXY=function(t,e,i){i=i||!1;var n=null,s=this.getDataPointAtXY(t,e,i);if(s)n=s.dataSeries.dataPointIds[s.dataPointIndex];else if(a)n=A(t,e,this._eventManager.ghostCtx);else for(var o=0;o<this.legend.items.length;o++){var r=this.legend.items[o];t>=r.x1&&t<=r.x2&&e>=r.y1&&e<=r.y2&&(n=r.id)}return n},E.prototype.getAutoFontSize=function(t,e,i){e=e||this.width,i=i||this.height;var a=t/400;return Math.round(Math.min(this.width,this.height)*a)},E.prototype.resetOverlayedCanvas=function(){this.overlaidCanvasCtx.clearRect(0,0,this.width,this.height)},E.prototype.attachEvent=function(t){this._events.push(t)},E.prototype._touchEventHandler=function(t){if(t.changedTouches&&this.interactivityEnabled){var e=[],i=t.changedTouches,a=i?i[0]:t,n=null;switch(t.type){case"touchstart":case"MSPointerDown":e=["mousemove","mousedown"],this._lastTouchData=I(a),this._lastTouchData.time=new Date;break;case"touchmove":case"MSPointerMove":e=["mousemove"];break;case"touchend":case"MSPointerUp":if("touchstart"===this._lastTouchEventType||"MSPointerDown"===this._lastTouchEventType)e=["mouseup","click"];else if("touchmove"===this._lastTouchEventType||"MSPointerMove"===this._lastTouchEventType){var s=I(a),o=s.y-this._lastTouchData.y,r=s.x-this._lastTouchData.x;e=Math.abs(o)<15&&Math.abs(r)<15?["mouseup","click"]:["mouseup"]}else e=["mouseup"];break;default:return}if(!(i&&i.length>1)){(n=I(a)).time=new Date;try{o=n.y-this._lastTouchData.y,r=n.x-this._lastTouchData.x;var l=n.time-this._lastTouchData.time;if(Math.abs(o)>15&&(this._lastTouchData.scroll||l<200)){this._lastTouchData.scroll=!0;var h=window.parent||window;h&&h.scrollBy&&h.scrollBy(0,-o)}}catch(t){}if(this._lastTouchEventType=t.type,this._lastTouchData.scroll&&this.zoomEnabled)return this.isDrag&&this.resetOverlayedCanvas(),void(this.isDrag=!1);for(var d=0;d<e.length;d++){var x=e[d],c=document.createEvent("MouseEvent");c.initMouseEvent(x,!0,!0,window,1,a.screenX,a.screenY,a.clientX,a.clientY,!1,!1,!1,!1,0,null),a.target.dispatchEvent(c),t.preventManipulation&&t.preventManipulation(),t.preventDefault&&t.preventDefault()}}}},E.prototype._mouseEventHandler=function(t){if(this.interactivityEnabled){t.preventManipulation&&t.preventManipulation(),t.preventDefault&&t.preventDefault(),void 0===t.target&&t.srcElement&&(t.target=t.srcElement);var e,i,a=I(t),n=t.type;if(!t)window.event;if(t.which?i=3==t.which:t.button&&(i=2==t.button),!i){if(E.capturedEventParam)e=E.capturedEventParam,"mouseup"===n&&(E.capturedEventParam=null,e.chart.overlaidCanvas.releaseCapture?e.chart.overlaidCanvas.releaseCapture():document.body.removeEventListener("mouseup",e.chart._mouseEventHandler,!1)),e.hasOwnProperty(n)&&e[n].call(e.context,a.x,a.y);else if(this._events){for(var s=0;s<this._events.length;s++)if(this._events[s].hasOwnProperty(n)){var o=(e=this._events[s]).bounds;if(a.x>=o.x1&&a.x<=o.x2&&a.y>=o.y1&&a.y<=o.y2){e[n].call(e.context,a.x,a.y),"mousedown"===n&&!0===e.capture?(E.capturedEventParam=e,this.overlaidCanvas.setCapture?this.overlaidCanvas.setCapture():document.body.addEventListener("mouseup",this._mouseEventHandler,!1)):"mouseup"===n&&(e.chart.overlaidCanvas.releaseCapture?e.chart.overlaidCanvas.releaseCapture():document.body.removeEventListener("mouseup",this._mouseEventHandler,!1));break}e=null}e&&e.cursor?t.target.style.cursor=e.cursor:t.target.style.cursor=this._defaultCursor}if(this._toolTip&&this._toolTip.enabled){var r=this.plotArea;(a.x<r.x1||a.x>r.x2||a.y<r.y1||a.y>r.y2)&&this._toolTip.hide()}this.isDrag&&this.zoomEnabled||!this._eventManager||this._eventManager.mouseEventHandler(t)}}},E.prototype._plotAreaMouseDown=function(t,e){this.isDrag=!0,"none"!==this.plotInfo.axisPlacement?this.dragStartPoint={x:t,y:e,xMinimum:this.axisX.minimum,xMaximum:this.axisX.maximum}:this.dragStartPoint={x:t,y:e}},E.prototype._plotAreaMouseUp=function(t,e){if(("normal"===this.plotInfo.axisPlacement||"xySwapped"===this.plotInfo.axisPlacement)&&this.isDrag){var i=0,a=this.axisX.lineCoordinates;if("xySwapped"===this.plotInfo.axisPlacement?(i=e-this.dragStartPoint.y,Math.abs(this.axisX.maximum-this.axisX.minimum)/a.height*i):(i=this.dragStartPoint.x-t,Math.abs(this.axisX.maximum-this.axisX.minimum)/a.width*i),Math.abs(i)>2){if(this.panEnabled){var n=!1,s=0;this.axisX.sessionVariables.internalMinimum<this.axisX._absoluteMinimum?(s=this.axisX._absoluteMinimum-this.axisX.sessionVariables.internalMinimum,this.axisX.sessionVariables.internalMinimum+=s,this.axisX.sessionVariables.internalMaximum+=s,n=!0):this.axisX.sessionVariables.internalMaximum>this.axisX._absoluteMaximum&&(s=this.axisX.sessionVariables.internalMaximum-this.axisX._absoluteMaximum,this.axisX.sessionVariables.internalMaximum-=s,this.axisX.sessionVariables.internalMinimum-=s,n=!0),n&&this.render()}else if(this.zoomEnabled){if(this.resetOverlayedCanvas(),!this.dragStartPoint)return;if("xySwapped"===this.plotInfo.axisPlacement){var o={y1:Math.min(this.dragStartPoint.y,e),y2:Math.max(this.dragStartPoint.y,e)};if(Math.abs(o.y1-o.y2)>1){a=this.axisX.lineCoordinates;var r=this.axisX.maximum-(this.axisX.maximum-this.axisX.minimum)/a.height*(o.y2-a.y1),l=this.axisX.maximum-(this.axisX.maximum-this.axisX.minimum)/a.height*(o.y1-a.y1);r=Math.max(r,this.axisX.dataInfo.min),l=Math.min(l,this.axisX.dataInfo.max),Math.abs((l-r)/this.axisX.dataInfo.minDiff)>=.008*this.height&&(this.axisX.sessionVariables.internalMinimum=r,this.axisX.sessionVariables.internalMaximum=l,this.render())}}else if("normal"===this.plotInfo.axisPlacement){o={x1:Math.min(this.dragStartPoint.x,t),x2:Math.max(this.dragStartPoint.x,t)};if(Math.abs(o.x1-o.x2)>1){a=this.axisX.lineCoordinates,r=(this.axisX.maximum-this.axisX.minimum)/a.width*(o.x1-a.x1)+this.axisX.minimum,l=(this.axisX.maximum-this.axisX.minimum)/a.width*(o.x2-a.x1)+this.axisX.minimum;r=Math.max(r,this.axisX.dataInfo.min),l=Math.min(l,this.axisX.dataInfo.max),Math.abs((l-r)/this.axisX.dataInfo.minDiff)>=.01*this.width&&(this.axisX.sessionVariables.internalMinimum=r,this.axisX.sessionVariables.internalMaximum=l,this.render())}}}this.zoomEnabled&&"none"===this._toolBar.style.display&&(this._toolBar.style.display="inline",this._zoomButton.innerHTML=this._cultureInfo.panText,this._resetButton.innerHTML=this._cultureInfo.resetText)}}this.isDrag=!1},E.prototype._plotAreaMouseMove=function(t,e){if(this.isDrag&&"none"!==this.plotInfo.axisPlacement){var i=0,a=0,n=this.axisX.lineCoordinates;if("xySwapped"===this.plotInfo.axisPlacement?(i=e-this.dragStartPoint.y,a=Math.abs(this.axisX.maximum-this.axisX.minimum)/n.height*i):(i=this.dragStartPoint.x-t,a=Math.abs(this.axisX.maximum-this.axisX.minimum)/n.width*i),Math.abs(i)>2&&Math.abs(i)<8&&(this.panEnabled||this.zoomEnabled)?this._toolTip.hide():!this._toolTip.enabled||this.panEnabled||this.zoomEnabled||this._toolTip.mouseMoveHandler(t,e),Math.abs(i)>2&&(this.panEnabled||this.zoomEnabled))if(this.panEnabled){this.axisX.sessionVariables.internalMinimum=this.dragStartPoint.xMinimum+a,this.axisX.sessionVariables.internalMaximum=this.dragStartPoint.xMaximum+a;var s=0;this.axisX.sessionVariables.internalMinimum<this.axisX._absoluteMinimum-x(this.axisX.interval,this.axisX.intervalType)?(s=this.axisX._absoluteMinimum-x(this.axisX.interval,this.axisX.intervalType)-this.axisX.sessionVariables.internalMinimum,this.axisX.sessionVariables.internalMinimum+=s,this.axisX.sessionVariables.internalMaximum+=s):this.axisX.sessionVariables.internalMaximum>this.axisX._absoluteMaximum+x(this.axisX.interval,this.axisX.intervalType)&&(s=this.axisX.sessionVariables.internalMaximum-(this.axisX._absoluteMaximum+x(this.axisX.interval,this.axisX.intervalType)),this.axisX.sessionVariables.internalMaximum-=s,this.axisX.sessionVariables.internalMinimum-=s);var o=this;clearTimeout(this._panTimerId),this._panTimerId=setTimeout((function(){o.render()}),0)}else if(this.zoomEnabled){var r=this.plotArea;this.resetOverlayedCanvas();var l=this.overlaidCanvasCtx.globalAlpha;this.overlaidCanvasCtx.globalAlpha=.7,this.overlaidCanvasCtx.fillStyle="#A0ABB8","xySwapped"===this.plotInfo.axisPlacement?this.overlaidCanvasCtx.fillRect(r.x1,this.dragStartPoint.y,r.x2-r.x1,e-this.dragStartPoint.y):"normal"===this.plotInfo.axisPlacement&&this.overlaidCanvasCtx.fillRect(this.dragStartPoint.x,r.y1,t-this.dragStartPoint.x,r.y2-r.y1),this.overlaidCanvasCtx.globalAlpha=l}}else this._toolTip.enabled&&this._toolTip.mouseMoveHandler(t,e)},E.prototype.preparePlotArea=function(){var t=this.plotArea,e=this.axisY?this.axisY:this.axisY2;if(!a&&(t.x1>0||t.y1>0)&&t.ctx.translate(t.x1,t.y1),this.axisX&&e)t.x1=this.axisX.lineCoordinates.x1<this.axisX.lineCoordinates.x2?this.axisX.lineCoordinates.x1:e.lineCoordinates.x1,t.y1=this.axisX.lineCoordinates.y1<e.lineCoordinates.y1?this.axisX.lineCoordinates.y1:e.lineCoordinates.y1,t.x2=this.axisX.lineCoordinates.x2>e.lineCoordinates.x2?this.axisX.lineCoordinates.x2:e.lineCoordinates.x2,t.y2=this.axisX.lineCoordinates.y2>this.axisX.lineCoordinates.y1?this.axisX.lineCoordinates.y2:e.lineCoordinates.y2,t.width=t.x2-t.x1,t.height=t.y2-t.y1;else{var i=this.layoutManager.getFreeSpace();t.x1=i.x1,t.x2=i.x2,t.y1=i.y1,t.y2=i.y2,t.width=i.width,t.height=i.height}a||(t.canvas.width=t.width,t.canvas.height=t.height,t.canvas.style.left=t.x1+"px",t.canvas.style.top=t.y1+"px",(t.x1>0||t.y1>0)&&t.ctx.translate(-t.x1,-t.y1))},E.prototype.getPixelCoordinatesOnPlotArea=function(t,e){return{x:this.axisX.getPixelCoordinatesOnAxis(t).x,y:this.axisY.getPixelCoordinatesOnAxis(e).y}},E.prototype.renderIndexLabels=function(){var t=this.plotArea.ctx;t.textBaseline="middle";for(var e=this.plotArea,i=0;i<this._indexLabels.length;i++){var a,n,s=this._indexLabels[i];t.fillStyle=X("indexLabelFontColor",s.dataPoint,s.dataSeries),t.font=L("indexLabel",s.dataPoint,s.dataSeries);var o=this.replaceKeywordsWithValue(X("indexLabel",s.dataPoint,s.dataSeries),s.dataPoint,s.dataSeries),r={width:t.measureText(o).width,height:X("indexLabelFontSize",s.dataPoint,s.dataSeries)},l=X("indexLabelPlacement",s.dataPoint,s.dataSeries),h=X("indexLabelOrientation",s.dataPoint,s.dataSeries),d=0,x=0,c=0,m=0,p=0;if(!(s.point.x<e.x1||s.point.x>e.x2||s.point.y<e.y1||s.point.y>e.y2)){if("column"===s.chartType||"stackedColumn"===s.chartType||"stackedColumn100"===s.chartType||"funnel"===s.chartType||"bar"===s.chartType||"stackedBar"===s.chartType||"stackedBar100"===s.chartType){Math.abs(s.bounds.x1,s.bounds.x2),Math.abs(s.bounds.y1,s.bounds.y2);"normal"===this.plotInfo.axisPlacement?("outside"===l?(x=e.y1,c=e.y2):"inside"===l&&(x=s.bounds.y1,c=s.bounds.y2),"horizontal"===h?(a=s.point.x-r.width/2,n=s.dataPoint.y>=0?Math.min(Math.max(s.point.y-r.height/2-5,x+r.height/2+5),c-r.height/2-5):Math.max(Math.min(s.point.y+r.height/2+5,c-r.height/2),x+r.height/2+5)):"vertical"===h&&(a=s.point.x,n=s.dataPoint.y>=0?Math.min(Math.max(s.point.y-5,x+r.width+5),c):Math.max(Math.min(s.point.y+r.width+5,c-5),x),d=-90)):"xySwapped"===this.plotInfo.axisPlacement&&("outside"===l?(m=e.x1,p=e.x2):"inside"===l&&(m=s.bounds.x1,p=s.bounds.x2),"horizontal"===h?(n=s.point.y,a=s.dataPoint.y>=0?Math.max(Math.min(s.point.x+5,p-r.width),m):Math.min(Math.max(s.point.x-r.width-5,m),p)):"vertical"===h&&(n=s.point.y+r.width/2,a=s.dataPoint.y>=0?Math.max(Math.min(s.point.x+r.height/2+5,p-r.height/2),m):Math.min(Math.max(s.point.x-r.height/2-5,m+r.height/2),p+r.height/2),d=-90))}else"horizontal"===h?(a=s.point.x-r.width/2,n=s.dataPoint.y>=0?Math.max(s.point.y-r.height/2-5,e.y1+r.height/2):Math.min(s.point.y+r.height/2+5,e.y2-r.height/2)):"vertical"===h&&(a=s.point.x,n=s.dataPoint.y>=0?Math.max(s.point.y-5,e.y1+r.width):Math.min(s.point.y+r.width+5,e.y2),d=-90);t.save(),t.translate(a,n),t.rotate(Math.PI/180*d),t.fillText(o,0,0),t.restore()}}},E.prototype.renderLine=function(t){var e=this.plotArea.ctx;if(!(t.dataSeriesIndexes.length<=0)){var i=this._eventManager.ghostCtx;e.save();var n=this.plotArea;e.beginPath(),e.rect(n.x1,n.y1,n.width,n.height),e.clip();for(var s=[],o=0;o<t.dataSeriesIndexes.length;o++){var r=t.dataSeriesIndexes[o],l=this.data[r];e.lineWidth=l.lineThickness;var h=l.dataPoints,d=l.id;this._eventManager.objectMap[d]={objectType:"dataSeries",dataSeriesIndex:r};var x=g(d);i.strokeStyle=x,i.lineWidth=l.lineThickness>0?Math.max(l.lineThickness,4):0;var c=l._colorSet[0];e.strokeStyle=c;var m,p,u,v=!0,y=0;if(e.beginPath(),h.length>0){var b=!1;for(y=0;y<h.length;y++)if(!((u=h[y].x.getTime?h[y].x.getTime():h[y].x)<t.axisX.dataInfo.viewPortMin||u>t.axisX.dataInfo.viewPortMax))if("number"==typeof h[y].y){m=t.axisX.conversionParameters.reference+t.axisX.conversionParameters.pixelPerUnit*(u-t.axisX.conversionParameters.minimum)+.5<<0,p=t.axisY.conversionParameters.reference+t.axisY.conversionParameters.pixelPerUnit*(h[y].y-t.axisY.conversionParameters.minimum)+.5<<0;var f=l.dataPointIds[y];if(this._eventManager.objectMap[f]={id:f,objectType:"dataPoint",dataSeriesIndex:r,dataPointIndex:y,x1:m,y1:p},v||b?(e.beginPath(),e.moveTo(m,p),a&&(i.beginPath(),i.moveTo(m,p)),v=!1,b=!1):(e.lineTo(m,p),a&&i.lineTo(m,p),y%500==0&&(e.stroke(),e.beginPath(),e.moveTo(m,p),a&&(i.stroke(),i.beginPath(),i.moveTo(m,p)))),h[y].markerSize>0||l.markerSize>0){var P=l.getMarkerProperties(y,m,p,e);s.push(P),(!l.maxWidthInX||P.size>l.maxWidthInX)&&(l.maxWidthInX=P.size/(t.axisX.conversionParameters.pixelPerUnit>1?t.axisX.conversionParameters.pixelPerUnit-1:t.axisX.conversionParameters.pixelPerUnit));var T=g(f);a&&s.push({x:m,y:p,ctx:i,type:P.type,size:P.size,color:T,borderColor:T,borderThickness:P.borderThickness})}(h[y].indexLabel||l.indexLabel)&&this._indexLabels.push({chartType:"line",dataPoint:h[y],dataSeries:l,point:{x:m,y:p},color:c})}else y>0&&(e.stroke(),a&&i.stroke()),b=!0;e.stroke(),a&&i.stroke()}}st.drawMarkers(s),e.restore(),e.beginPath(),a&&i.beginPath()}},E.prototype.renderStepLine=function(t){var e=this.plotArea.ctx;if(!(t.dataSeriesIndexes.length<=0)){var i=this._eventManager.ghostCtx;e.save();var n=this.plotArea;e.beginPath(),e.rect(n.x1,n.y1,n.width,n.height),e.clip();for(var s=[],o=0;o<t.dataSeriesIndexes.length;o++){var r=t.dataSeriesIndexes[o],l=this.data[r];e.lineWidth=l.lineThickness;var h=l.dataPoints,d=l.id;this._eventManager.objectMap[d]={objectType:"dataSeries",dataSeriesIndex:r};var x=g(d);i.strokeStyle=x,i.lineWidth=l.lineThickness>0?Math.max(l.lineThickness,4):0;var c=l._colorSet[0];e.strokeStyle=c;var m,p,u,v=!0,y=0;if(e.beginPath(),h.length>0){var b=!1;for(y=0;y<h.length;y++)if(!((u=h[y].getTime?h[y].x.getTime():h[y].x)<t.axisX.dataInfo.viewPortMin||u>t.axisX.dataInfo.viewPortMax))if("number"==typeof h[y].y){var f=p;m=t.axisX.conversionParameters.reference+t.axisX.conversionParameters.pixelPerUnit*(u-t.axisX.conversionParameters.minimum)+.5<<0,p=t.axisY.conversionParameters.reference+t.axisY.conversionParameters.pixelPerUnit*(h[y].y-t.axisY.conversionParameters.minimum)+.5<<0;var P=l.dataPointIds[y];if(this._eventManager.objectMap[P]={id:P,objectType:"dataPoint",dataSeriesIndex:r,dataPointIndex:y,x1:m,y1:p},v||b?(e.beginPath(),e.moveTo(m,p),a&&(i.beginPath(),i.moveTo(m,p)),v=!1,b=!1):(e.lineTo(m,f),a&&i.lineTo(m,f),e.lineTo(m,p),a&&i.lineTo(m,p),y%500==0&&(e.stroke(),e.beginPath(),e.moveTo(m,p),a&&(i.stroke(),i.beginPath(),i.moveTo(m,p)))),h[y].markerSize>0||l.markerSize>0){var T=l.getMarkerProperties(y,m,p,e);s.push(T),(!l.maxWidthInX||T.size>l.maxWidthInX)&&(l.maxWidthInX=T.size/(t.axisX.conversionParameters.pixelPerUnit>1?t.axisX.conversionParameters.pixelPerUnit-1:t.axisX.conversionParameters.pixelPerUnit));var M=g(P);a&&s.push({x:m,y:p,ctx:i,type:T.type,size:T.size,color:M,borderColor:M,borderThickness:T.borderThickness})}(h[y].indexLabel||l.indexLabel)&&this._indexLabels.push({chartType:"stepLine",dataPoint:h[y],dataSeries:l,point:{x:m,y:p},color:c})}else y>0&&(e.stroke(),a&&i.stroke()),b=!0;e.stroke(),a&&i.stroke()}}st.drawMarkers(s),e.restore(),e.beginPath(),a&&i.beginPath()}},E.prototype.renderSpline=function(t){var e=this.plotArea.ctx;if(!(t.dataSeriesIndexes.length<=0)){var i=this._eventManager.ghostCtx;e.save();var n=this.plotArea;e.beginPath(),e.rect(n.x1,n.y1,n.width,n.height),e.clip();for(var s=[],o=0;o<t.dataSeriesIndexes.length;o++){var r=t.dataSeriesIndexes[o],l=this.data[r];e.lineWidth=l.lineThickness;var h=l.dataPoints,d=l.id;this._eventManager.objectMap[d]={objectType:"dataSeries",dataSeriesIndex:r};var x=g(d);i.strokeStyle=x,i.lineWidth=l.lineThickness>0?Math.max(l.lineThickness,4):0;var c=l._colorSet[0];e.strokeStyle=c;var m,p,u,v=0,y=[];if(e.beginPath(),h.length>0)for(v=0;v<h.length;v++)if(!((u=h[v].getTime?h[v].x.getTime():h[v].x)<t.axisX.dataInfo.viewPortMin||u>t.axisX.dataInfo.viewPortMax))if("number"==typeof h[v].y){m=t.axisX.conversionParameters.reference+t.axisX.conversionParameters.pixelPerUnit*(u-t.axisX.conversionParameters.minimum)+.5<<0,p=t.axisY.conversionParameters.reference+t.axisY.conversionParameters.pixelPerUnit*(h[v].y-t.axisY.conversionParameters.minimum)+.5<<0;var b=l.dataPointIds[v];if(this._eventManager.objectMap[b]={id:b,objectType:"dataPoint",dataSeriesIndex:r,dataPointIndex:v,x1:m,y1:p},y[y.length]={x:m,y:p},h[v].markerSize>0||l.markerSize>0){var f=l.getMarkerProperties(v,m,p,e);s.push(f),(!l.maxWidthInX||f.size>l.maxWidthInX)&&(l.maxWidthInX=f.size/(t.axisX.conversionParameters.pixelPerUnit>1?t.axisX.conversionParameters.pixelPerUnit-1:t.axisX.conversionParameters.pixelPerUnit));var P=g(b);a&&s.push({x:m,y:p,ctx:i,type:f.type,size:f.size,color:P,borderColor:P,borderThickness:f.borderThickness})}(h[v].indexLabel||l.indexLabel)&&this._indexLabels.push({chartType:"spline",dataPoint:h[v],dataSeries:l,point:{x:m,y:p},color:c})}else v>0&&(T(y),y=[]);T(y)}st.drawMarkers(s),e.restore(),e.beginPath(),a&&i.beginPath()}function T(t){var n=O(t,2);if(n.length>0){e.beginPath(),a&&i.beginPath(),e.moveTo(n[0].x,n[0].y),a&&i.moveTo(n[0].x,n[0].y);for(var s=0;s<n.length-3;s+=3)e.bezierCurveTo(n[s+1].x,n[s+1].y,n[s+2].x,n[s+2].y,n[s+3].x,n[s+3].y),a&&i.bezierCurveTo(n[s+1].x,n[s+1].y,n[s+2].x,n[s+2].y,n[s+3].x,n[s+3].y),s>0&&s%3e3==0&&(e.stroke(),e.beginPath(),e.moveTo(n[s+3].x,n[s+3].y),a&&(i.stroke(),i.beginPath(),i.moveTo(n[s+3].x,n[s+3].y)));e.stroke(),a&&i.stroke()}}};var U=function(t,e,i,a,n,s){t.clip(),t.beginPath(),t.translate(e-a,i-n),t.scale(a,n),t.arc(1,1,1,0,2*Math.PI,!1),t.save(),t.fillStyle=s,t.fill()},V=function(t,e){var i=parseInt(t.slice(1),16),a=Math.round(2.55*e),n=(i>>16)+a,s=(i>>8&255)+a,o=(255&i)+a;return"#"+(16777216+65536*(n<255?n<1?0:n:255)+256*(s<255?s<1?0:s:255)+(o<255?o<1?0:o:255)).toString(16).slice(1)},H=function(t,e,i,a,n,s,o,r,l,h,d,x){t.beginPath(),t.moveTo(e,i),t.save(),t.fillStyle=s,t.beginPath(),t.moveTo(r,i),t.lineTo(o,i),t.lineTo(a,n),t.lineTo(e,n),t.lineTo(r,i),t.closePath(),t.fill(),t.restore()},j=function(t,e,i,a,n,s,o){var r=s;t.beginPath(),t.moveTo(e,i),t.save(),t.fillStyle=r,t.lineTo(a,i),t.lineTo(o,n),t.fill()},R=function(t,e,i,a,n,s,o,r,l,h){var d=e,x=a,c=i,m=n;if(a-e>15&&n-i>15)var p=8;else p=.35*Math.min(a-e,n-i);var u,g="rgba(255, 255, 255, .4)",v="rgba(255, 255, 255, 0.1)",y=s;(t.beginPath(),t.moveTo(e,i),t.save(),t.fillStyle=y,t.fillRect(e,i,a-e,n-i),t.restore(),!0===o)&&(t.save(),t.beginPath(),t.moveTo(e,i),t.lineTo(e+p,i+p),t.lineTo(a-p,i+p),t.lineTo(a,i),t.closePath(),(u=t.createLinearGradient((a+e)/2,c+p,(a+e)/2,c)).addColorStop(0,y),u.addColorStop(1,g),t.fillStyle=u,t.fill(),t.restore());!0===r&&(t.save(),t.beginPath(),t.moveTo(e,n),t.lineTo(e+p,n-p),t.lineTo(a-p,n-p),t.lineTo(a,n),t.closePath(),(u=t.createLinearGradient((a+e)/2,m-p,(a+e)/2,m)).addColorStop(0,y),u.addColorStop(1,g),t.fillStyle=u,t.fill(),t.restore());!0===l&&(t.save(),t.beginPath(),t.moveTo(e,i),t.lineTo(e+p,i+p),t.lineTo(e+p,n-p),t.lineTo(e,n),t.closePath(),(u=t.createLinearGradient(d+p,(n+i)/2,d,(n+i)/2)).addColorStop(0,y),u.addColorStop(1,v),t.fillStyle=u,t.fill(),t.restore());!0===h&&(t.save(),t.beginPath(),t.moveTo(a,i),t.lineTo(a-p,i+p),t.lineTo(a-p,n-p),t.lineTo(a,n),(u=t.createLinearGradient(x-p,(n+i)/2,x,(n+i)/2)).addColorStop(0,y),u.addColorStop(1,v),t.fillStyle=u,u.addColorStop(0,y),u.addColorStop(1,v),t.fillStyle=u,t.fill(),t.closePath(),t.restore())};E.prototype.renderColumn=function(t){var e=this.plotArea.ctx;if(!(t.dataSeriesIndexes.length<=0)){var i,n,s,o=null,r=this.plotArea,l=0,h=t.axisY.conversionParameters.reference+t.axisY.conversionParameters.pixelPerUnit*(0-t.axisY.conversionParameters.minimum)<<0,d=Math.min(.15*this.width,this.plotArea.width/t.plotType.totalDataSeries*.9)<<0,x=t.axisX.dataInfo.minDiff,c=r.width/Math.abs(t.axisX.maximum-t.axisX.minimum)*Math.abs(x)/t.plotType.totalDataSeries*.9<<0;c>d||x===1/0?c=d:c<1&&(c=1),e.save(),a&&this._eventManager.ghostCtx.save(),e.beginPath(),e.rect(r.x1,r.y1,r.width,r.height),e.clip(),a&&(this._eventManager.ghostCtx.rect(r.x1,r.y1,r.width,r.height),this._eventManager.ghostCtx.clip());for(var m=0;m<t.dataSeriesIndexes.length;m++){var p=t.dataSeriesIndexes[m],u=this.data[p],v=u.dataPoints;if(u.maxWidthInX=c/(t.axisX.conversionParameters.pixelPerUnit>1?t.axisX.conversionParameters.pixelPerUnit-1:t.axisX.conversionParameters.pixelPerUnit),v.length>0){var y=!!(c>5&&u.bevelEnabled);for(l=0;l<v.length;l++)if(!((s=v[l].getTime?v[l].x.getTime():v[l].x)<t.axisX.dataInfo.viewPortMin||s>t.axisX.dataInfo.viewPortMax)&&"number"==typeof v[l].y){i=t.axisX.conversionParameters.reference+t.axisX.conversionParameters.pixelPerUnit*(s-t.axisX.conversionParameters.minimum)+.5<<0,n=t.axisY.conversionParameters.reference+t.axisY.conversionParameters.pixelPerUnit*(v[l].y-t.axisY.conversionParameters.minimum)+.5<<0;var b,f,P=i-t.plotType.totalDataSeries*c/2+(t.previousDataSeriesCount+m)*c<<0,T=P+c<<0;if(v[l].y>=0){if((b=n)>(f=h)){f=b=f}}else if((b=h)>(f=n)){f=b=f}o=v[l].color?v[l].color:u._colorSet[l%u._colorSet.length],R(e,P,b,T,f,o,y&&v[l].y>=0,v[l].y<0&&y,!1,!1);var M=u.dataPointIds[l];this._eventManager.objectMap[M]={id:M,objectType:"dataPoint",dataSeriesIndex:p,dataPointIndex:l,x1:P,y1:b,x2:T,y2:f},o=g(M),a&&R(this._eventManager.ghostCtx,P,b,T,f,o,!1,!1,!1,!1),(v[l].indexLabel||u.indexLabel)&&this._indexLabels.push({chartType:"column",dataPoint:v[l],dataSeries:u,point:{x:P+(T-P)/2,y:v[l].y>=0?b:f},bounds:{x1:P,y1:Math.min(b,f),x2:T,y2:Math.max(b,f)},color:o})}}}e.restore(),a&&this._eventManager.ghostCtx.restore()}},E.prototype.renderStackedColumn=function(t){var e=this.plotArea.ctx;if(!(t.dataSeriesIndexes.length<=0)){var i,n,s,o=null,r=this.plotArea,l=[],h=[],d=0,x=t.axisY.conversionParameters.reference+t.axisY.conversionParameters.pixelPerUnit*(0-t.axisY.conversionParameters.minimum)<<0,c=.15*this.width<<0,m=t.axisX.dataInfo.minDiff,p=r.width/Math.abs(t.axisX.maximum-t.axisX.minimum)*Math.abs(m)/t.plotType.plotUnits.length*.9<<0;p>c||m===1/0?p=c:p<1&&(p=1),e.save(),a&&this._eventManager.ghostCtx.save(),e.beginPath(),e.rect(r.x1,r.y1,r.width,r.height),e.clip(),a&&(this._eventManager.ghostCtx.rect(r.x1,r.y1,r.width,r.height),this._eventManager.ghostCtx.clip());for(var u=0;u<t.dataSeriesIndexes.length;u++){var v=t.dataSeriesIndexes[u],y=this.data[v],b=y.dataPoints;if(y.maxWidthInX=p/(t.axisX.conversionParameters.pixelPerUnit>1?t.axisX.conversionParameters.pixelPerUnit-1:t.axisX.conversionParameters.pixelPerUnit),b.length>0){var f=!!(p>5&&y.bevelEnabled);for(e.strokeStyle="#4572A7 ",d=0;d<b.length;d++)if(!((s=b[d].x.getTime?b[d].x.getTime():b[d].x)<t.axisX.dataInfo.viewPortMin||s>t.axisX.dataInfo.viewPortMax)&&"number"==typeof b[d].y){i=t.axisX.conversionParameters.reference+t.axisX.conversionParameters.pixelPerUnit*(s-t.axisX.conversionParameters.minimum)+.5<<0,n=t.axisY.conversionParameters.reference+t.axisY.conversionParameters.pixelPerUnit*(b[d].y-t.axisY.conversionParameters.minimum)+.5<<0;var P,T,M,S=i-t.plotType.plotUnits.length*p/2+t.index*p<<0,k=S+p<<0;if(b[d].y>=0)P=n-(M=l[s]?l[s]:0),T=x-M,l[s]=M+(T-P);else T=n+(M=h[s]?h[s]:0),P=x+M,h[s]=M+(T-P);o=b[d].color?b[d].color:y._colorSet[d%y._colorSet.length],R(e,S,P,k,T,o,f&&b[d].y>=0,b[d].y<0&&f,!1,!1);var _=y.dataPointIds[d];this._eventManager.objectMap[_]={id:_,objectType:"dataPoint",dataSeriesIndex:v,dataPointIndex:d,x1:S,y1:P,x2:k,y2:T},o=g(_),a&&R(this._eventManager.ghostCtx,S,P,k,T,o,!1,!1,!1,!1),(b[d].indexLabel||y.indexLabel)&&this._indexLabels.push({chartType:"stackedColumn",dataPoint:b[d],dataSeries:y,point:{x:i,y:b[d].y>=0?P:T},bounds:{x1:S,y1:Math.min(P,T),x2:k,y2:Math.max(P,T)},color:o})}}}e.restore(),a&&this._eventManager.ghostCtx.restore()}},E.prototype.renderFunnel=function(t){var e=this.plotArea.ctx;if(!(t.dataSeriesIndexes.length<=0)){var i,n,s,o=null,r=this.plotArea,l=[],h=[],d=0,x=t.axisY.conversionParameters.reference+t.axisY.conversionParameters.pixelPerUnit*(0-t.axisY.conversionParameters.minimum)<<0,c=.05*this.width,m=t.axisX.dataInfo.minDiff,p=r.width/Math.abs(t.axisX.maximum-t.axisX.minimum)*Math.abs(m)/t.plotType.plotUnits.length*.9<<0;p>c||m===1/0?p=c:p<1&&(p=1),e.save(),a&&this._eventManager.ghostCtx.save(),e.beginPath(),e.rect(0,r.y1,this.width,this.height),e.clip(),a&&(this._eventManager.ghostCtx.rect(r.x1,r.y1,r.width,r.height),this._eventManager.ghostCtx.clip());for(var u=1,v=0;v<t.dataSeriesIndexes.length;v++){var y=t.dataSeriesIndexes[v],b=this.data[y],f=b.dataPoints;if(b.maxWidthInX=p/(t.axisX.conversionParameters.pixelPerUnit>1?t.axisX.conversionParameters.pixelPerUnit-1:t.axisX.conversionParameters.pixelPerUnit),f.length>0){var P,T,M,S;for(d=0;d<f.length;d++)if(!((s=f[d].x.getTime?f[d].x.getTime():f[d].x)<t.axisX.dataInfo.viewPortMin||s>t.axisX.dataInfo.viewPortMax||"number"!=typeof f[d].y||t.axisX.maxWidth<=0)){var k;i=t.axisX.maxWidth/2;var _,C,w,A=t.axisX.maxWidth/2*.0054;t.axisY.maxHeight;if(A>.65&&(A=.65),k=0!==t.dataPointYSums[s]?f[d].y/t.dataPointYSums[s]*100:0,n=t.axisY.conversionParameters.reference+t.axisY.conversionParameters.pixelPerUnit*(k-t.axisY.conversionParameters.minimum)<<0,0==v&&(u=i,M=T=i+(x-n)*A<<0,S=P=i-(x-n)*A<<0),v>0&&((M=(T=M)+(x-n)*A<<0)==T&&M++,S=(P=S)-(M-T)<<0),f[d].y>=0?(_=n-(w=l[s]?l[s]:0),C=x-w,l[s]=w+(C-_)):(C=n+(w=h[s]?h[s]:0),_=x+w,h[s]=w+(C-_)),o=f[d].color?f[d].color:b._colorSet[0],0!=v?H(e,P,_,T,C,o,M,S,0,f[d].y):j(e,M,_,S,C,o,u),v==t.dataSeriesIndexes.length-1){o=V(o,5);var I=Math.sqrt(Math.pow(_-C,2)+Math.pow(_-C,2))/2;I>10&&(I=10),U(e,i,_,Math.sqrt(Math.pow(M-S,2)+Math.pow(_-C,2))/2,I,o)}var L=b.dataPointIds[d];this._eventManager.objectMap[L]={objectType:"dataPoint",dataSeriesIndex:y,dataPointIndex:d,x1:P,y1:_,x2:T,y2:C},o=g(L),a&&H(this._eventManager.ghostCtx,P,_,T,C,o,M,S,0,f[d].y),(f[d].indexLabel||b.indexLabel)&&this._indexLabels.unshift({chartType:"funnel",dataPoint:f[d],dataSeries:b,point:{x:i,y:f[d].y>=0?_:C},bounds:{x1:P,y1:Math.min(_,C),x2:T,y2:Math.max(_,C)},color:o})}}}e.restore(),a&&this._eventManager.ghostCtx.restore()}},E.prototype.renderStackedColumn100=function(t){var e=this.plotArea.ctx;if(!(t.dataSeriesIndexes.length<=0)){var i,n,s,o=null,r=this.plotArea,l=[],h=[],d=0,x=t.axisY.conversionParameters.reference+t.axisY.conversionParameters.pixelPerUnit*(0-t.axisY.conversionParameters.minimum)<<0,c=.15*this.width<<0,m=t.axisX.dataInfo.minDiff,p=r.width/Math.abs(t.axisX.maximum-t.axisX.minimum)*Math.abs(m)/t.plotType.plotUnits.length*.9<<0;p>c||m===1/0?p=c:p<1&&(p=1),e.save(),a&&this._eventManager.ghostCtx.save(),e.beginPath(),e.rect(r.x1,r.y1,r.width,r.height),e.clip(),a&&(this._eventManager.ghostCtx.rect(r.x1,r.y1,r.width,r.height),this._eventManager.ghostCtx.clip());for(var u=0;u<t.dataSeriesIndexes.length;u++){var v=t.dataSeriesIndexes[u],y=this.data[v],b=y.dataPoints;if(y.maxWidthInX=p/(t.axisX.conversionParameters.pixelPerUnit>1?t.axisX.conversionParameters.pixelPerUnit-1:t.axisX.conversionParameters.pixelPerUnit),b.length>0){var f=!!(p>5&&y.bevelEnabled);for(d=0;d<b.length;d++)if(!((s=b[d].x.getTime?b[d].x.getTime():b[d].x)<t.axisX.dataInfo.viewPortMin||s>t.axisX.dataInfo.viewPortMax)&&"number"==typeof b[d].y){var P;i=t.axisX.conversionParameters.reference+t.axisX.conversionParameters.pixelPerUnit*(s-t.axisX.conversionParameters.minimum)+.5<<0,P=0!==t.dataPointYSums[s]?b[d].y/t.dataPointYSums[s]*100:0,n=t.axisY.conversionParameters.reference+t.axisY.conversionParameters.pixelPerUnit*(P-t.axisY.conversionParameters.minimum)+.5<<0;var T,M,S,k=i-t.plotType.plotUnits.length*p/2+t.index*p<<0,_=k+p<<0;if(b[d].y>=0)T=n-(S=l[s]?l[s]:0),M=x-S,l[s]=S+(M-T);else M=n+(S=h[s]?h[s]:0),T=x+S,h[s]=S+(M-T);o=b[d].color?b[d].color:y._colorSet[d%y._colorSet.length],R(e,k,T,_,M,o,f&&b[d].y>=0,b[d].y<0&&f,!1,!1);var C=y.dataPointIds[d];this._eventManager.objectMap[C]={id:C,objectType:"dataPoint",dataSeriesIndex:v,dataPointIndex:d,x1:k,y1:T,x2:_,y2:M},o=g(C),a&&R(this._eventManager.ghostCtx,k,T,_,M,o,!1,!1,!1,!1),(b[d].indexLabel||y.indexLabel)&&this._indexLabels.push({chartType:"stackedColumn100",dataPoint:b[d],dataSeries:y,point:{x:i,y:b[d].y>=0?T:M},bounds:{x1:k,y1:Math.min(T,M),x2:_,y2:Math.max(T,M)},color:o})}}}e.restore(),a&&this._eventManager.ghostCtx.restore()}},E.prototype.renderBar=function(t){var e=this.plotArea.ctx;if(!(t.dataSeriesIndexes.length<=0)){var i,n,s,o=null,r=this.plotArea,l=0,h=t.axisY.conversionParameters.reference+t.axisY.conversionParameters.pixelPerUnit*(0-t.axisY.conversionParameters.minimum)<<0,d=Math.min(.15*this.height,this.plotArea.height/t.plotType.totalDataSeries*.9)<<0,x=t.axisX.dataInfo.minDiff,c=r.height/Math.abs(t.axisX.maximum-t.axisX.minimum)*Math.abs(x)/t.plotType.totalDataSeries*.9<<0;c>d||x===1/0?c=d:c<1&&(c=1),e.save(),a&&this._eventManager.ghostCtx.save(),e.beginPath(),e.rect(r.x1,r.y1,r.width,r.height),e.clip(),a&&(this._eventManager.ghostCtx.rect(r.x1,r.y1,r.width,r.height),this._eventManager.ghostCtx.clip());for(var m=0;m<t.dataSeriesIndexes.length;m++){var p=t.dataSeriesIndexes[m],u=this.data[p],v=u.dataPoints;if(u.maxWidthInX=c/(t.axisX.conversionParameters.pixelPerUnit>1?t.axisX.conversionParameters.pixelPerUnit-1:t.axisX.conversionParameters.pixelPerUnit),v.length>0){var y=!!(c>5&&u.bevelEnabled);for(e.strokeStyle="#4572A7 ",l=0;l<v.length;l++)if(!((s=v[l].getTime?v[l].x.getTime():v[l].x)<t.axisX.dataInfo.viewPortMin||s>t.axisX.dataInfo.viewPortMax)&&"number"==typeof v[l].y){n=t.axisX.conversionParameters.reference+t.axisX.conversionParameters.pixelPerUnit*(s-t.axisX.conversionParameters.minimum)+.5<<0,i=t.axisY.conversionParameters.reference+t.axisY.conversionParameters.pixelPerUnit*(v[l].y-t.axisY.conversionParameters.minimum)+.5<<0;var b,f,P=n+t.plotType.totalDataSeries*c/2-(t.previousDataSeriesCount+m)*c<<0,T=P-c<<0;v[l].y>=0?(b=h,f=i):(b=i,f=h),o=v[l].color?v[l].color:u._colorSet[l%u._colorSet.length],R(e,b,P,f,T,o,y,!1,!1,!1);var M=u.dataPointIds[l];this._eventManager.objectMap[M]={id:M,objectType:"dataPoint",dataSeriesIndex:p,dataPointIndex:l,x1:b,y1:P,x2:f,y2:T},o=g(M),a&&R(this._eventManager.ghostCtx,b,P,f,T,o,!1,!1,!1,!1),this._indexLabels.push({chartType:"bar",dataPoint:v[l],dataSeries:u,point:{x:v[l].y>=0?f:b,y:P+(T-P)/2},bounds:{x1:Math.min(b,f),y1:P,x2:Math.max(b,f),y2:T},color:o})}}}e.restore(),a&&this._eventManager.ghostCtx.restore()}},E.prototype.renderStackedBar=function(t){var e=this.plotArea.ctx;if(!(t.dataSeriesIndexes.length<=0)){var i,n,s,o=null,r=this.plotArea,l=[],h=[],d=0,x=t.axisY.conversionParameters.reference+t.axisY.conversionParameters.pixelPerUnit*(0-t.axisY.conversionParameters.minimum)<<0,c=.15*this.width<<0,m=t.axisX.dataInfo.minDiff,p=r.height/Math.abs(t.axisX.maximum-t.axisX.minimum)*Math.abs(m)/t.plotType.plotUnits.length*.9<<0;p>c||m===1/0?p=c:p<1&&(p=1),e.save(),a&&this._eventManager.ghostCtx.save(),e.beginPath(),e.rect(r.x1,r.y1,r.width,r.height),e.clip(),a&&(this._eventManager.ghostCtx.rect(r.x1,r.y1,r.width,r.height),this._eventManager.ghostCtx.clip());for(var u=0;u<t.dataSeriesIndexes.length;u++){var v=t.dataSeriesIndexes[u],y=this.data[v],b=y.dataPoints;if(y.maxWidthInX=p/(t.axisX.conversionParameters.pixelPerUnit>1?t.axisX.conversionParameters.pixelPerUnit-1:t.axisX.conversionParameters.pixelPerUnit),b.length>0){var f=!!(p>5&&y.bevelEnabled);for(e.strokeStyle="#4572A7 ",d=0;d<b.length;d++)if(!((s=b[d].x.getTime?b[d].x.getTime():b[d].x)<t.axisX.dataInfo.viewPortMin||s>t.axisX.dataInfo.viewPortMax)&&"number"==typeof b[d].y){n=t.axisX.conversionParameters.reference+t.axisX.conversionParameters.pixelPerUnit*(s-t.axisX.conversionParameters.minimum)+.5<<0,i=t.axisY.conversionParameters.reference+t.axisY.conversionParameters.pixelPerUnit*(b[d].y-t.axisY.conversionParameters.minimum)+.5<<0;var P,T,M,S=n-t.plotType.plotUnits.length*p/2+t.index*p<<0,k=S+p<<0;if(b[d].y>=0)P=x+(M=l[s]?l[s]:0),T=i+M,l[s]=M+(T-P);else P=i-(M=h[s]?h[s]:0),T=x-M,h[s]=M+(T-P);o=b[d].color?b[d].color:y._colorSet[d%y._colorSet.length],R(e,P,S,T,k,o,f,!1,!1,!1);var _=y.dataPointIds[d];this._eventManager.objectMap[_]={id:_,objectType:"dataPoint",dataSeriesIndex:v,dataPointIndex:d,x1:P,y1:S,x2:T,y2:k},o=g(_),a&&R(this._eventManager.ghostCtx,P,S,T,k,o,!1,!1,!1,!1),this._indexLabels.push({chartType:"stackedBar",dataPoint:b[d],dataSeries:y,point:{x:b[d].y>=0?T:P,y:n},bounds:{x1:Math.min(P,T),y1:S,x2:Math.max(P,T),y2:k},color:o})}}}e.restore(),a&&this._eventManager.ghostCtx.restore()}},E.prototype.renderStackedBar100=function(t){var e=this.plotArea.ctx;if(!(t.dataSeriesIndexes.length<=0)){var i,n,s,o=null,r=this.plotArea,l=[],h=[],d=0,x=t.axisY.conversionParameters.reference+t.axisY.conversionParameters.pixelPerUnit*(0-t.axisY.conversionParameters.minimum)<<0,c=.15*this.width<<0,m=t.axisX.dataInfo.minDiff,p=r.height/Math.abs(t.axisX.maximum-t.axisX.minimum)*Math.abs(m)/t.plotType.plotUnits.length*.9<<0;p>c||m===1/0?p=c:p<1&&(p=1),e.save(),a&&this._eventManager.ghostCtx.save(),e.beginPath(),e.rect(r.x1,r.y1,r.width,r.height),e.clip(),a&&(this._eventManager.ghostCtx.rect(r.x1,r.y1,r.width,r.height),this._eventManager.ghostCtx.clip());for(var u=0;u<t.dataSeriesIndexes.length;u++){var v=t.dataSeriesIndexes[u],y=this.data[v],b=y.dataPoints;if(y.maxWidthInX=p/(t.axisX.conversionParameters.pixelPerUnit>1?t.axisX.conversionParameters.pixelPerUnit-1:t.axisX.conversionParameters.pixelPerUnit),b.length>0){var f=!!(p>5&&y.bevelEnabled);for(e.strokeStyle="#4572A7 ",d=0;d<b.length;d++)if(!((s=b[d].x.getTime?b[d].x.getTime():b[d].x)<t.axisX.dataInfo.viewPortMin||s>t.axisX.dataInfo.viewPortMax)&&"number"==typeof b[d].y){var P;n=t.axisX.conversionParameters.reference+t.axisX.conversionParameters.pixelPerUnit*(s-t.axisX.conversionParameters.minimum)+.5<<0,P=0!==t.dataPointYSums[s]?b[d].y/t.dataPointYSums[s]*100:0,i=t.axisY.conversionParameters.reference+t.axisY.conversionParameters.pixelPerUnit*(P-t.axisY.conversionParameters.minimum)+.5<<0;var T,M,S,k=n-t.plotType.plotUnits.length*p/2+t.index*p<<0,_=k+p<<0;if(b[d].y>=0)T=x+(S=l[s]?l[s]:0),M=i+S,l[s]=S+(M-T);else T=i-(S=h[s]?h[s]:0),M=x-S,h[s]=S+(M-T);o=b[d].color?b[d].color:y._colorSet[d%y._colorSet.length],R(e,T,k,M,_,o,f,!1,!1,!1);var C=y.dataPointIds[d];this._eventManager.objectMap[C]={id:C,objectType:"dataPoint",dataSeriesIndex:v,dataPointIndex:d,x1:T,y1:k,x2:M,y2:_},o=g(C),a&&R(this._eventManager.ghostCtx,T,k,M,_,o,!1,!1,!1,!1),this._indexLabels.push({chartType:"stackedBar100",dataPoint:b[d],dataSeries:y,point:{x:b[d].y>=0?M:T,y:n},bounds:{x1:Math.min(T,M),y1:k,x2:Math.max(T,M),y2:_},color:o})}}}e.restore(),a&&this._eventManager.ghostCtx.restore()}},E.prototype.renderArea=function(t){var e=this.plotArea.ctx;if(!(t.dataSeriesIndexes.length<=0)){var i=this._eventManager.ghostCtx,n=t.axisX.lineCoordinates,s=t.axisY.lineCoordinates,o=[],r=this.plotArea;e.save(),a&&i.save(),e.beginPath(),e.rect(r.x1,r.y1,r.width,r.height),e.clip(),a&&(i.beginPath(),i.rect(r.x1,r.y1,r.width,r.height),i.clip());for(var l=0;l<t.dataSeriesIndexes.length;l++){var h=t.dataSeriesIndexes[l],d=this.data[h],x=d.dataPoints,c=d.id;this._eventManager.objectMap[c]={objectType:"dataSeries",dataSeriesIndex:h};var m=g(c);i.fillStyle=m,o=[];var p,u,v,y,b=!0,f=0,P=t.axisY.conversionParameters.reference+t.axisY.conversionParameters.pixelPerUnit*(0-t.axisY.conversionParameters.minimum)+.5<<0,T=null;if(x.length>0){var M=d._colorSet[f%d._colorSet.length];e.fillStyle=M;for(var S=!0;f<x.length;f++)if(!((v=x[f].x.getTime?x[f].x.getTime():x[f].x)<t.axisX.dataInfo.viewPortMin||v>t.axisX.dataInfo.viewPortMax))if("number"==typeof x[f].y){p=t.axisX.conversionParameters.reference+t.axisX.conversionParameters.pixelPerUnit*(v-t.axisX.conversionParameters.minimum)+.5<<0,u=t.axisY.conversionParameters.reference+t.axisY.conversionParameters.pixelPerUnit*(x[f].y-t.axisY.conversionParameters.minimum)+.5<<0,b||S?(e.beginPath(),e.moveTo(p,u),T={x:p,y:u},a&&(i.beginPath(),i.moveTo(p,u)),b=!1,S=!1):(e.lineTo(p,u),a&&i.lineTo(p,u),f%250==0&&w());var k=d.dataPointIds[f];if(this._eventManager.objectMap[k]={id:k,objectType:"dataPoint",dataSeriesIndex:h,dataPointIndex:f,x1:p,y1:u},0!==x[f].markerSize&&(x[f].markerSize>0||d.markerSize>0)){var _=d.getMarkerProperties(f,p,u,e);o.push(_),(!d.maxWidthInX||_.size>d.maxWidthInX)&&(d.maxWidthInX=_.size/(t.axisX.conversionParameters.pixelPerUnit>1?t.axisX.conversionParameters.pixelPerUnit-1:t.axisX.conversionParameters.pixelPerUnit));var C=g(k);a&&o.push({x:p,y:u,ctx:i,type:_.type,size:_.size,color:C,borderColor:C,borderThickness:_.borderThickness})}(x[f].indexLabel||d.indexLabel)&&this._indexLabels.push({chartType:"area",dataPoint:x[f],dataSeries:d,point:{x:p,y:u},color:M})}else w(),S=!0;w(),st.drawMarkers(o)}}e.restore(),a&&this._eventManager.ghostCtx.restore()}function w(){T&&(t.axisY.minimum<=0&&t.axisY.maximum>=0?y=P:t.axisY.maximum<0?y=s.y1:t.axisY.minimum>0&&(y=n.y2),e.lineTo(p,y),e.lineTo(T.x,y),e.closePath(),e.fill(),a&&(i.lineTo(p,y),i.lineTo(T.x,y),i.closePath(),i.fill()),e.beginPath(),e.moveTo(p,u),i.beginPath(),i.moveTo(p,u),T={x:p,y:u})}},E.prototype.renderSplineArea=function(t){var e=this.plotArea.ctx;if(!(t.dataSeriesIndexes.length<=0)){var i=this._eventManager.ghostCtx,n=t.axisX.lineCoordinates,s=t.axisY.lineCoordinates,o=[],r=this.plotArea;e.save(),a&&i.save(),e.beginPath(),e.rect(r.x1,r.y1,r.width,r.height),e.clip(),a&&(i.beginPath(),i.rect(r.x1,r.y1,r.width,r.height),i.clip());for(var l=0;l<t.dataSeriesIndexes.length;l++){var h=t.dataSeriesIndexes[l],d=this.data[h],x=d.dataPoints,c=d.id;this._eventManager.objectMap[c]={objectType:"dataSeries",dataSeriesIndex:h};var m=g(c);i.fillStyle=m,o=[];var p,u,v,y,b=0,f=t.axisY.conversionParameters.reference+t.axisY.conversionParameters.pixelPerUnit*(0-t.axisY.conversionParameters.minimum)+.5<<0,P=null,T=[];if(x.length>0){for(color=d._colorSet[b%d._colorSet.length],e.fillStyle=color;b<x.length;b++)if(!((v=x[b].x.getTime?x[b].x.getTime():x[b].x)<t.axisX.dataInfo.viewPortMin||v>t.axisX.dataInfo.viewPortMax))if("number"==typeof x[b].y){p=t.axisX.conversionParameters.reference+t.axisX.conversionParameters.pixelPerUnit*(v-t.axisX.conversionParameters.minimum)+.5<<0,u=t.axisY.conversionParameters.reference+t.axisY.conversionParameters.pixelPerUnit*(x[b].y-t.axisY.conversionParameters.minimum)+.5<<0;var M=d.dataPointIds[b];if(this._eventManager.objectMap[M]={id:M,objectType:"dataPoint",dataSeriesIndex:h,dataPointIndex:b,x1:p,y1:u},T[T.length]={x:p,y:u},0!==x[b].markerSize&&(x[b].markerSize>0||d.markerSize>0)){var S=d.getMarkerProperties(b,p,u,e);o.push(S),(!d.maxWidthInX||S.size>d.maxWidthInX)&&(d.maxWidthInX=S.size/(t.axisX.conversionParameters.pixelPerUnit>1?t.axisX.conversionParameters.pixelPerUnit-1:t.axisX.conversionParameters.pixelPerUnit));var k=g(M);a&&o.push({x:p,y:u,ctx:i,type:S.type,size:S.size,color:k,borderColor:k,borderThickness:S.borderThickness})}(x[b].indexLabel||d.indexLabel)&&this._indexLabels.push({chartType:"splineArea",dataPoint:x[b],dataSeries:d,point:{x:p,y:u},color})}else b>0&&(_(),T=[]);_(),st.drawMarkers(o)}}e.restore(),a&&this._eventManager.ghostCtx.restore()}function _(){var o=O(T,2);if(o.length>0){e.beginPath(),e.moveTo(o[0].x,o[0].y),a&&(i.beginPath(),i.moveTo(o[0].x,o[0].y));for(var r=0;r<o.length-3;r+=3)e.bezierCurveTo(o[r+1].x,o[r+1].y,o[r+2].x,o[r+2].y,o[r+3].x,o[r+3].y),a&&i.bezierCurveTo(o[r+1].x,o[r+1].y,o[r+2].x,o[r+2].y,o[r+3].x,o[r+3].y);t.axisY.minimum<=0&&t.axisY.maximum>=0?y=f:t.axisY.maximum<0?y=s.y1:t.axisY.minimum>0&&(y=n.y2),P={x:o[0].x,y:o[0].y},e.lineTo(o[o.length-1].x,y),e.lineTo(P.x,y),e.closePath(),e.fill(),a&&(i.lineTo(o[o.length-1].x,y),i.lineTo(P.x,y),i.closePath(),i.fill())}}},E.prototype.renderStepArea=function(t){var e=this.plotArea.ctx;if(!(t.dataSeriesIndexes.length<=0)){var i=this._eventManager.ghostCtx,n=t.axisX.lineCoordinates,s=t.axisY.lineCoordinates,o=[],r=this.plotArea;e.save(),a&&i.save(),e.beginPath(),e.rect(r.x1,r.y1,r.width,r.height),e.clip(),a&&(i.beginPath(),i.rect(r.x1,r.y1,r.width,r.height),i.clip());for(var l=0;l<t.dataSeriesIndexes.length;l++){var h=t.dataSeriesIndexes[l],d=this.data[h],x=d.dataPoints,c=d.id;this._eventManager.objectMap[c]={objectType:"dataSeries",dataSeriesIndex:h};var m=g(c);i.fillStyle=m,o=[];var p,u,v,y,b=!0,f=0,P=t.axisY.conversionParameters.reference+t.axisY.conversionParameters.pixelPerUnit*(0-t.axisY.conversionParameters.minimum)+.5<<0,T=null,M=!1;if(x.length>0){var S=d._colorSet[f%d._colorSet.length];for(e.fillStyle=S;f<x.length;f++)if(!((v=x[f].x.getTime?x[f].x.getTime():x[f].x)<t.axisX.dataInfo.viewPortMin||v>t.axisX.dataInfo.viewPortMax)){var k=u;if("number"==typeof x[f].y){p=t.axisX.conversionParameters.reference+t.axisX.conversionParameters.pixelPerUnit*(v-t.axisX.conversionParameters.minimum)+.5<<0,u=t.axisY.conversionParameters.reference+t.axisY.conversionParameters.pixelPerUnit*(x[f].y-t.axisY.conversionParameters.minimum)+.5<<0,b||M?(e.beginPath(),e.moveTo(p,u),T={x:p,y:u},a&&(i.beginPath(),i.moveTo(p,u)),b=!1,M=!1):(e.lineTo(p,k),a&&i.lineTo(p,k),e.lineTo(p,u),a&&i.lineTo(p,u),f%250==0&&(t.axisY.minimum<=0&&t.axisY.maximum>=0?y=P:t.axisY.maximum<0?y=s.y1:t.axisY.minimum>0&&(y=n.y2),e.lineTo(p,y),e.lineTo(T.x,y),e.closePath(),e.fill(),e.beginPath(),e.moveTo(p,u),a&&(i.lineTo(p,y),i.lineTo(T.x,y),i.closePath(),i.fill(),i.beginPath(),i.moveTo(p,u)),T={x:p,y:u}));var _=d.dataPointIds[f];if(this._eventManager.objectMap[_]={id:_,objectType:"dataPoint",dataSeriesIndex:h,dataPointIndex:f,x1:p,y1:u},0!==x[f].markerSize&&(x[f].markerSize>0||d.markerSize>0)){var C=d.getMarkerProperties(f,p,u,e);o.push(C),(!d.maxWidthInX||C.size>d.maxWidthInX)&&(d.maxWidthInX=C.size/(t.axisX.conversionParameters.pixelPerUnit>1?t.axisX.conversionParameters.pixelPerUnit-1:t.axisX.conversionParameters.pixelPerUnit));var w=g(_);a&&o.push({x:p,y:u,ctx:i,type:C.type,size:C.size,color:w,borderColor:w,borderThickness:C.borderThickness})}(x[f].indexLabel||d.indexLabel)&&this._indexLabels.push({chartType:"stepArea",dataPoint:x[f],dataSeries:d,point:{x:p,y:u},color:S})}else A(),M=!0}A(),st.drawMarkers(o)}}e.restore(),a&&this._eventManager.ghostCtx.restore()}function A(){T&&(t.axisY.minimum<=0&&t.axisY.maximum>=0?y=P:t.axisY.maximum<0?y=s.y1:t.axisY.minimum>0&&(y=n.y2),e.lineTo(p,y),e.lineTo(T.x,y),e.closePath(),e.fill(),a&&(i.lineTo(p,y),i.lineTo(T.x,y),i.closePath(),i.fill()),e.beginPath(),e.moveTo(p,u),i.beginPath(),i.moveTo(p,u),T={x:p,y:u})}},E.prototype.renderStackedArea=function(t){var e=this.plotArea.ctx;if(!(t.dataSeriesIndexes.length<=0)){var i,n=null,s=[],o=this.plotArea,r=[],l=[],h=0,d=t.axisY.conversionParameters.reference+t.axisY.conversionParameters.pixelPerUnit*(0-t.axisY.conversionParameters.minimum)<<0,x=(t.axisX.dataInfo.minDiff,this._eventManager.ghostCtx);a&&x.beginPath(),e.save(),a&&x.save(),e.beginPath(),e.rect(o.x1,o.y1,o.width,o.height),e.clip(),a&&(x.beginPath(),x.rect(o.x1,o.y1,o.width,o.height),x.clip()),xValuePresent=[];for(var c=0;c<t.dataSeriesIndexes.length;c++){var m,u=t.dataSeriesIndexes[c],v=(y=this.data[u]).dataPoints;for(y.dataPointIndexes=[],h=0;h<v.length;h++)m=v[h].x.getTime?v[h].x.getTime():v[h].x,y.dataPointIndexes[m]=h,xValuePresent[m]||(l.push(m),xValuePresent[m]=!0);l.sort(p)}for(c=0;c<t.dataSeriesIndexes.length;c++){u=t.dataSeriesIndexes[c],v=(y=this.data[u]).dataPoints;var y,b=!0,f=[],P=y.id;this._eventManager.objectMap[P]={objectType:"dataSeries",dataSeriesIndex:u};var T=g(P);if(x.fillStyle=T,l.length>0){for(n=y._colorSet[0],e.fillStyle=n,h=0;h<l.length;h++){i=l[h];var M=null;if(M=y.dataPointIndexes[i]>=0?v[y.dataPointIndexes[i]]:{x:i,y:0},!(i<t.axisX.dataInfo.viewPortMin||i>t.axisX.dataInfo.viewPortMax)&&"number"==typeof M.y){var S=t.axisX.conversionParameters.reference+t.axisX.conversionParameters.pixelPerUnit*(i-t.axisX.conversionParameters.minimum)+.5<<0,k=t.axisY.conversionParameters.reference+t.axisY.conversionParameters.pixelPerUnit*(M.y-t.axisY.conversionParameters.minimum)+.5<<0,_=r[i]?r[i]:0;if(k-=_,f.push({x:S,y:d-_}),r[i]=d-k,b)e.beginPath(),e.moveTo(S,k),a&&(x.beginPath(),x.moveTo(S,k)),b=!1;else if(e.lineTo(S,k),a&&x.lineTo(S,k),h%250==0){for(;f.length>0;){var C=f.pop();e.lineTo(C.x,C.y),a&&x.lineTo(C.x,C.y)}e.closePath(),e.fill(),e.beginPath(),e.moveTo(S,k),a&&(x.closePath(),x.fill(),x.beginPath(),x.moveTo(S,k)),f.push({x:S,y:d-_})}if(y.dataPointIndexes[i]>=0){var w=y.dataPointIds[y.dataPointIndexes[i]];this._eventManager.objectMap[w]={id:w,objectType:"dataPoint",dataSeriesIndex:u,dataPointIndex:y.dataPointIndexes[i],x1:S,y1:k}}if(y.dataPointIndexes[i]>=0&&0!==M.markerSize&&(M.markerSize>0||y.markerSize>0)){var A=y.getMarkerProperties(h,S,k,e);s.push(A),(!y.maxWidthInX||A.size>y.maxWidthInX)&&(y.maxWidthInX=A.size/(t.axisX.conversionParameters.pixelPerUnit>1?t.axisX.conversionParameters.pixelPerUnit-1:t.axisX.conversionParameters.pixelPerUnit)),markerColor=g(w),a&&s.push({x:S,y:k,ctx:x,type:A.type,size:A.size,color:markerColor,borderColor:markerColor,borderThickness:A.borderThickness})}(M.indexLabel||y.indexLabel)&&this._indexLabels.push({chartType:"stackedArea",dataPoint:M,dataSeries:y,point:{x:S,y:k},color:n})}}for(;f.length>0;){C=f.pop();e.lineTo(C.x,C.y),a&&x.lineTo(C.x,C.y)}e.closePath(),e.fill(),e.beginPath(),e.moveTo(S,k),a&&(x.closePath(),x.fill(),x.beginPath(),x.moveTo(S,k))}delete y.dataPointIndexes}st.drawMarkers(s),e.restore(),a&&x.restore()}},E.prototype.renderStackedArea100=function(t){var e=this.plotArea.ctx;if(!(t.dataSeriesIndexes.length<=0)){var i,n=null,s=this.plotArea,o=[],r=[],l=[],h=0,d=t.axisY.conversionParameters.reference+t.axisY.conversionParameters.pixelPerUnit*(0-t.axisY.conversionParameters.minimum)<<0,x=.15*this.width<<0,c=t.axisX.dataInfo.minDiff,m=s.width/Math.abs(t.axisX.maximum-t.axisX.minimum)*Math.abs(c)*.9<<0,u=this._eventManager.ghostCtx;e.save(),a&&u.save(),e.beginPath(),e.rect(s.x1,s.y1,s.width,s.height),e.clip(),a&&(u.beginPath(),u.rect(s.x1,s.y1,s.width,s.height),u.clip()),xValuePresent=[];for(var v=0;v<t.dataSeriesIndexes.length;v++){var y,b=t.dataSeriesIndexes[v],f=(P=this.data[b]).dataPoints;for(P.dataPointIndexes=[],h=0;h<f.length;h++)y=f[h].x.getTime?f[h].x.getTime():f[h].x,P.dataPointIndexes[y]=h,xValuePresent[y]||(l.push(y),xValuePresent[y]=!0);l.sort(p)}for(v=0;v<t.dataSeriesIndexes.length;v++){b=t.dataSeriesIndexes[v],f=(P=this.data[b]).dataPoints;var P,T=!0,M=P.id;this._eventManager.objectMap[M]={objectType:"dataSeries",dataSeriesIndex:b};var S=g(M);u.fillStyle=S,1==f.length&&(m=x),m<1?m=1:m>x&&(m=x);var k=[];if(l.length>0){n=P._colorSet[h%P._colorSet.length],e.fillStyle=n;for(h=0;h<l.length;h++){i=l[h];var _=null;if(_=P.dataPointIndexes[i]>=0?f[P.dataPointIndexes[i]]:{x:i,y:0},!(i<t.axisX.dataInfo.viewPortMin||i>t.axisX.dataInfo.viewPortMax)&&"number"==typeof _.y){var C;C=0!==t.dataPointYSums[i]?_.y/t.dataPointYSums[i]*100:0;var w=t.axisX.conversionParameters.reference+t.axisX.conversionParameters.pixelPerUnit*(i-t.axisX.conversionParameters.minimum)+.5<<0,A=t.axisY.conversionParameters.reference+t.axisY.conversionParameters.pixelPerUnit*(C-t.axisY.conversionParameters.minimum)+.5<<0,I=r[i]?r[i]:0;if(A-=I,k.push({x:w,y:d-I}),r[i]=d-A,T)e.beginPath(),e.moveTo(w,A),a&&(u.beginPath(),u.moveTo(w,A)),T=!1;else if(e.lineTo(w,A),a&&u.lineTo(w,A),h%250==0){for(;k.length>0;){var L=k.pop();e.lineTo(L.x,L.y),a&&u.lineTo(L.x,L.y)}e.closePath(),e.fill(),e.beginPath(),e.moveTo(w,A),a&&(u.closePath(),u.fill(),u.beginPath(),u.moveTo(w,A)),k.push({x:w,y:d-I})}if(P.dataPointIndexes[i]>=0){var X=P.dataPointIds[P.dataPointIndexes[i]];this._eventManager.objectMap[X]={id:X,objectType:"dataPoint",dataSeriesIndex:b,dataPointIndex:P.dataPointIndexes[i],x1:w,y1:A}}if(P.dataPointIndexes[i]>=0&&0!==_.markerSize&&(_.markerSize>0||P.markerSize>0)){var B=P.getMarkerProperties(h,w,A,e);o.push(B),(!P.maxWidthInX||B.size>P.maxWidthInX)&&(P.maxWidthInX=B.size/(t.axisX.conversionParameters.pixelPerUnit>1?t.axisX.conversionParameters.pixelPerUnit-1:t.axisX.conversionParameters.pixelPerUnit)),markerColor=g(X),a&&o.push({x:w,y:A,ctx:u,type:B.type,size:B.size,color:markerColor,borderColor:markerColor,borderThickness:B.borderThickness})}(_.indexLabel||P.indexLabel)&&this._indexLabels.push({chartType:"stackedArea100",dataPoint:_,dataSeries:P,point:{x:w,y:A},color:n})}}for(;k.length>0;){L=k.pop();e.lineTo(L.x,L.y),a&&u.lineTo(L.x,L.y)}e.closePath(),e.fill(),e.beginPath(),e.moveTo(w,A),a&&(u.closePath(),u.fill(),u.beginPath(),u.moveTo(w,A))}delete P.dataPointIndexes}st.drawMarkers(o),e.restore(),a&&u.restore()}},E.prototype.renderBubble=function(t){var e=this.plotArea.ctx,i=t.dataSeriesIndexes.length;if(!(i<=0)){var n,s,o,r=this.plotArea,l=0,h=(t.axisY.conversionParameters.reference,t.axisY.conversionParameters.pixelPerUnit,t.axisY.conversionParameters.minimum,.15*this.width<<0),d=t.axisX.dataInfo.minDiff,x=r.width/Math.abs(t.axisX.maximum-t.axisX.minimum)*Math.abs(d)/i*.9<<0;e.save(),a&&this._eventManager.ghostCtx.save(),e.beginPath(),e.rect(r.x1,r.y1,r.width,r.height),e.clip(),a&&(this._eventManager.ghostCtx.rect(r.x1,r.y1,r.width,r.height),this._eventManager.ghostCtx.clip());for(var c=-1/0,m=1/0,p=0;p<t.dataSeriesIndexes.length;p++){var u=t.dataSeriesIndexes[p],v=(P=this.data[u]).dataPoints,y=0;for(l=0;l<v.length;l++)(o=o=v[l].getTime?v[l].x.getTime():v[l].x)<t.axisX.dataInfo.viewPortMin||o>t.axisX.dataInfo.viewPortMax||void 0!==v[l].z&&((y=v[l].z)>c&&(c=y),y<m&&(m=y))}var b=5*Math.PI*5,f=Math.max(Math.pow(.25*Math.min(r.height,r.width)/2,2)*Math.PI,b);for(p=0;p<t.dataSeriesIndexes.length;p++){var P;u=t.dataSeriesIndexes[p];if(1==(v=(P=this.data[u]).dataPoints).length&&(x=h),x<1?x=1:x>h&&(x=h),v.length>0){e.strokeStyle="#4572A7 ";for(l=0;l<v.length;l++)if(!((o=o=v[l].getTime?v[l].x.getTime():v[l].x)<t.axisX.dataInfo.viewPortMin||o>t.axisX.dataInfo.viewPortMax)&&"number"==typeof v[l].y){n=t.axisX.conversionParameters.reference+t.axisX.conversionParameters.pixelPerUnit*(o-t.axisX.conversionParameters.minimum)+.5<<0,s=t.axisY.conversionParameters.reference+t.axisY.conversionParameters.pixelPerUnit*(v[l].y-t.axisY.conversionParameters.minimum)+.5<<0;y=v[l].z;var T=c===m?f/2:b+(f-b)/(c-m)*(y-m),M=2*Math.max(Math.sqrt(T/Math.PI)<<0,1),S=P.getMarkerProperties(l,e);S.size=M,st.drawMarker(n,s,e,S.type,S.size,S.color,S.borderColor,S.borderThickness),(!P.maxWidthInX||S.size>P.maxWidthInX)&&(P.maxWidthInX=S.size/(t.axisX.conversionParameters.pixelPerUnit>1?t.axisX.conversionParameters.pixelPerUnit-1:t.axisX.conversionParameters.pixelPerUnit));var k=P.dataPointIds[l];this._eventManager.objectMap[k]={id:k,objectType:"dataPoint",dataSeriesIndex:u,dataPointIndex:l,x1:n,y1:s,size:M};var _=g(k);a&&st.drawMarker(n,s,this._eventManager.ghostCtx,S.type,S.size,_,_,S.borderThickness)}}}e.restore(),a&&this._eventManager.ghostCtx.restore()}},E.prototype.renderScatter=function(t){var e=this.plotArea.ctx,i=t.dataSeriesIndexes.length;if(!(i<=0)){var n,s,o,r=this.plotArea,l=0,h=(t.axisY.conversionParameters.reference,t.axisY.conversionParameters.pixelPerUnit,t.axisY.conversionParameters.minimum,.15*this.width<<0),d=t.axisX.dataInfo.minDiff,x=r.width/Math.abs(t.axisX.maximum-t.axisX.minimum)*Math.abs(d)/i*.9<<0;e.save(),a&&this._eventManager.ghostCtx.save(),e.beginPath(),e.rect(r.x1,r.y1,r.width,r.height),e.clip(),a&&(this._eventManager.ghostCtx.rect(r.x1,r.y1,r.width,r.height),this._eventManager.ghostCtx.clip());for(var c=0;c<t.dataSeriesIndexes.length;c++){var m=t.dataSeriesIndexes[c],p=this.data[m],u=p.dataPoints;if(1==u.length&&(x=h),x<1?x=1:x>h&&(x=h),u.length>0){e.strokeStyle="#4572A7 ";Math.pow(.3*Math.min(r.height,r.width)/2,2),Math.PI;var v=0,y=0;for(l=0;l<u.length;l++)if(!((o=o=u[l].getTime?u[l].x.getTime():u[l].x)<t.axisX.dataInfo.viewPortMin||o>t.axisX.dataInfo.viewPortMax)&&"number"==typeof u[l].y){n=t.axisX.conversionParameters.reference+t.axisX.conversionParameters.pixelPerUnit*(o-t.axisX.conversionParameters.minimum)+.5<<0,s=t.axisY.conversionParameters.reference+t.axisY.conversionParameters.pixelPerUnit*(u[l].y-t.axisY.conversionParameters.minimum)+.5<<0;var b=p.getMarkerProperties(l,n,s,e);if(st.drawMarker(b.x,b.y,b.ctx,b.type,b.size,b.color,b.color,b.thickness),(!p.maxWidthInX||b.size>p.maxWidthInX)&&(p.maxWidthInX=b.size/(t.axisX.conversionParameters.pixelPerUnit>1?t.axisX.conversionParameters.pixelPerUnit-1:t.axisX.conversionParameters.pixelPerUnit)),!(Math.sqrt((v-n)*(v-n)+(y-s)*(y-s))<Math.min(b.size,5))){var f=p.dataPointIds[l];this._eventManager.objectMap[f]={id:f,objectType:"dataPoint",dataSeriesIndex:m,dataPointIndex:l,x1:n,y1:s};var P=g(f);a&&st.drawMarker(b.x,b.y,this._eventManager.ghostCtx,b.type,b.size,P,P,b.borderThickness),v=n,y=s}}}}e.restore(),a&&this._eventManager.ghostCtx.restore()}};var N,q=function(t,e,i,a,n,s,o,r,l){var h,d;if(t.save(),"pie"===n)d=2,o-s<.3&&(d=.8),(h=i)<0&&(h=0),t.fillStyle=a,t.strokeStyle=l||"white",t.lineWidth=d,t.beginPath(),t.moveTo(e.x,e.y),t.arc(e.x,e.y,h,s,o,!1),t.closePath(),r?(t.clip(),t.fill(),t.stroke()):t.fill();else if("doughnut"===n){d=2,o-s<.3&&(d=.8);(h=i)<0&&(h=0),t.beginPath(),t.arc(e.x,e.y,h,s,o,!1),t.arc(e.x,e.y,.6*h,o,s,!0),t.closePath(),t.fillStyle=a,t.strokeStyle=l||"white",t.lineWidth=d,r?(t.clip(),t.fill(),t.stroke()):t.fill()}t.restore()};function J(t){this._topOccupied=0,this._bottomOccupied=0,this._leftOccupied=0,this._rightOccupied=0,this.chart=t}function G(t,e){G.parent.constructor.call(this,"TextBlock",e),this.ctx=t,this._isDirty=!0,this._wrappedText=null,this._lineHeight=b(this.fontFamily,this.fontSize,this.fontWeight)}function K(t,e){K.parent.constructor.call(this,"Title",e,t.theme),this.chart=t,this.canvas=t.canvas,this.ctx=this.chart.ctx,void 0===this._options.fontSize&&(this.fontSize=this.chart.getAutoFontSize(this.fontSize)),this.width=null,this.height=null,this.bounds={x1:null,y1:null,x2:null,y2:null}}function Z(t,e,i){Z.parent.constructor.call(this,"Legend",e,i),this.chart=t,this.canvas=t.canvas,this.ctx=this.chart.ctx,this.ghostCtx=this.chart._eventManager.ghostCtx,this.items=[],this.width=0,this.height=0,this.orientation=null,this.horizontalSpacing=10,this.dataSeries=[],this.bounds={x1:null,y1:null,x2:null,y2:null},void 0===this._options.fontSize&&(this.fontSize=this.chart.getAutoFontSize(this.fontSize)),this.lineHeight=b(this.fontFamily,this.fontSize,this.fontWeight)}function Q(t,e){Q.parent.constructor.call(this,e),this.chart=t,this.canvas=t.canvas,this.ctx=this.chart.ctx}function $(t,e,i,a,n){$.parent.constructor.call(this,"DataSeries",e,i),this.chart=t,this.canvas=t.canvas,this._ctx=t.canvas.ctx,this.index=a,this.noDataPointsInPlotArea=0,this.maxWidthInX=0,this.id=n,this.chart._eventManager.objectMap[n]={id:n,objectType:"dataSeries",dataSeriesIndex:a},this.dataPointIds=[],this.axisX=null,this.axisY=null,this.axisPlacement=this.getDefaultAxisPlacement(),void 0===this._options.indexLabelFontSize&&(this.indexLabelFontSize=this.chart.getAutoFontSize(this.indexLabelFontSize))}function tt(t,e,i,a){if(tt.parent.constructor.call(this,"Axis",e,t.theme),this.isSecondaryAxis=!1,this.chart=t,this.canvas=t.canvas,this.ctx=t.ctx,this.maxWidth=0,this.maxHeight=0,this.intervalStartPosition=0,this.labels=[],this._labels=null,this.dataInfo={min:1/0,max:-1/0,viewPortMin:1/0,viewPortMax:-1/0,minDiff:1/0},"axisX"===i?(this.sessionVariables=this.chart.sessionVariables[i],this._options.interval||(this.intervalType=null)):this.sessionVariables="left"===a||"top"===a?this.chart.sessionVariables.axisY:this.chart.sessionVariables.axisY2,void 0===this._options.titleFontSize&&(this.titleFontSize=this.chart.getAutoFontSize(this.titleFontSize)),void 0===this._options.labelFontSize&&(this.labelFontSize=this.chart.getAutoFontSize(this.labelFontSize)),this.type=i,"axisX"!==i||e&&void 0!==e.gridThickness||(this.gridThickness=0),this._position=a,this.lineCoordinates={x1:null,y1:null,x2:null,y2:null,width:null},this.labelAngle=(this.labelAngle%360+360)%360,this.labelAngle>90&&this.labelAngle<=270||this.labelAngle>180&&this.labelAngle<=270?this.labelAngle-=180:this.labelAngle>270&&this.labelAngle<=360&&(this.labelAngle-=360),this._options.stripLines&&this._options.stripLines.length>0){this.stripLines=[];for(var n=0;n<this._options.stripLines.length;n++)this.stripLines.push(new et(this.chart,this._options.stripLines[n],t.theme,++this.chart._eventManager.lastObjectId))}this._titleTextBlock=null,this._absoluteMinimum=null,this._absoluteMaximum=null,this.hasOptionChanged("minimum")&&(this.sessionVariables.internalMinimum=this.minimum),this.hasOptionChanged("maximum")&&(this.sessionVariables.internalMaximum=this.maximum),this.trackChanges("minimum"),this.trackChanges("maximum")}function et(t,e,i,a){et.parent.constructor.call(this,"StripLine",e,i),this._thicknessType="pixel",this.id=a,null!==this.startValue&&null!==this.endValue&&(this.value=((this.startValue.getTime?this.startValue.getTime():this.startValue)+(this.endValue.getTime?this.endValue.getTime():this.endValue))/2,this.thickness=Math.max(this.endValue-this.startValue),this._thicknessType="value")}function it(t,e,i){it.parent.constructor.call(this,"ToolTip",e,i),this.chart=t,this.dashboardTab=document.getElementById("DashboardTabContainerContent"),this.canvas=t.canvas,this.ctx=this.chart.ctx,this.currentSeriesIndex=-1,this.currentDataPointIndex=-1,this._timerId=0,this._prevX=NaN,this._prevY=NaN,this._initialize()}function at(t){this.chart=t,this.lastObjectId=0;this.objectMap=[],this.rectangularRegionEventSubscriptions=[],this.previousDataPointEventObject=null,this.ghostCanvas=D(this.chart.width,this.chart.height),this.ghostCtx=this.ghostCanvas.getContext("2d");this.mouseoveredObjectMaps=[]}function nt(t,e){var i;e&&s[e]&&(i=s[e]),K.parent.constructor.call(this,"CultureInfo",i,t.theme),this.chart=t,this.canvas=t.canvas,this.ctx=this.chart.ctx}E.prototype.renderPie=function(e){var i=this;if(!(e.dataSeriesIndexes.length<=0)){var n=e.dataSeriesIndexes[0],s=this.data[n],o=s.dataPoints,r=10,l=this.plotArea,h={frame:0,maxFrames:1},d=[],x=20/180*Math.PI,c={x:(l.x2+l.x1)/2,y:(l.y2+l.y1)/2},m="inside"===s.indexLabelPlacement?.95*Math.min(l.width,l.height)/2:.8*Math.min(l.width,l.height)/2,p=1.3*m;this.pieDoughnutClickHandler=function(t){if(h.frame===h.maxFrames){var e=t.dataPointIndex,i=t.dataPoint;this.dataPointIds[e];i.exploded?i.exploded=!1:i.exploded=!0,u(a?15:4)}},function(){if(s&&o){for(var t=0,e=0;e<o.length;e++)t+=Math.abs(o[e].y);var a=0,n=0,r=0,h=0;for(e=0;e<o.length;e++){var p=o[e],u=s.dataPointIds[e],g={id:u,objectType:"dataPoint",dataPointIndex:e,dataSeriesIndex:0};d.push(g);var v=p.indexLabel?p.indexLabel:s.indexLabel?s.indexLabel:p.label?p.label:s.label?s.label:"";i._eventManager.objectMap[u]=g,g.center={x:c.x,y:c.y},g.y=p.y,g.radius=m,g.indexLabelText=i.replaceKeywordsWithValue(v,p,s,e),g.indexLabelPlacement=s.indexLabelPlacement,g.indexLabelLineColor=p.indexLabelLineColor?p.indexLabelLineColor:s.indexLabelLineColor?s.indexLabelLineColor:p.color?p.color:s._colorSet[e%s._colorSet.length],g.indexLabelLineThickness=p.indexLabelLineThickness?p.indexLabelLineThickness:s.indexLabelLineThickness,g.indexLabelFontColor=p.indexLabelFontColor?p.indexLabelFontColor:s.indexLabelFontColor,g.indexLabelFontStyle=p.indexLabelFontStyle?p.indexLabelFontStyle:s.indexLabelFontStyle,g.indexLabelFontWeight=p.indexLabelFontWeight?p.indexLabelFontWeight:s.indexLabelFontWeight,g.indexLabelFontSize=p.indexLabelFontSize?p.indexLabelFontSize:s.indexLabelFontSize,g.indexLabelFontFamily=p.indexLabelFontFamily?p.indexLabelFontFamily:s.indexLabelFontFamily,g.indexLabelBackgroundColor=p.indexLabelBackgroundColor?p.indexLabelBackgroundColor:s.indexLabelBackgroundColor?s.indexLabelBackgroundColor:null,g.indexLabelMaxWidth=p.indexLabelMaxWidth?p.indexLabelMaxWidth:s.indexLabelMaxWidth?s.indexLabelMaxWidth:.33*l.width,g.indexLabelWrap=p.indexLabelWrap?p.indexLabelWrap:s.indexLabelWrap,g.startAngle=0===e?s.startAngle?s.startAngle/180*Math.PI:0:d[e-1].endAngle,g.startAngle=(g.startAngle+2*Math.PI)%(2*Math.PI),g.endAngle=g.startAngle+2*Math.PI/t*Math.abs(p.y);var y=(g.endAngle+g.startAngle)/2;y=(y+2*Math.PI)%(2*Math.PI),g.midAngle=y,g.midAngle>Math.PI/2-x&&g.midAngle<Math.PI/2+x?((0===a||d[r].midAngle>g.midAngle)&&(r=e),a++):g.midAngle>3*Math.PI/2-x&&g.midAngle<3*Math.PI/2+x&&((0===n||d[h].midAngle>g.midAngle)&&(h=e),n++),y>Math.PI/2&&y<=3*Math.PI/2?g.hemisphere="left":g.hemisphere="right",g.indexLabelTextBlock=new G(i.plotArea.ctx,{fontSize:g.indexLabelFontSize,fontFamily:g.indexLabelFontFamily,fontColor:g.indexLabelFontColor,fontStyle:g.indexLabelFontStyle,fontWeight:g.indexLabelFontWeight,horizontalAlign:"left",backgroundColor:g.indexLabelBackgroundColor,maxWidth:g.indexLabelMaxWidth,maxHeight:g.indexLabelWrap?5*g.indexLabelFontSize:1.5*g.indexLabelFontSize,text:g.indexLabelText,padding:0,textBaseline:"top"}),g.indexLabelTextBlock.measureText()}var b=0,f=0,P=!1;for(e=0;e<o.length;e++){g=d[(r+e)%o.length];a>1&&g.midAngle>Math.PI/2-x&&g.midAngle<Math.PI/2+x&&(b<=a/2&&!P?(g.hemisphere="right",b++):(g.hemisphere="left",P=!0))}for(P=!1,e=0;e<o.length;e++){g=d[(h+e)%o.length];n>1&&g.midAngle>3*Math.PI/2-x&&g.midAngle<3*Math.PI/2+x&&(f<=n/2&&!P?(g.hemisphere="left",f++):(g.hemisphere="right",P=!0))}}}(),function(e){var n=i.plotArea.ctx;n.fillStyle="grey",n.strokeStyle="grey",n.font="16px "+t,n.textBaseline="middle";var h,x,f,P,T,M,S,k,_,C,w=0,A=0,I=0;for(A=0;A<10&&(A<1||I>0);A++){if(m-=I,I=0,"outside"===s.indexLabelPlacement){for(p=1.3*m,w=0;w<o.length;w++){(X=d[w]).indexLabelTextBlock.x=c.x+p*Math.cos(X.midAngle),X.indexLabelTextBlock.y=c.y+p*Math.sin(X.midAngle),X.indexLabelAngle=X.midAngle,X.radius=m}var L;for(w=0;w<o.length;w++){var X=d[w],B=y(w);if(null!==B){var F=0;if((F=v(L=d[w],$=d[B])-2)<0){for(var z=0,Y=0,D=0;D<o.length;D++)D!==w&&d[D].hemisphere===X.hemisphere&&(d[D].indexLabelTextBlock.y<X.indexLabelTextBlock.y?z++:Y++);var W=F/(z+Y||1)*Y,E=-1*(F-W),O=0,U=0;"right"===X.hemisphere?(O=b(w,W),+(U=b(B,E=-1*(F-O))).toFixed(6)<+E.toFixed(6)&&+O.toFixed(6)<=+W.toFixed(6)&&b(w,-(E-U))):(O=b(B,W),+(U=b(w,E=-1*(F-O))).toFixed(6)<+E.toFixed(6)&&+O.toFixed(6)<=+W.toFixed(6)&&b(B,-(E-U)))}}}}else for(w=0;w<o.length;w++){X=d[w];p="pie"===s.type?.7*m:.8*m;var V=c.x+p*Math.cos(X.midAngle),H=c.y+p*Math.sin(X.midAngle);X.indexLabelTextBlock.x=V,X.indexLabelTextBlock.y=H}for(w=0;w<o.length;w++){var j=(X=d[w]).indexLabelTextBlock.measureText();if(0!==j.height&&0!==j.width){var R=0,N=0;"right"===X.hemisphere?(R=l.x2-(X.indexLabelTextBlock.x+X.indexLabelTextBlock.width+r),R*=-1):R=l.x1-(X.indexLabelTextBlock.x-X.indexLabelTextBlock.width-r),R>0&&(Math.abs(X.indexLabelTextBlock.y-X.indexLabelTextBlock.height/2-c.y)<m||Math.abs(X.indexLabelTextBlock.y+X.indexLabelTextBlock.height/2-c.y)<m)&&((N=R/Math.abs(Math.cos(X.indexLabelAngle)))>9&&(N*=.3),N>I&&(I=N));var q=0,J=0;X.indexLabelAngle>0&&X.indexLabelAngle<Math.PI?(q=l.y2-(X.indexLabelTextBlock.y+X.indexLabelTextBlock.height/2+5),q*=-1):q=l.y1-(X.indexLabelTextBlock.y-X.indexLabelTextBlock.height/2-5),q>0&&Math.abs(X.indexLabelTextBlock.x-c.x)<m&&((J=q/Math.abs(Math.sin(X.indexLabelAngle)))>9&&(J*=.3),J>I&&(I=J))}}function G(t,e,i){for(var a=[],n=0,s=e;a.push(d[s]),s!==i;s=(s+1+o.length)%o.length);for(a.sort((function(t,e){return t.y-e.y})),s=0;s<a.length;s++){var r=a[s];if(!(n<t))break;n+=r.indexLabelTextBlock.height,r.indexLabelTextBlock.text="",r.indexLabelText="",r.indexLabelTextBlock.measureText()}}var K=-1,Z=-1,Q=0;for(D=0;D<o.length;D++)if((L=d[D]).indexLabelText){var $,tt=y(D);if(null!==tt)F=0,(F=v(L,$=d[tt]))<0&&(x=$,f=void 0,P=void 0,T=void 0,M=void 0,S=void 0,k=void 0,_=void 0,C=void 0,f=(h=L).indexLabelTextBlock.x,P=h.indexLabelTextBlock.y-h.indexLabelTextBlock.height/2,T=h.indexLabelTextBlock.x+h.indexLabelTextBlock.width,M=h.indexLabelTextBlock.y+h.indexLabelTextBlock.height/2,S=x.indexLabelTextBlock.x,k=x.indexLabelTextBlock.y-x.indexLabelTextBlock.height/2,_=x.indexLabelTextBlock.x+x.indexLabelTextBlock.width,C=x.indexLabelTextBlock.y+x.indexLabelTextBlock.height/2,!(T<S-r||f>_+r||P>C+r||M<k-r))?(K<0&&(K=D),tt!==K&&(Z=tt),Q+=-F):Q>0&&(G(Q,K,Z),K=-1,Z=-1,Q=0)}Q>0&&G(Q,K,Z)}u(i.animationEnabled&&0===i.renderCount?a?60:30:1),g(e)}(this._options.pieDoughnutBorderColor)}function u(t){t=t||1,h.frame=0,h.maxFrames=t}function g(e){var n=i.plotArea.ctx;if(null!==h&&h.frame<h.maxFrames){0===h.frame&&(h.prevMaxAngle=d[0].startAngle),n.clearRect(l.x1,l.y1,l.width,l.height);for(var r=h.prevMaxAngle+2*Math.PI/h.maxFrames,x=!(1==o.length),c=0;c<o.length;c++){var m=0===c?d[c].startAngle:p,p=m+(d[c].endAngle-d[c].startAngle),v=!1;p>r&&(p=r,v=!0);var y=o[c].color?o[c].color:s._colorSet[c%s._colorSet.length];if(p>m&&q(i.plotArea.ctx,d[c].center,d[c].radius,y,s.type,m,p,x,e),v)break}if("doughnut"===s.type){var b=1;window.devicePixelRatio&&(b=window.devicePixelRatio);var f=4/b;i.plotArea.width/2<80&&(f=8),function(e,a){for(var n,s=72;s>0;s-=1){i.plotArea.ctx.font=s+"px "+t,n=i.plotArea.ctx.measureText(e);var o=2,r=i.plotArea.height/a-o/a;if(n.width<=r)break}}(o[0].total,f*b),i.plotArea.ctx.textAlign="center",i.plotArea.ctx.textBaseline="middle",i.plotArea.ctx.fillStyle=i._options.pieDoughnutTotalTextColor?i._options.pieDoughnutTotalTextColor:"black",i.plotArea.ctx.fillText(o[0].total,i.plotArea.width/2,i.plotArea.height/2)}h.frame++,h.prevMaxAngle=r,h.frame<h.maxFrames?i.animationRequestId=i.requestAnimFrame.call(window,g):u(a?15:4)}}function v(t,e){var i=t.indexLabelTextBlock.y,a=t.indexLabelTextBlock.y-t.indexLabelTextBlock.height/2,n=t.indexLabelTextBlock.y+t.indexLabelTextBlock.height/2,s=e.indexLabelTextBlock.y,o=e.indexLabelTextBlock.y-e.indexLabelTextBlock.height/2,r=e.indexLabelTextBlock.y+e.indexLabelTextBlock.height/2;return s>i?o-n:a-r}function y(t){for(var e=null,i=1;i<o.length;i++){if(e=(t+i+d.length)%d.length,d[e].hemisphere!==d[t].hemisphere){e=null;break}if(d[e].indexLabelText&&e!==t&&(v(d[e],d[t])<0||("right"===d[t].hemisphere?d[e].indexLabelTextBlock.y>=d[t].indexLabelTextBlock.y:d[e].indexLabelTextBlock.y<=d[t].indexLabelTextBlock.y)))break;e=null}return e}function b(t,e){e=e||0;var i=0,a=c.y-1*p,n=c.y+1*p;if(t>=0&&t<o.length){var s=d[t];if(e<0&&s.indexLabelTextBlock.y<a||e>0&&s.indexLabelTextBlock.y>n)return 0;var r,l,h,u,g=e;g<0?s.indexLabelTextBlock.y-s.indexLabelTextBlock.height/2>a&&s.indexLabelTextBlock.y-s.indexLabelTextBlock.height/2+g<a&&(g=-(a-(s.indexLabelTextBlock.y-s.indexLabelTextBlock.height/2+g))):s.indexLabelTextBlock.y+s.indexLabelTextBlock.height/2<a&&s.indexLabelTextBlock.y+s.indexLabelTextBlock.height/2+g>n&&(g=s.indexLabelTextBlock.y+s.indexLabelTextBlock.height/2+g-n);var f=s.indexLabelTextBlock.y+g,P=0;P="right"===s.hemisphere?c.x+Math.sqrt(Math.pow(p,2)-Math.pow(f-c.y,2)):c.x-Math.sqrt(Math.pow(p,2)-Math.pow(f-c.y,2)),l=c.x+m*Math.cos(s.midAngle),h=c.y+m*Math.sin(s.midAngle),r=Math.sqrt(Math.pow(P-l,2)+Math.pow(f-h,2)),u=Math.acos(m/p),g=Math.acos((p*p+m*m-r*r)/(2*m*p))<u?f-s.indexLabelTextBlock.y:0;var T,M=function(t){for(var e=null,i=1;i<o.length;i++){if(e=(t-i+d.length)%d.length,d[e].hemisphere!==d[t].hemisphere){e=null;break}if(d[e].indexLabelText&&d[e].hemisphere===d[t].hemisphere&&e!==t&&(v(d[e],d[t])<0||("right"===d[t].hemisphere?d[e].indexLabelTextBlock.y<=d[t].indexLabelTextBlock.y:d[e].indexLabelTextBlock.y>=d[t].indexLabelTextBlock.y)))break;e=null}return e}(t),S=y(t),k=0,_=0;if(g<0){if(i=g,null!==(T="right"===s.hemisphere?M:S)){var C=-g;(w=s.indexLabelTextBlock.y-s.indexLabelTextBlock.height/2-(d[T].indexLabelTextBlock.y+d[T].indexLabelTextBlock.height/2))-C<2&&(+(_=b(T,k=-C)).toFixed(6)>+k.toFixed(6)&&(i=w>2?-(w-2):-(C-(_-k))))}}else if(g>0&&(i=g,null!==(T="right"===s.hemisphere?S:M))){var w;C=g;(w=d[T].indexLabelTextBlock.y-d[T].indexLabelTextBlock.height/2-(s.indexLabelTextBlock.y+s.indexLabelTextBlock.height/2))-C<2&&(+(_=b(T,k=C)).toFixed(6)<+k.toFixed(6)&&(i=w>2?w-2:C-(k-_)))}if(i){var A=s.indexLabelTextBlock.y+i,I=0;if(I="right"===s.hemisphere?c.x+Math.sqrt(Math.pow(p,2)-Math.pow(A-c.y,2)):c.x-Math.sqrt(Math.pow(p,2)-Math.pow(A-c.y,2)),s.midAngle>Math.PI/2-x&&s.midAngle<Math.PI/2+x){var L=(t-1+d.length)%d.length,X=d[L],B=d[(t+1+d.length)%d.length];"left"===s.hemisphere&&"right"===X.hemisphere&&I>X.indexLabelTextBlock.x?I=X.indexLabelTextBlock.x-15:"right"===s.hemisphere&&"left"===B.hemisphere&&I<B.indexLabelTextBlock.x&&(I=B.indexLabelTextBlock.x+15)}else if(s.midAngle>3*Math.PI/2-x&&s.midAngle<3*Math.PI/2+x){L=(t-1+d.length)%d.length,X=d[L],B=d[(t+1+d.length)%d.length];"right"===s.hemisphere&&"left"===X.hemisphere&&I<X.indexLabelTextBlock.x?I=X.indexLabelTextBlock.x+15:"left"===s.hemisphere&&"right"===B.hemisphere&&I>B.indexLabelTextBlock.x&&(I=B.indexLabelTextBlock.x-15)}s.indexLabelTextBlock.y=A,s.indexLabelTextBlock.x=I,s.indexLabelAngle=Math.atan2(s.indexLabelTextBlock.y-c.y,s.indexLabelTextBlock.x-c.x)}}return i}},E.prototype.animationRequestId=null,E.prototype.requestAnimFrame=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){window.setTimeout(t,1e3/60)},E.prototype.cancelRequestAnimFrame=window.cancelAnimationFrame||window.webkitCancelRequestAnimationFrame||window.mozCancelRequestAnimationFrame||window.oCancelRequestAnimationFrame||window.msCancelRequestAnimationFrame||clearTimeout,J.prototype.registerSpace=function(t,e){"top"===t?this._topOccupied+=e.height:"bottom"===t?this._bottomOccupied+=e.height:"left"===t?this._leftOccupied+=e.width:"right"===t&&(this._rightOccupied+=e.width)},J.prototype.unRegisterSpace=function(t,e){"top"===t?this._topOccupied-=e.height:"bottom"===t?this._bottomOccupied-=e.height:"left"===t?this._leftOccupied-=e.width:"right"===t&&(this._rightOccupied-=e.width)},J.prototype.getFreeSpace=function(){return{x1:this._leftOccupied,y1:this._topOccupied,x2:this.chart.width-this._rightOccupied,y2:this.chart.height-this._bottomOccupied,width:this.chart.width-this._rightOccupied-this._leftOccupied,height:this.chart.height-this._bottomOccupied-this._topOccupied}},J.prototype.reset=function(){this._topOccupied=0,this._bottomOccupied=3,this._leftOccupied=0,this._rightOccupied=0},h(G,W),G.prototype.render=function(t){t&&this.ctx.save();var e=this.ctx.font;this.ctx.textBaseline=this.textBaseline;var i=0;this._isDirty&&this.measureText(this.ctx),this.ctx.translate(this.x,this.y+i),"middle"===this.textBaseline&&(i=-this._lineHeight/2),this.ctx.font=this._getFontString(),this.ctx.rotate(Math.PI/180*this.angle);var a=0,n=this.padding,s=null;(this.borderThickness>0&&this.borderColor||this.backgroundColor)&&this.ctx.roundRect(0,i,this.width,this.height,this.cornerRadius,this.borderThickness,this.backgroundColor,this.borderColor),this.ctx.fillStyle=this.fontColor;for(var o=0;o<this._wrappedText.lines.length;o++)s=this._wrappedText.lines[o],"right"===this.horizontalAlign?a=this.width-s.width-this.padding:"left"===this.horizontalAlign?a=this.padding:"center"===this.horizontalAlign&&(a=(this.width-2*this.padding)/2-s.width/2+this.padding),this.ctx.fillText(s.text,a,n),n+=s.height;this.ctx.font=e,t&&this.ctx.restore()},G.prototype.setText=function(t){this.text=t,this._isDirty=!0,this._wrappedText=null},G.prototype.measureText=function(){if(null===this.maxWidth)throw"Please set maxWidth and height for TextBlock";return this._wrapText(this.ctx),this._isDirty=!1,{width:this.width,height:this.height}},G.prototype._getLineWithWidth=function(t,e,i){if(i=i||!1,!(t=String(t)))return{text:"",width:0};var a=0,n=0,s=t.length-1,o=1/0;for(this.ctx.font=this._getFontString();n<=s;){o=Math.floor((n+s)/2);var r=t.substr(0,o+1);if((a=this.ctx.measureText(r).width)<e)n=o+1;else{if(!(a>e))break;s=o-1}}a>e&&r.length>1&&(r=r.substr(0,r.length-1),a=this.ctx.measureText(r).width);var l=!0;if(r.length!==t.length&&" "!==t[r.length]||(l=!1),l){var h=r.split(" ");h.length>1&&h.pop(),r=h.join(" "),a=this.ctx.measureText(r).width}return{text:r,width:a}},G.prototype._wrapText=function(){var t=new String(m(this.text)),e=[],i=this.ctx.font,a=0,n=0;for(this.ctx.font=this._getFontString();t.length>0;){var s=this.maxWidth-2*this.padding;s<70&&(s=70);var o,r=this.maxHeight-2*this.padding;if((o=this._getLineWithWidth(t,s,!1)).height=this._lineHeight,e.push(o),n=Math.max(n,o.width),a+=o.height,t=m(t.slice(o.text.length,t.length)),r&&a>r)a-=(o=e.pop()).height}this._wrappedText={lines:e,width:n,height:a},this.width=n+2*this.padding,this.height=a+2*this.padding,this.ctx.font=i},G.prototype._getFontString=function(){return L("",this,null)},h(K,W),K.prototype.render=function(){if(this.text){var t,e,i=this.chart.layoutManager.getFreeSpace(),a=0,n=0,s=0,o=0,r=0;"top"===this.verticalAlign||"bottom"===this.verticalAlign?(o=i.width-2*this.margin,r=.5*i.height-2*this.margin,s=0):"center"===this.verticalAlign&&("left"===this.horizontalAlign||"right"===this.horizontalAlign?(o=i.height-2*this.margin,r=.5*i.width-2*this.margin):"center"===this.horizontalAlign&&(o=i.width-2*this.margin,r=.5*i.height-2*this.margin));var l=new G(this.ctx,{fontSize:this.fontSize,fontFamily:this.fontFamily,fontColor:this.fontColor,fontStyle:this.fontStyle,fontWeight:this.fontWeight,horizontalAlign:this.horizontalAlign,verticalAlign:this.verticalAlign,borderColor:this.borderColor,borderThickness:this.borderThickness,backgroundColor:this.backgroundColor,maxWidth:o,maxHeight:r,cornerRadius:this.cornerRadius,text:this.text,padding:this.padding,textBaseline:"top"}),h=l.measureText();"top"===this.verticalAlign||"bottom"===this.verticalAlign?("top"===this.verticalAlign?(n=this.margin,e="top"):"bottom"===this.verticalAlign&&(n=i.y2-this.margin-h.height,e="bottom"),"left"===this.horizontalAlign?a=i.x1+this.margin:"center"===this.horizontalAlign?a=i.x1+(o/2-h.width/2)+this.margin:"right"===this.horizontalAlign&&(a=i.x2-this.margin-h.width),t=this.horizontalAlign,this.width=h.width,this.height=h.height):"center"===this.verticalAlign&&("left"===this.horizontalAlign?(a=i.x1+this.margin,n=i.y2-this.margin-(o/2-h.width/2),s=-90,e="left",this.width=h.height,this.height=h.width):"right"===this.horizontalAlign?(a=i.x2-this.margin,n=i.y1+this.margin+(o/2-h.width/2),s=90,e="right",this.width=h.height,this.height=h.width):"center"===this.horizontalAlign&&(n=i.y1+(i.height/2-h.height/2),a=i.x1+(i.width/2-h.width/2),e="center",this.width=h.width,this.height=h.height),t="center"),l.x=a,l.y=n,l.angle=s,l.horizontalAlign=t,l.render(!0),this.chart.layoutManager.registerSpace(e,{width:this.width+2*this.margin,height:this.height+2*this.margin}),this.bounds={x1:a,y1:n,x2:a+this.width,y2:n+this.height},this.ctx.textBaseline="top"}},h(Z,W),Z.prototype.render=function(){var t=this.chart.layoutManager.getFreeSpace(),e=null,i=0,a=0,n=0,s=0,o=[],r=[];"top"===this.verticalAlign||"bottom"===this.verticalAlign?(this.orientation="horizontal",e=this.verticalAlign,n=.9*t.width,s=.5*t.height):"center"===this.verticalAlign&&(this.orientation="vertical",e=this.horizontalAlign,n=.5*t.width,s=.9*t.height);for(var l=0;l<this.dataSeries.length;l++){var h=this.dataSeries[l],d=h.legendMarkerType?h.legendMarkerType:"line"!==h.type&&"stepLine"!==h.type&&"spline"!==h.type&&"scatter"!==h.type&&"bubble"!==h.type||!h.markerType?$.getDefaultLegendMarker(h.type):h.markerType,x=h.legendText?h.legendText:h.name,c=h.legendMarkerColor?h.legendMarkerColor:h.markerColor?h.markerColor:h._colorSet[0],m=h.markerSize||"line"!==h.type&&"stepLine"!==h.type&&"spline"!==h.type?.6*this.lineHeight:0;h._colorSet[0];if("pie"!==h.type&&"doughnut"!==h.type&&"funnel"!==h.type){var p={markerType:d,markerColor:c,text:x,textBlock:null,chartType:h.type,markerSize:m,lineColor:h._colorSet[0],dataSeriesIndex:l,dataPointIndex:null};o.push(p)}else for(var u=0;u<h.dataPoints.length;u++){var v=h.dataPoints[u];d=v.legendMarkerType?v.legendMarkerType:h.legendMarkerType?h.legendMarkerType:$.getDefaultLegendMarker(h.type);x=v.legendText?v.legendText:h.legendText?h.legendText:v.name?v.name:"DataPoint: "+(u+1),c=v.markerColor?v.markerColor:h.markerColor?h.markerColor:v.color?v.color:h.color?h.color:h._colorSet[u%h._colorSet.length],m=0!==v.markerSize&&(0!==h.markerSize||v.markerSize)||"line"!==h.type&&"stepLine"!==h.type&&"spline"!==h.type?.6*this.lineHeight:0,p={markerType:d,markerColor:c,text:x,textBlock:null,chartType:h.type,markerSize:m,dataSeriesIndex:l,dataPointIndex:u};"funnel"===h.type?o.unshift(p):o.push(p)}p=null}if(o.length>0){var y=null,b=0;for(l=0;l<o.length;l++){p=o[l];"horizontal"===this.orientation?(p.textBlock=new G(this.ctx,{x:0,y:0,maxWidth:n,maxHeight:this.lineHeight,angle:0,text:p.text,horizontalAlign:"left",fontSize:this.fontSize,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontColor:this.fontColor,fontStyle:this.fontStyle,textBaseline:"top"}),p.textBlock.measureText(),(!y||y.width+p.textBlock.width+(0===y.width?0:this.horizontalSpacing)>n)&&(y={items:[],width:0},r.push(y),this.height=r.length*(p.textBlock.height+5)),p.textBlock.x=y.width,p.textBlock.y=0,y.width+=Math.round(p.textBlock.width+p.textBlock._lineHeight+(0===y.width?0:.5*p.textBlock._lineHeight)),y.items.push(p),this.width=Math.max(y.width,this.width)):(this.height+this.lineHeight<s?(y={items:[],width:0},r.push(y),this.height=r.length*this.lineHeight):(y=r[b],b=(b+1)%r.length),p.textBlock=new G(this.ctx,{x:0,y:0,maxWidth:n,maxHeight:1.5*this.fontSize,angle:0,text:p.text,horizontalAlign:"left",fontSize:this.fontSize,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontColor:this.fontColor,fontStyle:this.fontStyle,textBaseline:"top"}),p.textBlock.measureText(),p.textBlock.x=y.width,p.textBlock.y=0,y.width+=p.textBlock.width+p.textBlock._lineHeight+(0===y.width?0:.5*p.textBlock._lineHeight),y.items.push(p),this.width=Math.max(y.width,this.width))}this.height=r.length*this.lineHeight}"top"===this.verticalAlign?(a="left"===this.horizontalAlign?t.x1+2:"right"===this.horizontalAlign?t.x2-this.width-2:t.x1+t.width/2-this.width/2,i=t.y1):"center"===this.verticalAlign?(a="left"===this.horizontalAlign?t.x1+2:"right"===this.horizontalAlign?t.x2-this.width-2:t.x1+t.width/2-this.width/2,i=t.y1+t.height/2-this.height/2):"bottom"===this.verticalAlign&&(a="left"===this.horizontalAlign?t.x1+2:"right"===this.horizontalAlign?t.x2-this.width-2:t.x1+t.width/2-this.width/2,i=t.y2-this.height-5),this.items=o;for(l=0;l<this.items.length;l++){(p=o[l]).id=++this.chart._eventManager.lastObjectId,this.chart._eventManager.objectMap[p.id]={id:p.id,objectType:"legendItem",legendItemIndex:l,dataSeriesIndex:p.dataSeriesIndex,dataPointIndex:p.dataPointIndex}}for(l=0;l<r.length;l++){y=r[l];for(var f=0;f<y.items.length;f++){var P=(p=y.items[f]).textBlock.x+a+(0===f?.2*m:.4*this.lineHeight+.2*m),T=i+l*this.lineHeight,M=P;this.chart.data[p.dataSeriesIndex].visible||(this.ctx.globalAlpha=.5),"line"!==p.chartType&&"stepLine"!==p.chartType&&"spline"!==p.chartType||(this.ctx.strokeStyle=p.lineColor,this.ctx.lineWidth=Math.ceil(this.lineHeight/8),this.ctx.beginPath(),this.ctx.moveTo(P-.1*this.lineHeight,T+this.lineHeight/2),this.ctx.lineTo(P+.7*this.lineHeight,T+this.lineHeight/2),this.ctx.stroke(),M-=.1*this.lineHeight),st.drawMarker(P+m/2,T+this.lineHeight/2,this.ctx,p.markerType,m,p.markerColor,null,0),p.textBlock.x=P+Math.round(.9*this.lineHeight),p.textBlock.y=T,p.textBlock.render(!0),this.chart.data[p.dataSeriesIndex].visible||(this.ctx.globalAlpha=1);var S=g(p.id);this.ghostCtx.fillStyle=S,this.ghostCtx.beginPath(),this.ghostCtx.fillRect(M,p.textBlock.y,p.textBlock.x+p.textBlock.width-M,p.textBlock.height),p.x1=this.chart._eventManager.objectMap[p.id].x1=M,p.y1=this.chart._eventManager.objectMap[p.id].y1=p.textBlock.y,p.x2=this.chart._eventManager.objectMap[p.id].x2=p.textBlock.x+p.textBlock.width,p.y2=this.chart._eventManager.objectMap[p.id].y2=p.textBlock.y+p.textBlock.height}}this.chart.layoutManager.registerSpace(e,{width:this.width+2+2,height:this.height+5+5}),this.bounds={x1:a,y1:i,x2:a+this.width,y2:i+this.height}},h(Q,W),Q.prototype.render=function(){var t=this.chart.layoutManager.getFreeSpace();this.ctx.fillStyle="red",this.ctx.fillRect(t.x1,t.y1,t.x2,t.y2)},h($,W),$.prototype.getDefaultAxisPlacement=function(){var t=this.type;return"column"===t||"funnel"===t||"line"===t||"stepLine"===t||"spline"===t||"area"===t||"stepArea"===t||"splineArea"===t||"stackedColumn"===t||"stackedLine"===t||"bubble"===t||"scatter"===t||"stackedArea"===t||"stackedColumn100"===t||"stackedLine100"===t||"stackedArea100"===t?"normal":"bar"===t||"stackedBar"===t||"stackedBar100"===t?"xySwapped":"pie"===t||"doughnut"===t?"none":(window.console.log("Unknown Chart Type: "+t),null)},$.getDefaultLegendMarker=function(t){return"column"===t||"funnel"===t||"stackedColumn"===t||"stackedLine"===t||"bar"===t||"stackedBar"===t||"stackedBar100"===t||"bubble"===t||"scatter"===t||"stackedColumn100"===t||"stackedLine100"===t||"stepArea"===t?"square":"line"===t||"stepLine"===t||"spline"===t||"pie"===t||"doughnut"===t?"circle":"area"===t||"splineArea"===t||"stackedArea"===t||"stackedArea100"===t?"triangle":(window.console.log("Unknown Chart Type: "+t),null)},$.prototype.getDataPointAtX=function(t,e){if(!this.dataPoints||0===this.dataPoints.length)return null;var i={dataPoint:null,distance:1/0,index:NaN},a=null,n=0,s=0,o=1,r=1/0,l=0,h=0,d=0;if("none"!==this.chart.plotInfo.axisPlacement){var x=this.dataPoints[this.dataPoints.length-1].x-this.dataPoints[0].x;d=x>0?(this.dataPoints.length-1)/x*(t-this.dataPoints[0].x)>>0:0}for(;;){if((s=o>0?d+n:d-n)>=0&&s<this.dataPoints.length){a=this.dataPoints[s];var c=Math.abs(a.x-t);c<i.distance&&(i.dataPoint=a,i.distance=c,i.index=s);var m=Math.abs(a.x-t);if(m<=r?r=m:o>0?l++:h++,l>1e3&&h>1e3)break}else if(d-n<0&&d+n>=this.dataPoints.length)break;-1===o?(n++,o=1):o=-1}return e||i.dataPoint.x!==t?e&&null!==i.dataPoint?i:null:i},$.prototype.getDataPointAtXY=function(t,e,i){if(!this.dataPoints||0===this.dataPoints.length)return null;i=i||!1;var a=[],n=0,s=0,o=1,r=!1,l=1/0,h=0,d=0,x=0;if("none"!==this.chart.plotInfo.axisPlacement){var c=this.chart.axisX.getXValueAt({x:t,y:e}),m=this.dataPoints[this.dataPoints.length-1].x-this.dataPoints[0].x;x=m>0?(this.dataPoints.length-1)/m*(c-this.dataPoints[0].x)>>0:0}for(;;){if((s=o>0?x+n:x-n)>=0&&s<this.dataPoints.length){var p=this.dataPointIds[s],u=this.chart._eventManager.objectMap[p],g=this.dataPoints[s];if(u){switch(this.type){case"column":case"stackedColumn":case"stackedColumn100":case"bar":case"funnel":case"stackedBar":case"stackedBar100":t>=u.x1&&t<=u.x2&&e>=u.y1&&e<=u.y2&&(a.push({dataPoint:g,dataPointIndex:s,dataSeries:this,distance:Math.min(Math.abs(u.x1-t),Math.abs(u.x2-t),Math.abs(u.y1-e),Math.abs(u.y2-e))}),r=!0);break;case"line":case"stepLine":case"spline":case"area":case"stepArea":case"stackedArea":case"stackedArea100":case"splineArea":case"scatter":var v=X("markerSize",g,this)||4,y=i?20:v;(f=Math.sqrt(Math.pow(u.x1-t,2)+Math.pow(u.y1-e,2)))<=y&&a.push({dataPoint:g,dataPointIndex:s,dataSeries:this,distance:f});var b=Math.abs(u.x1-t);b<=l?l=b:o>0?h++:d++,f<=v/2&&(r=!0);break;case"bubble":v=u.size;(f=Math.sqrt(Math.pow(u.x1-t,2)+Math.pow(u.y1-e,2)))<=v/2&&(a.push({dataPoint:g,dataPointIndex:s,dataSeries:this,distance:f}),r=!0);break;case"pie":case"doughnut":var f,P=u.center,T="doughnut"===this.type?.6*u.radius:0;if((f=Math.sqrt(Math.pow(P.x-t,2)+Math.pow(P.y-e,2)))<u.radius&&f>T){var M=e-P.y,S=t-P.x,k=Math.atan2(M,S);k<0&&(k+=2*Math.PI),k=(k/Math.PI*180%360+360)%360;var _=(u.startAngle/Math.PI*180%360+360)%360,C=(u.endAngle/Math.PI*180%360+360)%360;C<1e-6&&u.endAngle>1&&(C=360),_>C&&(C+=360,k<_&&(k+=360)),k>_&&k<C&&(a.push({dataPoint:g,dataPointIndex:s,dataSeries:this,distance:0}),r=!0)}}if(r||h>1e3&&d>1e3)break}}else if(x-n<0&&x+n>=this.dataPoints.length)break;-1===o?(n++,o=1):o=-1}for(var w=null,A=0;A<a.length;A++)w?a[A].distance<=w.distance&&(w=a[A]):w=a[A];return w},$.prototype.getMarkerProperties=function(t,e,i,a){var n=this.dataPoints,s=this,o=n[t].markerColor?n[t].markerColor:s.markerColor?s.markerColor:n[t].color?n[t].color:s.color?s.color:s._colorSet[t%s._colorSet.length],r=n[t].markerBorderColor?n[t].markerBorderColor:s.markerBorderColor?s.markerBorderColor:null,l=n[t].markerBorderThickness?n[t].markerBorderThickness:s.markerBorderThickness?s.markerBorderThickness:null;return{x:e,y:i,ctx:a,type:n[t].markerType?n[t].markerType:s.markerType,size:n[t].markerSize?n[t].markerSize:s.markerSize,color:o,borderColor:r,borderThickness:l}},h(tt,W),tt.prototype.createLabels=function(){var t,e,i=0,a=0,n=0,s=0;if("bottom"===this._position||"top"===this._position?(s=this.lineCoordinates.width/Math.abs(this.maximum-this.minimum)*this.interval,a=this.labelAutoFit?void 0===this._options.labelMaxWidth?.9*s>>0:this.labelMaxWidth:void 0===this._options.labelMaxWidth?.7*this.chart.width>>0:this.labelMaxWidth,n=void 0===this._options.labelWrap||this.labelWrap?.5*this.chart.height>>0:1.5*this.labelFontSize):"left"!==this._position&&"right"!==this._position||(s=this.lineCoordinates.height/Math.abs(this.maximum-this.minimum)*this.interval,a=this.labelAutoFit?void 0===this._options.labelMaxWidth?.3*this.chart.width>>0:this.labelMaxWidth:void 0===this._options.labelMaxWidth?.5*this.chart.width>>0:this.labelMaxWidth,n=void 0===this._options.labelWrap||this.labelWrap?2*s>>0:1.5*this.labelFontSize),"axisX"===this.type&&"dateTime"===this.chart.plotInfo.axisXValueType)for(e=d(new Date(this.maximum),this.interval,this.intervalType),i=this.intervalStartPosition;i<e;d(i,this.interval,this.intervalType)){var o="axisX"===this.type&&this.labels[i]?this.labels[i]:C(i,this.valueFormatString,this.chart._cultureInfo);t=new G(this.ctx,{x:0,y:0,maxWidth:a,maxHeight:n,angle:this.labelAngle,text:this.prefix+o+this.suffix,horizontalAlign:"left",fontSize:this.labelFontSize,fontFamily:this.labelFontFamily,fontWeight:this.labelFontWeight,fontColor:this.labelFontColor,fontStyle:this.labelFontStyle,textBaseline:"middle"}),this._labels.push({position:i.getTime(),textBlock:t,effectiveHeight:null})}else{if(e=this.maximum,this.labels&&this.labels.length){var r=Math.ceil(this.interval),l=Math.ceil(this.intervalStartPosition),h=!1;for(i=l;i<this.maximum;i+=r){if(!this.labels[i]){h=!1;break}h=!0}h&&(this.interval=r,this.intervalStartPosition=l)}for(i=this.intervalStartPosition;i<=e;i+=this.interval){o="axisX"===this.type&&this.labels[i]?this.labels[i]:w(i,this.valueFormatString,this.chart._cultureInfo);o="axisY"===this.type&&this.isSecondaryAxis?this.secondaryPrefix+o+this.secondarySuffix:this.prefix+o+this.suffix,t=new G(this.ctx,{x:0,y:0,maxWidth:a,maxHeight:n,angle:this.labelAngle,text:o,horizontalAlign:"left",fontSize:this.labelFontSize,fontFamily:this.labelFontFamily,fontWeight:this.labelFontWeight,fontColor:this.labelFontColor,fontStyle:this.labelFontStyle,textBaseline:"middle",borderThickness:0}),this._labels.push({position:i,textBlock:t,effectiveHeight:null})}}for(i=0;i<this.stripLines.length;i++){var x=this.stripLines[i];t=new G(this.ctx,{x:0,y:0,backgroundColor:x.labelBackgroundColor,maxWidth:a,maxHeight:n,angle:this.labelAngle,text:x.label,horizontalAlign:"left",fontSize:x.labelFontSize,fontFamily:x.labelFontFamily,fontWeight:x.labelFontWeight,fontColor:x.labelFontColor,fontStyle:x.labelFontStyle,textBaseline:"middle",borderThickness:0}),this._labels.push({position:x.value,textBlock:t,effectiveHeight:null,stripLine:x})}},tt.prototype.createLabelsAndCalculateWidth=function(){var t=0;if(this._labels=[],"left"===this._position||"right"===this._position)for(this.createLabels(),i=0;i<this._labels.length;i++){var e=this._labels[i].textBlock.measureText(),a=0;t<(a=0===this.labelAngle?e.width:e.width*Math.cos(Math.PI/180*Math.abs(this.labelAngle))+e.height/2*Math.sin(Math.PI/180*Math.abs(this.labelAngle)))&&(t=a),this._labels[i].effectiveWidth=a}return(this.title?b(this.titleFontFamily,this.titleFontSize,this.titleFontWeight)+2:0)+t+this.tickLength+5},tt.prototype.createLabelsAndCalculateHeight=function(){var t=0;this._labels=[];var e=0;if(this.createLabels(),"bottom"===this._position||"top"===this._position)for(e=0;e<this._labels.length;e++){var i=this._labels[e].textBlock.measureText(),a=0;t<(a=0===this.labelAngle?i.height:i.width*Math.sin(Math.PI/180*Math.abs(this.labelAngle))+i.height/2*Math.cos(Math.PI/180*Math.abs(this.labelAngle)))&&(t=a),this._labels[e].effectiveHeight=a}return(this.title?b(this.titleFontFamily,this.titleFontSize,this.titleFontWeight)+2:0)+t+this.tickLength+5},tt.setLayoutAndRender=function(t,e,i,a,n,s){var o,r,l,h,d=t.chart,x=d.ctx;if(t.calculateAxisParameters(),e&&e.calculateAxisParameters(),i&&i.calculateAxisParameters(),e&&i&&void 0===e._options.maximum&&void 0===e._options.minimum&&void 0===e._options.interval&&void 0===i._options.maximum&&void 0===i._options.minimum&&void 0===i._options.interval){var c=(e.maximum-e.minimum)/e.interval,m=(i.maximum-i.minimum)/i.interval;c>m?i.maximum=i.interval*c+i.minimum:m>c&&(e.maximum=e.interval*m+e.minimum)}e&&e.lineThickness&&e.lineThickness,i&&i.lineThickness&&i.lineThickness,e&&e.gridThickness&&e.gridThickness,i&&i.gridThickness&&i.gridThickness;var p=e?e.margin:0;e&&e.margin;if("normal"===a){t.lineCoordinates={};var u=Math.ceil(e?e.createLabelsAndCalculateWidth():0);o=Math.round(n.x1+u+p),t.lineCoordinates.x1=o;var g=Math.ceil(i?i.createLabelsAndCalculateWidth():0);l=Math.round(n.x2-g>t.chart.width-10?t.chart.width-10:n.x2-g),t.lineCoordinates.x2=l,t.lineCoordinates.width=Math.abs(l-o);var v=Math.ceil(t.createLabelsAndCalculateHeight());r=Math.round(n.y2-v-t.margin),h=Math.round(n.y2-t.margin),t.lineCoordinates.y1=r,t.lineCoordinates.y2=r,t.boundingRect={x1:o,y1:r,x2:l,y2:h,width:l-o,height:h-r},e&&(o=Math.round(n.x1+e.margin),r=Math.round(n.y1<10?10:n.y1),l=Math.round(n.x1+u+e.margin),h=Math.round(n.y2-v-t.margin),e.lineCoordinates={x1:l,y1:r,x2:l,y2:h,height:Math.abs(h-r)},e.boundingRect={x1:o,y1:r,x2:l,y2:h,width:l-o,height:h-r}),i&&(o=Math.round(t.lineCoordinates.x2),r=Math.round(n.y1<10?10:n.y1),l=Math.round(o+g+i.margin),h=Math.round(n.y2-v-t.margin),i.lineCoordinates={x1:o,y1:r,x2:o,y2:h,height:Math.abs(h-r)},i.boundingRect={x1:o,y1:r,x2:l,y2:h,width:l-o,height:h-r}),t.calculateValueToPixelconversionParameters(),e&&e.calculateValueToPixelconversionParameters(),i&&i.calculateValueToPixelconversionParameters(),x.save(),"funnel"!==s&&x.rect(t.boundingRect.x1-40,t.boundingRect.y1,t.boundingRect.width+80,t.boundingRect.height),x.clip(),"funnel"!==s&&t.renderLabelsTicksAndTitle(),x.restore(),"funnel"!==s&&(e&&e.renderLabelsTicksAndTitle(),i&&i.renderLabelsTicksAndTitle()),d.preparePlotArea();var y=t.chart.plotArea;x.save(),"funnel"!==s&&x.rect(y.x1,y.y1,Math.abs(y.x2-y.x1),Math.abs(y.y2-y.y1)),x.clip(),"funnel"!==s&&(t.renderStripLinesOfThicknessType("value"),e&&e.renderStripLinesOfThicknessType("value"),i&&i.renderStripLinesOfThicknessType("value"),t.renderInterlacedColors(),e&&e.renderInterlacedColors(),i&&i.renderInterlacedColors()),x.restore(),"funnel"!==s&&(t.renderGrid(),e&&e.renderGrid(),i&&i.renderGrid(),t.renderAxisLine(),e&&e.renderAxisLine(),i&&i.renderAxisLine()),"funnel"!==s&&(t.renderStripLinesOfThicknessType("pixel"),e&&e.renderStripLinesOfThicknessType("pixel"),i&&i.renderStripLinesOfThicknessType("pixel"))}else{var b=Math.ceil(t.createLabelsAndCalculateWidth());e&&(e.lineCoordinates={},o=Math.round(n.x1+b+t.margin),l=Math.round(n.x2>e.chart.width-10?e.chart.width-10:n.x2),e.lineCoordinates.x1=o,e.lineCoordinates.x2=l,e.lineCoordinates.width=Math.abs(l-o)),i&&(i.lineCoordinates={},o=Math.round(n.x1+b+t.margin),l=Math.round(n.x2>i.chart.width-10?i.chart.width-10:n.x2),i.lineCoordinates.x1=o,i.lineCoordinates.x2=l,i.lineCoordinates.width=Math.abs(l-o));var f=Math.ceil(e?e.createLabelsAndCalculateHeight():0),P=Math.ceil(i?i.createLabelsAndCalculateHeight():0);e&&(r=Math.round(n.y2-f-e.margin),h=Math.round(n.y2-p>e.chart.height-10?e.chart.height-10:n.y2-p),e.lineCoordinates.y1=r,e.lineCoordinates.y2=r,e.boundingRect={x1:o,y1:r,x2:l,y2:h,width:l-o,height:f}),i&&(r=Math.round(n.y1+i.margin),h=n.y1+i.margin+P,i.lineCoordinates.y1=h,i.lineCoordinates.y2=h,i.boundingRect={x1:o,y1:r,x2:l,y2:h,width:l-o,height:P}),o=Math.round(n.x1+t.margin),r=Math.round(i?i.lineCoordinates.y2:n.y1<10?10:n.y1),l=Math.round(n.x1+b+t.margin),h=Math.round(e?e.lineCoordinates.y1:n.y2-p>t.chart.height-10?t.chart.height-10:n.y2-p),t.lineCoordinates={x1:l,y1:r,x2:l,y2:h,height:Math.abs(h-r)},t.boundingRect={x1:o,y1:r,x2:l,y2:h,width:l-o,height:h-r},t.calculateValueToPixelconversionParameters(),e&&e.calculateValueToPixelconversionParameters(),i&&i.calculateValueToPixelconversionParameters(),e&&e.renderLabelsTicksAndTitle(),i&&i.renderLabelsTicksAndTitle(),t.renderLabelsTicksAndTitle(),d.preparePlotArea();y=t.chart.plotArea;x.save(),x.rect(y.x1,y.y1,Math.abs(y.x2-y.x1),Math.abs(y.y2-y.y1)),x.clip(),t.renderStripLinesOfThicknessType("value"),e&&e.renderStripLinesOfThicknessType("value"),i&&i.renderStripLinesOfThicknessType("value"),t.renderInterlacedColors(),e&&e.renderInterlacedColors(),i&&i.renderInterlacedColors(),x.restore(),t.renderGrid(),e&&e.renderGrid(),i&&i.renderGrid(),t.renderAxisLine(),e&&e.renderAxisLine(),i&&i.renderAxisLine(),t.renderStripLinesOfThicknessType("pixel"),e&&e.renderStripLinesOfThicknessType("pixel"),i&&i.renderStripLinesOfThicknessType("pixel")}},tt.prototype.renderLabelsTicksAndTitle=function(){var t=!1,e=0,i=1,a=0;this.conversionParameters.pixelPerUnit,this.interval;if(0!==this.labelAngle&&360!==this.labelAngle&&(i=1.2),void 0===this._options.interval){if("bottom"===this._position||"top"===this._position){for(n=0;n<this._labels.length;n++){if(!((l=this._labels[n]).position<this.minimum||l.stripLine))e+=l.textBlock.width*Math.cos(Math.PI/180*this.labelAngle)+l.textBlock.height*Math.sin(Math.PI/180*this.labelAngle)}e>this.lineCoordinates.width*i&&(t=!0)}if("left"===this._position||"right"===this._position){for(n=0;n<this._labels.length;n++){if(!((l=this._labels[n]).position<this.minimum||l.stripLine))e+=l.textBlock.height*Math.cos(Math.PI/180*this.labelAngle)+l.textBlock.width*Math.sin(Math.PI/180*this.labelAngle)}e>this.lineCoordinates.height*i&&(t=!0)}}if("bottom"===this._position){var n=0;for(n=0;n<this._labels.length;n++)if(!((l=this._labels[n]).position<this.minimum||l.position>this.maximum)){if(h=this.getPixelCoordinatesOnAxis(l.position),this.tickThickness&&!this._labels[n].stripLine||this._labels[n].stripLine&&"pixel"===this._labels[n].stripLine._thicknessType){this._labels[n].stripLine?(o=this._labels[n].stripLine,this.ctx.lineWidth=o.thickness,this.ctx.strokeStyle=o.color):(this.ctx.lineWidth=this.tickThickness,this.ctx.strokeStyle=this.tickColor);var s=this.ctx.lineWidth%2==1?.5+(h.x<<0):h.x<<0;this.ctx.beginPath(),this.ctx.moveTo(s,h.y<<0),this.ctx.lineTo(s,h.y+this.tickLength<<0),this.ctx.stroke()}t&&a++%2!=0&&!this._labels[n].stripLine||(0===l.textBlock.angle?(h.x-=l.textBlock.width/2,h.y+=this.tickLength+l.textBlock.fontSize/2):(h.x-=this.labelAngle<0?l.textBlock.width*Math.cos(Math.PI/180*this.labelAngle):0,h.y+=this.tickLength+Math.abs(this.labelAngle<0?l.textBlock.width*Math.sin(Math.PI/180*this.labelAngle)-5:5)),l.textBlock.x=h.x,l.textBlock.y=h.y,l.textBlock.render(!0))}this.title&&(this._titleTextBlock=new G(this.ctx,{x:this.lineCoordinates.x1,y:this.boundingRect.y2-this.titleFontSize-5,maxWidth:this.lineCoordinates.width,maxHeight:1.5*this.titleFontSize,angle:0,text:this.title,horizontalAlign:"center",fontSize:this.titleFontSize,fontFamily:this.titleFontFamily,fontWeight:this.titleFontWeight,fontColor:this.titleFontColor,fontStyle:this.titleFontStyle,textBaseline:"top"}),this._titleTextBlock.measureText(),this._titleTextBlock.x=this.lineCoordinates.x1+this.lineCoordinates.width/2-this._titleTextBlock.width/2,this._titleTextBlock.y=this.boundingRect.y2-this._titleTextBlock.height-2,this._titleTextBlock.render(!0))}else if("top"===this._position){var o;n=0;for(n=0;n<this._labels.length;n++)if(!((l=this._labels[n]).position<this.minimum||l.position>this.maximum)){if(h=this.getPixelCoordinatesOnAxis(l.position),this.tickThickness&&!this._labels[n].stripLine||this._labels[n].stripLine&&"pixel"===this._labels[n].stripLine._thicknessType){this._labels[n].stripLine?(o=this._labels[n].stripLine,this.ctx.lineWidth=o.thickness,this.ctx.strokeStyle=o.color):(this.ctx.lineWidth=this.tickThickness,this.ctx.strokeStyle=this.tickColor);s=this.ctx.lineWidth%2==1?.5+(h.x<<0):h.x<<0;this.ctx.beginPath(),this.ctx.moveTo(s,h.y<<0),this.ctx.lineTo(s,h.y-this.tickLength<<0),this.ctx.stroke()}t&&a++%2!=0&&!this._labels[n].stripLine||(0===l.textBlock.angle?(h.x-=l.textBlock.width/2,h.y-=this.tickLength+l.textBlock.height/2):(h.x-=this.labelAngle>0?l.textBlock.width*Math.cos(Math.PI/180*this.labelAngle):0,h.y-=this.tickLength+Math.abs(this.labelAngle>0?l.textBlock.width*Math.sin(Math.PI/180*this.labelAngle)+5:5)),l.textBlock.x=h.x,l.textBlock.y=h.y,l.textBlock.render(!0))}this.title&&(this._titleTextBlock=new G(this.ctx,{x:this.lineCoordinates.x1,y:this.boundingRect.y1,maxWidth:this.lineCoordinates.width,maxHeight:1.5*this.titleFontSize,angle:0,text:this.title,horizontalAlign:"center",fontSize:this.titleFontSize,fontFamily:this.titleFontFamily,fontWeight:this.titleFontWeight,fontColor:this.titleFontColor,fontStyle:this.titleFontStyle,textBaseline:"top"}),this._titleTextBlock.measureText(),this._titleTextBlock.x=this.lineCoordinates.x1+this.lineCoordinates.width/2-this._titleTextBlock.width/2,this._titleTextBlock.render(!0))}else if("left"===this._position){for(n=0;n<this._labels.length;n++)if(!((l=this._labels[n]).position<this.minimum||l.position>this.maximum)){if(h=this.getPixelCoordinatesOnAxis(l.position),this.tickThickness&&!this._labels[n].stripLine||this._labels[n].stripLine&&"pixel"===this._labels[n].stripLine._thicknessType){this._labels[n].stripLine?(o=this._labels[n].stripLine,this.ctx.lineWidth=o.thickness,this.ctx.strokeStyle=o.color):(this.ctx.lineWidth=this.tickThickness,this.ctx.strokeStyle=this.tickColor);var r=this.ctx.lineWidth%2==1?.5+(h.y<<0):h.y<<0;this.ctx.beginPath(),this.ctx.moveTo(h.x<<0,r),this.ctx.lineTo(h.x-this.tickLength<<0,r),this.ctx.stroke()}t&&a++%2!=0&&!this._labels[n].stripLine||(l.textBlock.x=h.x-l.textBlock.width*Math.cos(Math.PI/180*this.labelAngle)-this.tickLength-5,0===this.labelAngle?l.textBlock.y=h.y-l.textBlock.height/2+this.labelFontSize/2:l.textBlock.y=h.y-l.textBlock.width*Math.sin(Math.PI/180*this.labelAngle),l.textBlock.render(!0))}this.title&&(this._titleTextBlock=new G(this.ctx,{x:this.boundingRect.x1,y:this.lineCoordinates.y2,maxWidth:this.lineCoordinates.height,maxHeight:1.5*this.titleFontSize,angle:-90,text:this.title,horizontalAlign:"center",fontSize:this.titleFontSize,fontFamily:this.titleFontFamily,fontWeight:this.titleFontWeight,fontColor:this.titleFontColor,fontStyle:this.titleFontStyle,textBaseline:"top"}),this._titleTextBlock.measureText(),this._titleTextBlock.y=this.lineCoordinates.height/2+this._titleTextBlock.width/2+this.lineCoordinates.y1,this._titleTextBlock.render(!0))}else if("right"===this._position){var l,h;for(n=0;n<this._labels.length;n++)if(!((l=this._labels[n]).position<this.minimum||l.position>this.maximum)){if(h=this.getPixelCoordinatesOnAxis(l.position),this.tickThickness&&!this._labels[n].stripLine||this._labels[n].stripLine&&"pixel"===this._labels[n].stripLine._thicknessType){this._labels[n].stripLine?(o=this._labels[n].stripLine,this.ctx.lineWidth=o.thickness,this.ctx.strokeStyle=o.color):(this.ctx.lineWidth=this.tickThickness,this.ctx.strokeStyle=this.tickColor);r=this.ctx.lineWidth%2==1?.5+(h.y<<0):h.y<<0;this.ctx.beginPath(),this.ctx.moveTo(h.x<<0,r),this.ctx.lineTo(h.x+this.tickLength<<0,r),this.ctx.stroke()}t&&a++%2!=0&&!this._labels[n].stripLine||(l.textBlock.x=h.x+this.tickLength+5,0===this.labelAngle?l.textBlock.y=h.y-l.textBlock.height/2+this.labelFontSize/2:l.textBlock.y=h.y,l.textBlock.render(!0))}this.title&&(this._titleTextBlock=new G(this.ctx,{x:this.boundingRect.x2-5,y:this.lineCoordinates.y2,maxWidth:this.lineCoordinates.height,maxHeight:1.5*this.titleFontSize,angle:90,text:this.title,horizontalAlign:"center",fontSize:this.titleFontSize,fontFamily:this.titleFontFamily,fontWeight:this.titleFontWeight,fontColor:this.titleFontColor,fontStyle:this.titleFontStyle,textBaseline:"top"}),this._titleTextBlock.measureText(),this._titleTextBlock.y=this.lineCoordinates.height/2-this._titleTextBlock.width/2+this.lineCoordinates.y1,this._titleTextBlock.render(!0))}},tt.prototype.renderInterlacedColors=function(){var t,e,i=this.chart.plotArea.ctx,a=this.chart.plotArea,n=0,s=!0;if("bottom"!==this._position&&"top"!==this._position||!this.interlacedColor){if(("left"===this._position||"right"===this._position)&&this.interlacedColor)for(i.fillStyle=this.interlacedColor,n=0;n<this._labels.length;n++)this._labels[n].stripLine||(s?(e=this.getPixelCoordinatesOnAxis(this._labels[n].position),t=n+1>=this._labels.length?this.getPixelCoordinatesOnAxis(this.maximum):this.getPixelCoordinatesOnAxis(this._labels[n+1].position),i.fillRect(a.x1,t.y,Math.abs(a.x1-a.x2),Math.abs(t.y-e.y)),s=!1):s=!0)}else for(i.fillStyle=this.interlacedColor,n=0;n<this._labels.length;n++)this._labels[n].stripLine||(s?(t=this.getPixelCoordinatesOnAxis(this._labels[n].position),e=n+1>=this._labels.length?this.getPixelCoordinatesOnAxis(this.maximum):this.getPixelCoordinatesOnAxis(this._labels[n+1].position),i.fillRect(t.x,a.y1,Math.abs(e.x-t.x),Math.abs(a.y1-a.y2)),s=!1):s=!0);i.beginPath()},tt.prototype.renderStripLinesOfThicknessType=function(t){if(this.stripLines&&this.stripLines.length>0&&t){var e=this.chart.plotArea.ctx,i=(this.chart._eventManager.ghostCtx,0);for(i=0;i<this.stripLines.length;i++){var a=this.stripLines[i];if(a._thicknessType===t&&("pixel"!==t||!(a.value<this.minimum||a.value>this.maximum))){var n=this.getPixelCoordinatesOnAxis(a.value),s=Math.abs("pixel"===t?a.thickness:this.conversionParameters.pixelPerUnit*a.thickness);if(!(s<=0)){e.strokeStyle=a.color,e.beginPath();var o,r,l,h;g(a.id);if(e.lineWidth=s,"bottom"===this._position||"top"===this._position)o=r=e.lineWidth%2==1?.5+(n.x<<0):n.x<<0,l=this.chart.plotArea.y1,h=this.chart.plotArea.y2;else if("left"===this._position||"right"===this._position){l=h=e.lineWidth%2==1?.5+(n.y<<0):n.y<<0,o=this.chart.plotArea.x1,r=this.chart.plotArea.x2}e.moveTo(o,l),e.lineTo(r,h),e.stroke()}}}}},tt.prototype.renderGrid=function(){if(this.gridThickness&&this.gridThickness>0){var t,e=this.chart.ctx,i=this.chart.plotArea;if(e.lineWidth=this.gridThickness,e.strokeStyle=this.gridColor,"bottom"===this._position||"top"===this._position){for(n=0;n<this._labels.length&&!this._labels[n].stripLine;n++)if(!(this._labels[n].position<this.minimum||this._labels[n].position>this.maximum)){e.beginPath(),t=this.getPixelCoordinatesOnAxis(this._labels[n].position);var a=e.lineWidth%2==1?.5+(t.x<<0):t.x<<0;e.moveTo(a,i.y1<<0),e.lineTo(a,i.y2<<0),e.stroke()}}else if("left"===this._position||"right"===this._position)for(var n=0;n<this._labels.length&&!this._labels[n].stripLine;n++)if(!(this._labels[n].position<this.minimum||this._labels[n].position>this.maximum)){e.beginPath(),t=this.getPixelCoordinatesOnAxis(this._labels[n].position);var s=e.lineWidth%2==1?.5+(t.y<<0):t.y<<0;e.moveTo(i.x1<<0,s),e.lineTo(i.x2<<0,s),e.stroke()}}},tt.prototype.renderAxisLine=function(){var t=this.chart.ctx;if("bottom"===this._position||"top"===this._position){if(this.lineThickness){t.lineWidth=this.lineThickness,t.strokeStyle=this.lineColor?this.lineColor:"black";var e=this.lineThickness%2==1?.5+(this.lineCoordinates.y1<<0):this.lineCoordinates.y1<<0;t.beginPath(),t.moveTo(this.lineCoordinates.x1,e),t.lineTo(this.lineCoordinates.x2,e),t.stroke()}}else if(("left"===this._position||"right"===this._position)&&this.lineThickness){t.lineWidth=this.lineThickness,t.strokeStyle=this.lineColor;var i=this.lineThickness%2==1?.5+(this.lineCoordinates.x1<<0):this.lineCoordinates.x1<<0;t.beginPath(),t.moveTo(i,this.lineCoordinates.y1),t.lineTo(i,this.lineCoordinates.y2),t.stroke()}},tt.prototype.getPixelCoordinatesOnAxis=function(t){var e={},i=this.lineCoordinates.width,a=this.lineCoordinates.height;if("bottom"===this._position||"top"===this._position){var n=i/Math.abs(this.maximum-this.minimum);e.x=this.lineCoordinates.x1+n*(t-this.minimum),e.y=this.lineCoordinates.y1}if("left"===this._position||"right"===this._position){n=a/Math.abs(this.maximum-this.minimum);e.y=this.lineCoordinates.y2-n*(t-this.minimum),e.x=this.lineCoordinates.x2}return e},tt.prototype.getXValueAt=function(t){if(!t)return null;var e=null;return"left"===this._position?e=(this.chart.axisX.maximum-this.chart.axisX.minimum)/this.chart.axisX.lineCoordinates.height*(this.chart.axisX.lineCoordinates.y2-t.y)+this.chart.axisX.minimum:"bottom"===this._position&&(e=(this.chart.axisX.maximum-this.chart.axisX.minimum)/this.chart.axisX.lineCoordinates.width*(t.x-this.chart.axisX.lineCoordinates.x1)+this.chart.axisX.minimum),e},tt.prototype.calculateValueToPixelconversionParameters=function(t){var e={pixelPerUnit:null,minimum:null,reference:null},i=this.lineCoordinates.width,a=this.lineCoordinates.height;e.minimum=this.minimum,"bottom"!==this._position&&"top"!==this._position||(e.pixelPerUnit=i/Math.abs(this.maximum-this.minimum),e.reference=this.lineCoordinates.x1),"left"!==this._position&&"right"!==this._position||(e.pixelPerUnit=-1*a/Math.abs(this.maximum-this.minimum),e.reference=this.lineCoordinates.y2),this.conversionParameters=e},tt.prototype.calculateAxisParameters=function(){var t=this.chart.layoutManager.getFreeSpace();"bottom"===this._position||"top"===this._position?(this.maxWidth=t.width,this.maxHeight=t.height):(this.maxWidth=t.height,this.maxHeight=t.width);var e,i,a,n,s="axisX"===this.type?this.maxWidth<500?8:Math.max(6,Math.floor(this.maxWidth/62)):Math.floor(this.maxWidth/40);if("axisX"===this.type?(e=null!==this.sessionVariables.internalMinimum?this.sessionVariables.internalMinimum:this.dataInfo.viewPortMin,(i=null!==this.sessionVariables.internalMaximum?this.sessionVariables.internalMaximum:this.dataInfo.viewPortMax)-e==0&&(i+=.4,e-=.4),a=this.dataInfo.minDiff!==1/0?this.dataInfo.minDiff:1):"axisY"===this.type&&(e=void 0===this._options.minimum?this.dataInfo.viewPortMin:this._options.minimum,(i=void 0===this._options.maximum?this.dataInfo.viewPortMax:this._options.maximum)-e==0?this._options.hasNegativeAxisY?(e-=5,i+=5):e=0:(0!==i&&(i+=Math.abs(.05)),0!==e&&(this._options.hasNegativeAxisY?e-=Math.abs(.05):e=0)),this.includeZero&&void 0===this._options.minimum&&e>0&&(e=0),this.includeZero&&void 0===this._options.maximum&&i<0&&(i=0)),"axisX"===this.type&&"dateTime"===this.chart.plotInfo.axisXValueType?(n=i-e,this.intervalType||(n/1<=s?(this.interval=1,this.intervalType="millisecond"):n/2<=s?(this.interval=2,this.intervalType="millisecond"):n/5<=s?(this.interval=5,this.intervalType="millisecond"):n/10<=s?(this.interval=10,this.intervalType="millisecond"):n/20<=s?(this.interval=20,this.intervalType="millisecond"):n/50<=s?(this.interval=50,this.intervalType="millisecond"):n/100<=s?(this.interval=100,this.intervalType="millisecond"):n/200<=s?(this.interval=200,this.intervalType="millisecond"):n/250<=s?(this.interval=250,this.intervalType="millisecond"):n/300<=s?(this.interval=300,this.intervalType="millisecond"):n/400<=s?(this.interval=400,this.intervalType="millisecond"):n/500<=s?(this.interval=500,this.intervalType="millisecond"):n/(1*l.secondDuration)<=s?(this.interval=1,this.intervalType="second"):n/(2*l.secondDuration)<=s?(this.interval=2,this.intervalType="second"):n/(5*l.secondDuration)<=s?(this.interval=5,this.intervalType="second"):n/(10*l.secondDuration)<=s?(this.interval=10,this.intervalType="second"):n/(15*l.secondDuration)<=s?(this.interval=15,this.intervalType="second"):n/(20*l.secondDuration)<=s?(this.interval=20,this.intervalType="second"):n/(30*l.secondDuration)<=s?(this.interval=30,this.intervalType="second"):n/(1*l.minuteDuration)<=s?(this.interval=1,this.intervalType="minute"):n/(2*l.minuteDuration)<=s?(this.interval=2,this.intervalType="minute"):n/(5*l.minuteDuration)<=s?(this.interval=5,this.intervalType="minute"):n/(10*l.minuteDuration)<=s?(this.interval=10,this.intervalType="minute"):n/(15*l.minuteDuration)<=s?(this.interval=15,this.intervalType="minute"):n/(20*l.minuteDuration)<=s?(this.interval=20,this.intervalType="minute"):n/(30*l.minuteDuration)<=s?(this.interval=30,this.intervalType="minute"):n/(1*l.hourDuration)<=s?(this.interval=1,this.intervalType="hour"):n/(2*l.hourDuration)<=s?(this.interval=2,this.intervalType="hour"):n/(3*l.hourDuration)<=s?(this.interval=3,this.intervalType="hour"):n/(6*l.hourDuration)<=s?(this.interval=6,this.intervalType="hour"):n/(1*l.dayDuration)<=s?(this.interval=1,this.intervalType="day"):n/(2*l.dayDuration)<=s?(this.interval=2,this.intervalType="day"):n/(4*l.dayDuration)<=s?(this.interval=4,this.intervalType="day"):n/(1*l.weekDuration)<=s?(this.interval=1,this.intervalType="week"):n/(2*l.weekDuration)<=s?(this.interval=2,this.intervalType="week"):n/(3*l.weekDuration)<=s?(this.interval=3,this.intervalType="week"):n/(1*l.monthDuration)<=s?(this.interval=1,this.intervalType="month"):n/(2*l.monthDuration)<=s?(this.interval=2,this.intervalType="month"):n/(3*l.monthDuration)<=s?(this.interval=3,this.intervalType="month"):n/(6*l.monthDuration)<=s?(this.interval=6,this.intervalType="month"):n/(1*l.yearDuration)<=s?(this.interval=1,this.intervalType="year"):n/(2*l.yearDuration)<=s?(this.interval=2,this.intervalType="year"):n/(4*l.yearDuration)<=s?(this.interval=4,this.intervalType="year"):(this.interval=Math.floor(tt.getNiceNumber(n/(s-1),!0)/l.yearDuration),this.intervalType="year")),null!==this.sessionVariables.internalMinimum?this.minimum=this.sessionVariables.internalMinimum:this.minimum=e-a/2,this.sessionVariables.internalMaximum?this.maximum=this.sessionVariables.internalMaximum:this.maximum=i+a/2,this.valueFormatString||("year"===this.intervalType?this.valueFormatString="YYYY":"month"===this.intervalType?this.valueFormatString="MMM YYYY":"week"===this.intervalType||"day"===this.intervalType?this.valueFormatString="MMM DD YYYY":"hour"===this.intervalType||"minute"===this.intervalType?this.valueFormatString="hh:mm TT":"second"===this.intervalType?this.valueFormatString="hh:mm:ss TT":"millisecond"===this.intervalType&&(this.valueFormatString="fff'ms'")),this.intervalStartPosition=this.getLabelStartPoint(new Date(this.minimum),this.intervalType,this.interval)):(this.intervalType="number",n=tt.getNiceNumber(i-e,!1),this._options&&this._options.interval?this.interval=this._options.interval:this.interval=tt.getNiceNumber(n/(s-1),!0),null!==this.sessionVariables.internalMinimum?this.minimum=this.sessionVariables.internalMinimum:this.minimum=Math.floor(e/this.interval)*this.interval,null!==this.sessionVariables.internalMaximum?this.maximum=this.sessionVariables.internalMaximum:this.maximum=Math.ceil(i/this.interval)*this.interval,"axisX"===this.type?(null===this.sessionVariables.internalMinimum&&(this.minimum=e-a/2),this.sessionVariables.internalMaximum||(this.maximum=i+a/2),this.intervalStartPosition=Math.floor((this.minimum+.2*this.interval)/this.interval)*this.interval):"axisY"===this.type&&(this.intervalStartPosition=this.minimum)),"axisX"===this.type&&(this._absoluteMinimum=this._options&&void 0!==this._options.minimum?this._options.minimum:this.dataInfo.min-a/2,this._absoluteMaximum=this._options&&void 0!==this._options.maximum?this._options.maximum:this.dataInfo.max+a/2),!this.valueFormatString&&(this.valueFormatString="#,##0.##",(n=Math.abs(this.maximum-this.minimum))>0&&n<1)){var o=Math.floor(Math.abs(Math.log(n)/Math.LN10))+2;if(o>2)for(var r=0;r<o-2;r++)this.valueFormatString+="#"}},tt.getNiceNumber=function(t,e){var i=Math.floor(Math.log(t)/Math.LN10),a=t/Math.pow(10,i);return(e?a<1.5?1:a<3?2:a<7?5:10:a<=1?1:a<=2?2:a<=5?5:10)*Math.pow(10,i)},tt.prototype.getLabelStartPoint=function(){var t=x(this.interval,this.intervalType),e=Math.floor(this.minimum/t)*t,i=new Date(e);return"millisecond"===this.intervalType||("second"===this.intervalType?i.getMilliseconds()>0&&(i.setSeconds(i.getSeconds()+1),i.setMilliseconds(0)):"minute"===this.intervalType?(i.getSeconds()>0||i.getMilliseconds()>0)&&(i.setMinutes(i.getMinutes()+1),i.setSeconds(0),i.setMilliseconds(0)):"hour"===this.intervalType?(i.getMinutes()>0||i.getSeconds()>0||i.getMilliseconds()>0)&&(i.setHours(i.getHours()+1),i.setMinutes(0),i.setSeconds(0),i.setMilliseconds(0)):"day"===this.intervalType?(i.getHours()>0||i.getMinutes()>0||i.getSeconds()>0||i.getMilliseconds()>0)&&(i.setDate(i.getDate()+1),i.setHours(0),i.setMinutes(0),i.setSeconds(0),i.setMilliseconds(0)):"week"===this.intervalType?(i.getDay()>0||i.getHours()>0||i.getMinutes()>0||i.getSeconds()>0||i.getMilliseconds()>0)&&(i.setDate(i.getDate()+(7-i.getDay())),i.setHours(0),i.setMinutes(0),i.setSeconds(0),i.setMilliseconds(0)):"month"===this.intervalType?(i.getDate()>1||i.getHours()>0||i.getMinutes()>0||i.getSeconds()>0||i.getMilliseconds()>0)&&(i.setMonth(i.getMonth()+1),i.setDate(1),i.setHours(0),i.setMinutes(0),i.setSeconds(0),i.setMilliseconds(0)):"year"===this.intervalType&&(i.getMonth()>0||i.getDate()>1||i.getHours()>0||i.getMinutes()>0||i.getSeconds()>0||i.getMilliseconds()>0)&&(i.setFullYear(i.getFullYear()+1),i.setMonth(0),i.setDate(1),i.setHours(0),i.setMinutes(0),i.setSeconds(0),i.setMilliseconds(0))),i},h(et,W),h(it,W),it.prototype._initialize=function(){if(this.enabled){this.container=document.createElement("div"),this.container.setAttribute("class","canvasjs-chart-tooltip"),this.container.style.position="absolute",this.container.style.height="auto",this.container.style.boxShadow="1px 1px 2px 2px rgba(0,0,0,0.1)",this.container.style.zIndex="9",this.container.style.display="none",N=this.container,this.container.onmouseout=function(){N.style.display="none"};var t='<div class="WidgetOverlay" style="';a||(t+="filter: alpha(opacity = 90);",t+="filter: progid:DXImageTransform.Microsoft.Shadow(Strength=3, Direction=135, Color='#666666');"),t+='} "> Sample Tooltip</div>',this.container.innerHTML=t,this.contentDiv=this.container.firstChild,this.container.style.borderRadius=this.contentDiv.style.borderRadius,this.chart._canvasJSContainer.appendChild(this.container)}},it.prototype.mouseMoveHandler=function(t,e){this._lastUpdated&&(new Date).getTime()-this._lastUpdated<40||(this._lastUpdated=(new Date).getTime(),this._updateToolTip(t,e))},it.prototype._updateToolTip=function(t,e){if(this.enabled){if(void 0===t||void 0===e){if(isNaN(this._prevX)||isNaN(this._prevY))return;t=this._prevX,e=this._prevY}else this._prevX=t,this._prevY=e;var i,n=null,s=null,o=[],r=0;if(this.shared&&"none"!==this.chart.plotInfo.axisPlacement){r="xySwapped"===this.chart.plotInfo.axisPlacement?(this.chart.axisX.maximum-this.chart.axisX.minimum)/this.chart.axisX.lineCoordinates.height*(this.chart.axisX.lineCoordinates.y2-e)+this.chart.axisX.minimum:(this.chart.axisX.maximum-this.chart.axisX.minimum)/this.chart.axisX.lineCoordinates.width*(t-this.chart.axisX.lineCoordinates.x1)+this.chart.axisX.minimum;for(var l=[],h=0;h<this.chart.data.length;h++){(m=this.chart.data[h].getDataPointAtX(r,!0))&&m.index>=0&&(m.dataSeries=this.chart.data[h],null!==m.dataPoint.y&&l.push(m))}if(0===l.length)return;l.sort((function(t,e){return t.distance-e.distance}));var d=l[0];for(h=0;h<l.length;h++)l[h].dataPoint.x.valueOf()===d.dataPoint.x.valueOf()&&o.push(l[h]);l=null}else{var x=this.chart.getDataPointAtXY(t,e,!0);if(x)this.currentDataPointIndex=x.dataPointIndex,this.currentSeriesIndex=x.dataSeries.index;else if(a){var c=A(t,e,this.chart._eventManager.ghostCtx);c>0&&void 0!==this.chart._eventManager.objectMap[c]?(eventObject=this.chart._eventManager.objectMap[c],this.currentSeriesIndex=eventObject.dataSeriesIndex,this.currentDataPointIndex=eventObject.dataPointIndex>=0?eventObject.dataPointIndex:-1):this.currentDataPointIndex=-1}else this.currentDataPointIndex=-1;if(this.currentSeriesIndex>=0){s=this.chart.data[this.currentSeriesIndex];var m={};if(this.currentDataPointIndex>=0)n=s.dataPoints[this.currentDataPointIndex],m.dataSeries=s,m.dataPoint=n,m.index=this.currentDataPointIndex,m.distance=Math.abs(n.x-r);else{if("line"!==s.type&&"stepLine"!==s.type&&"spline"!==s.type&&"area"!==s.type&&"stepArea"!==s.type&&"splineArea"!==s.type&&"stackedArea"!==s.type&&"stackedArea100"!==s.type)return;r=(this.chart.axisX.maximum-this.chart.axisX.minimum)/this.chart.axisX.lineCoordinates.width*(t-this.chart.axisX.lineCoordinates.x1)+this.chart.axisX.minimum.valueOf();(m=s.getDataPointAtX(r,!0)).dataSeries=s,this.currentDataPointIndex=m.index,n=m.dataPoint}null!==m.dataPoint.y&&o.push(m)}}if(o.length>0){this.highlightObjects(o);var p;if(o[0].dataPoint.isTrendLine)return;p=this.getToolTipInnerHTML({entries:o}),this.contentDiv.innerHTML=p,this.contentDiv.innerHTML=p;var u=!1;"none"===this.container.style.display&&(u=!0,this.container.style.display="block");try{this.contentDiv.style.borderRightColor=this.contentDiv.style.borderLeftColor=this.contentDiv.style.borderColor=this.borderColor?this.borderColor:o[0].dataPoint.color?o[0].dataPoint.color:o[0].dataSeries.color?o[0].dataSeries.color:o[0].dataSeries._colorSet[o[0].index%o[0].dataSeries._colorSet.length]}catch(t){}"pie"===o[0].dataSeries.type||"funnel"===o[0].dataSeries.type||"doughnut"===o[0].dataSeries.type||"bar"===o[0].dataSeries.type||"stackedBar"===o[0].dataSeries.type||"stackedBar100"===o[0].dataSeries.type?toolTipLeft=t-10-this.container.clientWidth:(toolTipLeft=this.chart.axisX.lineCoordinates.width/Math.abs(this.chart.axisX.maximum-this.chart.axisX.minimum)*Math.abs(o[0].dataPoint.x-this.chart.axisX.minimum)+this.chart.axisX.lineCoordinates.x1+.5-this.container.clientWidth<<0,toolTipLeft-=15),toolTipLeft=toolTipLeft>0?toolTipLeft+"px":toolTipLeft+this.container.clientWidth+20+"px",(i=20-(i=1!==o.length||this.shared||"line"!==o[0].dataSeries.type&&"stepLine"!==o[0].dataSeries.type&&"spline"!==o[0].dataSeries.type&&"area"!==o[0].dataSeries.type&&"stepArea"!==o[0].dataSeries.type&&"splineArea"!==o[0].dataSeries.type&&"stackedArea"!==o[0].dataSeries.type&&"stackedArea100"!==o[0].dataSeries.type?"bar"===o[0].dataSeries.type||"stackedBar"===o[0].dataSeries.type||"stackedBar100"===o[0].dataSeries.type?o[0].dataSeries.axisX.lineCoordinates.y2-o[0].dataSeries.axisX.lineCoordinates.height/Math.abs(o[0].dataSeries.axisX.maximum-o[0].dataSeries.axisX.minimum)*Math.abs(o[0].dataPoint.x-o[0].dataSeries.axisX.minimum)+.5<<0:e:o[0].dataSeries.axisY.lineCoordinates.y2-o[0].dataSeries.axisY.lineCoordinates.height/Math.abs(o[0].dataSeries.axisY.maximum-o[0].dataSeries.axisY.minimum)*Math.abs(o[0].dataPoint.y-o[0].dataSeries.axisY.minimum)+.5<<0))+this.container.clientHeight+5>0&&(this.container.clientHeight>50?i-=25:i-=15),i+="px",this.container.style.left=toolTipLeft,this.container.style.bottom=i,!this.animationEnabled||u?this.disableAnimation():this.enableAnimation()}}},it.prototype.highlightObjects=function(t){if(this.enabled){var e=this.chart.overlaidCanvasCtx;this.chart.resetOverlayedCanvas(),e.save();var i=this.chart.plotArea;e.rect(i.x1,i.y1,i.width,i.height),e.beginPath();for(var a=0;a<t.length;a++){var n=t[a],s=this.chart._eventManager.objectMap[n.dataSeries.dataPointIds[n.index]];if(s&&s.objectType&&"dataPoint"===s.objectType){var o=this.chart.data[s.dataSeriesIndex],r=(this.chart.data[s.dataPointIndex],s.dataPointIndex);if("line"===o.type||"stepLine"===o.type||"spline"===o.type||"scatter"===o.type||"area"===o.type||"stepArea"===o.type||"splineArea"===o.type||"stackedArea"===o.type||"stackedArea100"===o.type)(l=o.getMarkerProperties(r,s.x1,s.y1,this.chart.overlaidCanvasCtx)).size=Math.max(1.5*l.size<<0,10),l.borderColor=l.borderColor||"#FFFFFF",l.borderThickness=l.borderThickness||Math.ceil(.1*l.size),st.drawMarkers([l]);else if("bubble"===o.type){var l;(l=o.getMarkerProperties(r,s.x1,s.y1,this.chart.overlaidCanvasCtx)).size=s.size,l.color="white",l.borderColor="white",e.globalAlpha=.3,st.drawMarkers([l]),e.globalAlpha=1}else"column"===o.type||"stackedColumn"===o.type||"stackedColumn100"===o.type||"bar"===o.type||"stackedBar"===o.type||"stackedBar100"===o.type?(e.globalAlpha=.3,R(e,s.x1,s.y1,s.x2,s.y2,"white",!1,!1,!1,!1),e.globalAlpha=1):"pie"===o.type||"doughnut"===o.type?(e.globalAlpha=.3,q(e,s.center,s.radius,"white",o.type,s.startAngle,s.endAngle),e.globalAlpha=1):"funnel"===o.type&&(e.globalAlpha=.3,R(e,0,s.y1,i.x2,s.y2,"white",!1,!1,!1,!1),e.globalAlpha=1)}}e.globalAlpha=1,e.restore()}},it.prototype.getToolTipInnerHTML=function(t){for(var e=t.entries,i="",a=null,n=null,s=0,o="",r=!0,l=0;l<e.length;l++)if(e[l].dataSeries.toolTipContent||e[l].dataPoint.toolTipContent){r=!1;break}if(r&&this.content&&"function"==typeof this.content)i=this.content({entries:e});else if(e.length>1)for(l=0;l<e.length;l++)a=e[l].dataSeries,n=e[l].dataPoint,s=e[l].index,o="",0===l&&r&&!this.content&&(o+=void 0!==this.chart.axisX.labels[n.x]?this.chart.axisX.labels[n.x]:"{x}",o+="</br>"),"line"===a.type||"funnel"===a.type||"stepLine"===a.type||"spline"===a.type||"area"===a.type||"stepArea"===a.type||"splineArea"===a.type||"column"===a.type||"bar"===a.type||"scatter"===a.type||"stackedColumn"===a.type||"stackedColumn100"===a.type||"stackedBar"===a.type||"stackedBar100"===a.type||"stackedArea"===a.type||"stackedArea100"===a.type?o+=n.toolTipContent?n.toolTipContent:a.toolTipContent?a.toolTipContent:this.content&&"function"!=typeof this.content?this.content:"<span style='\"'color:{color};'\"'>{name}:</span>&nbsp;&nbsp;{y}":"bubble"===a.type?o+=n.toolTipContent?n.toolTipContent:a.toolTipContent?a.toolTipContent:this.content&&"function"!=typeof this.content?this.content:"<span style='\"'color:{color};'\"'>{name}:</span>&nbsp;&nbsp;{y}, &nbsp;&nbsp;{z}":"pie"!==a.type&&"doughnut"!==a.type||(o+=n.toolTipContent?n.toolTipContent:a.toolTipContent?a.toolTipContent:this.content&&"function"!=typeof this.content?this.content:"&nbsp;&nbsp;{y}"),i+=this.chart.replaceKeywordsWithValue(o,n,a,s),l<e.length-1&&(i+="</br>");else a=e[0].dataSeries,n=e[0].dataPoint,s=e[0].index,"line"===a.type||"funnel"===a.type||"stepLine"===a.type||"spline"===a.type||"area"===a.type||"stepArea"===a.type||"splineArea"===a.type||"column"===a.type||"bar"===a.type||"scatter"===a.type||"stackedColumn"===a.type||"stackedColumn100"===a.type||"stackedBar"===a.type||"stackedBar100"===a.type||"stackedArea"===a.type||"stackedArea100"===a.type?o=n.toolTipContent?n.toolTipContent:a.toolTipContent?a.toolTipContent:this.content&&"function"!=typeof this.content?this.content:"<span style='\"'color:{color};'\"'>"+(n.label?"{label}":"{x}")+" :</span>&nbsp;&nbsp;{y}":"bubble"===a.type?o=n.toolTipContent?n.toolTipContent:a.toolTipContent?a.toolTipContent:this.content&&"function"!=typeof this.content?this.content:"<span style='\"'color:{color};'\"'>"+(n.label?"{label}":"{x}")+":</span>&nbsp;&nbsp;{y}, &nbsp;&nbsp;{z}":"pie"!==a.type&&"doughnut"!==a.type||(o=n.toolTipContent?n.toolTipContent:a.toolTipContent?a.toolTipContent:this.content&&"function"!=typeof this.content?this.content:(n.name?"{name}:&nbsp;&nbsp;":n.label?"{label}:&nbsp;&nbsp;":"")+"{y}"),i+=this.chart.replaceKeywordsWithValue(o,n,a,s);return i},it.prototype.enableAnimation=function(){this.container.style.WebkitTransition||(this.container.style.WebkitTransition="left .2s ease-out, bottom .2s ease-out",this.container.style.MozTransition="left .2s ease-out, bottom .2s ease-out",this.container.style.MsTransition="left .2s ease-out, bottom .2s ease-out",this.container.style.transition="left .2s ease-out, bottom .2s ease-out")},it.prototype.disableAnimation=function(){this.container.style.WebkitTransition&&(this.container.style.WebkitTransition="",this.container.style.MozTransition="",this.container.style.MsTransition="",this.container.style.transition="")},it.prototype.hide=function(){this.enabled&&(this.container.style.display="none",this.currentSeriesIndex=-1,this._prevX=NaN,this._prevY=NaN,this.chart.resetOverlayedCanvas())},E.prototype.replaceKeywordsWithValue=function(t,e,i,a){var n=this;return t.replace(/\{\s*[a-zA-Z]+\s*\}|"[^"]*"|'[^']*'/g,(function(t){if('"'===t[0]&&'"'===t[t.length-1]||"'"===t[0]&&"'"===t[t.length-1])return t.slice(1,t.length-1);var s=m(t.slice(1,t.length-1)),o=null;if("color"===s)return e.color?e.color:i.color?i.color:i._colorSet[a%i._colorSet.length];if(e.hasOwnProperty(s))o=e;else{if(!i.hasOwnProperty(s))return"";o=i}return"x"===s?n.axisX&&"dateTime"===n.plotInfo.axisXValueType?C(o[s],e.xValueFormatString?e.xValueFormatString:i.xValueFormatString?i.xValueFormatString:n.axisX&&n.axisX.valueFormatString?n.axisX.valueFormatString:"DD MMM YY",n._cultureInfo):w(o[s],e.xValueFormatString?e.xValueFormatString:i.xValueFormatString?i.xValueFormatString:"#,##0.########",n._cultureInfo):"y"===s?w(o[s],e.yValueFormatString?e.yValueFormatString:i.yValueFormatString?i.yValueFormatString:"#,##0.########",n._cultureInfo):o[s]}))},at.prototype.reset=function(){this.lastObjectId=0,this.objectMap=[],this.rectangularRegionEventSubscriptions=[],this.previousDataPointEventObject=null,this.eventObjects=[],a&&(this.ghostCtx.clearRect(0,0,this.chart.width,this.chart.height),this.ghostCtx.beginPath())},at.prototype.getNewObjectTrackingId=function(){return++this.lastObjectId},at.prototype.mouseEventHandler=function(t){if("mousemove"===t.type||"click"===t.type){var e,i=[],a=I(t);if((e=this.chart.getObjectAtXY(a.x,a.y,!1))&&void 0!==this.objectMap[e]){var n=this.objectMap[e];if("dataPoint"===n.objectType){var s=(r=this.chart.data[n.dataSeriesIndex]).dataPoints[n.dataPointIndex],o=n.dataPointIndex;n.eventParameter={x:a.x,y:a.y,dataPoint:s,dataSeries:r._options,dataPointIndex:o,dataSeriesIndex:r.index},n.eventContext={context:s,userContext:s,mouseover:"mouseover",mousemove:"mousemove",mouseout:"mouseout",click:"click"},i.push(n),(n=this.objectMap[r.id]).eventParameter={x:a.x,y:a.y,dataPoint:s,dataSeries:r._options,dataPointIndex:o,dataSeriesIndex:r.index},n.eventContext={context:r,userContext:r._options,mouseover:"mouseover",mousemove:"mousemove",mouseout:"mouseout",click:"click"},i.push(this.objectMap[r.id])}else if("legendItem"===n.objectType){var r;s=(r=this.chart.data[n.dataSeriesIndex]).dataPoints[n.dataPointIndex];n.eventParameter={x:a.x,y:a.y,dataSeries:r._options,dataPoint:s,dataPointIndex:n.dataPointIndex,dataSeriesIndex:n.dataSeriesIndex},n.eventContext={context:this.chart.legend,userContext:this.chart.legend._options,mouseover:"itemmouseover",mousemove:"itemmousemove",mouseout:"itemmouseout",click:"itemclick"},i.push(n)}}for(var l=[],h=0;h<this.mouseoveredObjectMaps.length;h++){for(var d=!0,x=0;x<i.length;x++)if(i[x].id===this.mouseoveredObjectMaps[h].id){d=!1;break}d?this.fireEvent(this.mouseoveredObjectMaps[h],"mouseout",t):l.push(this.mouseoveredObjectMaps[h])}this.mouseoveredObjectMaps=l;for(h=0;h<i.length;h++){var c=!1;for(x=0;x<this.mouseoveredObjectMaps.length;x++)if(i[h].id===this.mouseoveredObjectMaps[x].id){c=!0;break}c||(this.fireEvent(i[h],"mouseover",t),this.mouseoveredObjectMaps.push(i[h])),"click"===t.type?this.fireEvent(i[h],"click",t):"mousemove"===t.type&&this.fireEvent(i[h],"mousemove",t)}}},at.prototype.fireEvent=function(t,e,i){if(t&&e){var a=t.eventParameter,n=t.eventContext,s=t.eventContext.userContext;s&&n&&s[n[e]]&&s[n[e]].call(s,i,a),"mouseout"!==e?s.cursor&&s.cursor!==i.target.style.cursor&&(i.target.style.cursor=s.cursor):(i.target.style.cursor=this.chart._defaultCursor,delete t.eventParameter,delete t.eventContext),"click"===e&&"dataPoint"===t.objectType&&this.chart.pieDoughnutClickHandler&&this.chart.pieDoughnutClickHandler.call(this.chart.data[t.dataSeriesIndex],a)}},h(nt,W);var st={drawMarker:function(t,e,i,a,n,s,o,r){if(i){var l=1;i.fillStyle=s||"#000000",i.strokeStyle=o||"#000000",i.lineWidth=r||0,"circle"===a?(i.moveTo(t,e),i.beginPath(),i.arc(t,e,n/2,0,2*Math.PI,!1),s&&i.fill(),r&&(o?i.stroke():(l=i.globalAlpha,i.globalAlpha=.15,i.strokeStyle="black",i.stroke(),i.globalAlpha=l))):"square"===a?(i.beginPath(),i.rect(t-n/2,e-n/2,n,n),s&&i.fill(),r&&(o?i.stroke():(l=i.globalAlpha,i.globalAlpha=.15,i.strokeStyle="black",i.stroke(),i.globalAlpha=l))):"triangle"===a?(i.beginPath(),i.moveTo(t-n/2,e+n/2),i.lineTo(t+n/2,e+n/2),i.lineTo(t,e-n/2),i.closePath(),s&&i.fill(),r&&(o?i.stroke():(l=i.globalAlpha,i.globalAlpha=.15,i.strokeStyle="black",i.stroke(),i.globalAlpha=l)),i.beginPath()):"cross"===a&&(i.strokeStyle=s,r=n/4,i.lineWidth=r,i.beginPath(),i.moveTo(t-n/2,e-n/2),i.lineTo(t+n/2,e+n/2),i.stroke(),i.moveTo(t+n/2,e-n/2),i.lineTo(t-n/2,e+n/2),i.stroke())}},drawMarkers:function(t){for(var e=0;e<t.length;e++){var i=t[e];st.drawMarker(i.x,i.y,i.ctx,i.type,i.size,i.color,i.borderColor,i.borderThickness)}}},ot={Chart:function(t,e){var i=new E(t,e,this);this.render=function(){i.render(this.options)},this.options=i._options,this.dispose=function(){i.dispose()}},addColorSet:function(t,e){o[t]=e},addCultureInfo:function(t,e){s[t]=e}};ot.Chart.version="v1.3.0 GA",window.CanvasJS=ot}();


var __extends=this&&this.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),__awaiter=this&&this.__awaiter||function(t,e,n,i){return new(n||(n=Promise))((function(o,a){function r(t){try{l(i.next(t))}catch(t){a(t)}}function s(t){try{l(i.throw(t))}catch(t){a(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(r,s)}l((i=i.apply(t,e||[])).next())}))},__generator=this&&this.__generator||function(t,e){var n,i,o,a,r={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(o=2&a[0]?i.return:a[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,a[1])).done)return o;switch(i=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(!(o=r.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){r.label=a[1];break}if(6===a[0]&&r.label<o[1]){r.label=o[1],o=a;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(a);break}o[2]&&r.ops.pop(),r.trys.pop();continue}a=e.call(t,r)}catch(t){a=[6,t],i=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}},__spreadArrays=this&&this.__spreadArrays||function(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var i=Array(t),o=0;for(e=0;e<n;e++)for(var a=arguments[e],r=0,s=a.length;r<s;r++,o++)i[o]=a[r];return i},AutotaskAjaxSystem,AutotaskAjaxSystem,AutotaskAjaxSystem,AutotaskAjaxSystem,Autotask,AutotaskBoardsSystem,AutotaskBoardsSystem,AutotaskBoardsSystem,AutotaskBoardsSystem,AutotaskBoardsSystem,AutotaskBoardsSystem,AutotaskBoardsSystem,AutotaskBoardsSystem,AutotaskBoardsSystem,AutotaskBoardsSystem,AutotaskBoardsSystem,AutotaskBoardsSystem,AutotaskBoardsSystem,AutotaskBoardsSystem,AutotaskBoardsSystem,AutotaskBoardsSystem,AutotaskBoardsSystem,AutotaskBoardsSystem,AutotaskBoardsSystem,AutotaskBoardsSystem,AutotaskBoardsSystem,AutotaskBoardsSystem,AutotaskBoardsSystem,AutotaskBoardsSystem,AutotaskBoardsSystem,AutotaskDragAndDropSystem,AutotaskBoardsSystem,AutotaskDragAndDropSystem,AutotaskBoardsSystem,AutotaskDragAndDropSystem,AutotaskBoardsSystem,AutotaskDragAndDropSystem,AutotaskBoardsSystem,AutotaskBoardsSystem,AutotaskBoardsSystem,AutotaskBoardsSystem,AutotaskBoardsSystem,AutotaskBoardsSystem,AutotaskBoardsSystem,AutotaskBoardsSystem,AutotaskBoardsSystem,AutotaskBoardsSystem,AutotaskBoardsSystem,AutotaskBoardsSystem,AutotaskBoardsSystem,AutotaskBoardsSystem,AutotaskBoardsSystem,AutotaskBoardsSystem,AutotaskBoardsSystem,AutotaskBoardsSystem,AutotaskButtonSystem,AutotaskButtonSystem,AutotaskButtonSystem,AutotaskButtonSystem,AutotaskButtonSystem,AutotaskButtonSystem,AutotaskButtons,AutotaskButtons,AutotaskButtons,AutotaskButtons,AutotaskButtons,AutotaskButtons,AutotaskButtons,AutotaskButtons,AutotaskCalendarSystem,AutotaskCalendarSystem,AutotaskCalendarSystem,AutotaskCalendarSystem,AutotaskCalendarSystem,AutotaskCalendarSystem,AutotaskCalendarSystem,AutotaskCalendarSystem,AutotaskCalendarSystem,AutotaskCalendars,AutotaskCalendars,AutotaskColorPickerSystem,AutotaskColorPickerSystem,Autotask,Autotask,Autotask,Autotask,autotask,Autotask,Autotask,Autotask,Autotask,Autotask,Autotask,Autotask,AutotaskCurrencySystem,AutotaskDashboardSystem,AutotaskDashboardSystem,AutotaskScrollingSystem,AutotaskDashboardSystem,AutotaskDashboardSystem,AutotaskDashboardSystem,AutotaskDashboardSystem,AutotaskDashboardSystem,AutotaskDashboardSystem,AutotaskDashboardSystem,AutotaskDashboardSystem,AutotaskDashboardSystem,AutotaskDashboardSystem,AutotaskDashboardSystem,AutotaskDashboardSystem,AutotaskDashboardSystem,AutotaskDashboardSystem,AutotaskDashboardSystem,AutotaskDashboardSystem,AutotaskDashboardSystem,AutotaskDashboardSystem,AutotaskDashboardSystem,AutotaskDashboardSystem,AutotaskDashboardSystem,AutotaskDashboardSystem,AutotaskDashboardSystem,AutotaskDashboardSystem,AutotaskDashboardSystem,AutotaskDashboardSystem,AutotaskDashboardSystem,AutotaskDashboardSystem,AutotaskDashboardSystem,AutotaskDashboardSystem,AutotaskDashboardSystem,AutotaskDashboardSystem,AutotaskDashboardSystem,AutotaskDashboardSystem,AutotaskDashboardSystem,AutotaskDashboardSystem,AutotaskDashboardSystem,AutotaskDashboardSystem,AutotaskDashboardSystem,AutotaskDashboardSystem,AutotaskDashboardSystem,AutotaskDashboardSystem,AutotaskDashboardSystem,AutotaskDashboardSystem,AutotaskDialogSystem,AutotaskDialogSystem,AutotaskDirtyStateSystem,AutotaskDirtyStateSystem,AutotaskDirtyStateSystem,AutotaskDomSystem,AutotaskDomSystem,AutotaskDomSystem,AutotaskDomSystem,AutotaskDomSystem,AutotaskDragAndDropSystem,AutotaskDragAndDropSystem,AutotaskDragAndDropSystem,AutotaskDragAndDropSystem,AutotaskEditorSystem,AutotaskEditorSystem,AutotaskEditorSystem,AutotaskEditorSystem,AutotaskEditorSystem,AutotaskEditorSystem,AutotaskEditorSystem,AutotaskEditorSystem,AutotaskEditorSystem,AutotaskEditorSystem,AutotaskEditorSystem,AutotaskEditorSystem,AutotaskEditorSystem,AutotaskEditorSystem,AutotaskOverlaySystem,AutotaskEditorSystem,AutotaskEditorSystem,AutotaskEditorSystem,AutotaskEditorSystem,AutotaskEditorSystem,AutotaskEditorSystem,AutotaskEditorSystem,AutotaskEditorSystem,AutotaskEditorSystem,AutotaskDataSelector,AutotaskDataSelector,AutotaskDataSelector,AutotaskDataSelector,AutotaskDataSelector,AutotaskDataSelector,AutotaskDataSelector,AutotaskEditorSystem,AutotaskDataSelector,AutotaskDataSelector,AutotaskDataSelector,AutotaskDataSelector,AutotaskDataSelector,AutotaskEditorSystem,AutotaskEditorSystem,AutotaskEditorSystem,AutotaskEditorSystem,AutotaskEditorSystem,AutotaskEditorSystem,AutotaskEditorSystem,AutotaskEditorSystem,AutotaskEditorSystem,AutotaskEditorSystem,AutotaskEditorSystem,AutotaskEditorSystem,AutotaskEditorSystem,AutotaskEditorSystem,AutotaskEditorSystem,AutotaskEditorSystem,AutotaskEditorSystem,AutotaskEditorSystem,AutotaskEditorSystem,AutotaskEditorSystem,AutotaskEditorSystem,AutotaskEditorSystem,AutotaskEditorSystem,AutotaskEditorSystem,AutotaskEditorSystem,AutotaskEditorSystem,AutotaskEditorSystem,AutotaskEditorSystem,AutotaskEditorSystem,AutotaskEditorSystem,AutotaskEditorSystem,AutotaskEditorSystem,AutotaskEditorSystem,AutotaskEditorSystem,AutotaskEditorSystem,AutotaskEditorSystem,AutotaskEditorSystem,AutotaskEditorSystem,AutotaskEditorSystem,AutotaskAdjustingTextBox,AutotaskAdjustingTextBox,AutotaskAdjustingTextBox,AutotaskAdjustingTextBox,AutotaskCheckbox,AutotaskCheckbox,AutotaskCurrencyBox,AutotaskCurrencyBox,AutotaskCurrencyBox,AutotaskCurrencyBox,AutotaskDateBox,AutotaskDateBox,AutotaskDateBox,AutotaskDateBox,AutotaskDateBox,AutotaskDateBox,AutotaskDateBox,AutotaskDecimalBox,AutotaskDecimalBox,AutotaskDecimalBox,AutotaskDecimalBox,AutotaskDecimalBox,AutotaskDecimalBox,AutotaskDecimalBox,AutotaskDecimalBox,AutotaskDecimalBox,AutotaskDropDownList,AutotaskDropDownList,AutotaskDropDownList,AutotaskDropDownList,AutotaskDropDownList,AutotaskDropDownList,AutotaskEmailArea,AutotaskEmailArea,AutotaskEmailArea,AutotaskEmailArea,AutotaskEmailArea,AutotaskEmailArea,AutotaskEmailBox,AutotaskEmailBox,AutotaskEmailBox,AutotaskEmailBox,AutotaskExternalFileBox,AutotaskExternalFileBox,AutotaskExternalFileBox,AutotaskExternalFileBox,AutotaskExternalFileBox,AutotaskExternalFileBox,AutotaskExternalFileBox,AutotaskHexColorBox,AutotaskHexColorBox,AutotaskHexColorBox,AutotaskHexColorBox,AutotaskImageRadioButtonGroup,AutotaskImageRadioButtonGroup,AutotaskIntegerBox,AutotaskIntegerBox,AutotaskIntegerBox,AutotaskIntegerBox,AutotaskIntegerBox,AutotaskIntegerBox,AutotaskIntegerBox,AutotaskIntegerBox,AutotaskIntegerBox,AutotaskLargeMultipleTagSelector,AutotaskLargeMultipleTagSelector,AutotaskLargeMultipleTagSelector,AutotaskLargeMultipleTagSelector,AutotaskLargeMultipleTagSelector,AutotaskLargeMultipleTagSelector,AutotaskLargeMultipleTagSelector,AutotaskLargeMultipleTagSelector,AutotaskLargeMultipleTagSelector,AutotaskLargeMultipleTagSelector,AutotaskLargeMultipleTagSelector,AutotaskLargeMultipleTagSelector,AutotaskLargeMultipleTagSelector,AutotaskLargeMultipleTagSelector,AutotaskLargeMultipleTagSelector,AutotaskLargeMultipleTagSelector,AutotaskLargeMultipleTagSelector,AutotaskLargeMultipleTagSelector,AutotaskLargeMultipleTagSelector,AutotaskLargeMultipleTagSelector,AutotaskListBox,AutotaskListBox,AutotaskListBox,AutotaskListBox,AutotaskListBox,AutotaskListMover,AutotaskListMover,AutotaskListMover,AutotaskListMover,AutotaskMinutesBox,AutotaskMinutesBox,AutotaskMinutesBox,AutotaskMinutesBox,AutotaskMinutesBox,AutotaskMultipleDataSelector,AutotaskMultipleDataSelector,AutotaskMultipleDataSelector,AutotaskMultipleDataSelector,AutotaskMultipleDataSelector,AutotaskMultipleDataSelector,AutotaskMultipleDataSelector,AutotaskMultipleDataSelector,AutotaskMultipleDataSelector,AutotaskMultipleDataSelector,AutotaskMultipleDataSelector,AutotaskMultipleDataSelector,AutotaskMultipleDataSelector,AutotaskMultipleDataSelector,AutotaskMultipleDataSelector,AutotaskMultipleDataSelector,AutotaskMultipleDataSelector,AutotaskMultipleDataSelector,AutotaskMultipleItemSelector,AutotaskMultipleItemSelector,AutotaskMultipleItemSelector,AutotaskMultipleItemSelector,AutotaskMultipleItemSelector,AutotaskMultipleItemSelector,AutotaskMultipleItemSelector,AutotaskMultipleItemSelector,AutotaskMultipleItemSelector,AutotaskMultipleItemSelector,AutotaskMultipleItemSelector,AutotaskMultipleItemSelector,AutotaskMultipleItemSelector,AutotaskMultipleItemSelector,AutotaskMultipleItemSelector,AutotaskMultipleItemSelector,AutotaskMultipleItemSelector,AutotaskMultipleItemSelector,AutotaskMultipleItemSelector,AutotaskMultipleItemSelector,AutotaskMultipleItemSelector,AutotaskMultipleItemSelector,AutotaskMultipleItemSelector,AutotaskMultipleItemSelector,AutotaskMultipleItemSelector,AutotaskMultipleItemSelector,AutotaskMultipleRecipientSelector,AutotaskMultipleRecipientSelector,AutotaskMultipleRecipientSelector,AutotaskMultipleRecipientSelector,AutotaskMultipleRecipientSelector,AutotaskMultipleRecipientSelector,AutotaskMultipleRecipientSelector,AutotaskMultipleRecipientSelector,AutotaskMultipleRecipientSelector,AutotaskMultipleRecipientSelector,AutotaskMultipleRecipientSelector,AutotaskMultipleRecipientSelector,AutotaskMultipleRecipientSelector,AutotaskMultipleRecipientSelector,AutotaskMultipleRecipientSelector,AutotaskMultipleRecipientSelector,AutotaskMultipleRecipientSelector,AutotaskMultipleRecipientSelector,AutotaskMultipleRecipientSelector,AutotaskMultipleRecipientSelector,AutotaskMultipleRecipientSelector,AutotaskMultipleRecipientSelector,AutotaskMultipleRecipientSelector,AutotaskMultipleRecipientSelector,AutotaskMultipleRecipientSelector,AutotaskMultipleRecipientSelector,AutotaskMultipleRecipientSelector,AutotaskMultipleRecipientSelector,AutotaskMultipleRecipientSelector,AutotaskMultipleRecipientSelector,AutotaskPasswordBox,AutotaskPasswordBox,AutotaskPasswordBox,AutotaskPasswordBox,AutotaskPercentageBox,AutotaskPercentageBox,AutotaskPercentageBox,AutotaskPercentageBox,AutotaskRadioButton,AutotaskRadioButton,AutotaskRichTextBox,AutotaskRichTextBox,AutotaskRichTextBox,AutotaskRichTextBox,AutotaskRichTextBox,AutotaskRichTextBox,AutotaskRichTextBox,AutotaskRichTextBox,AutotaskRichTextBox,AutotaskRichTextBox,AutotaskRichTextBox,AutotaskRichTextBox,AutotaskRichTextBox,AutotaskRichTextBox,AutotaskRichTextBox,AutotaskRichTextBox,AutotaskRichTextBox,AutotaskRichTextBox,AutotaskSingleDataSelector,AutotaskSingleDataSelector,AutotaskSingleDataSelector,AutotaskSingleDataSelector,AutotaskSingleDataSelector,AutotaskSingleDataSelector,AutotaskSingleDataSelector,AutotaskSingleDataSelector,AutotaskSingleDataSelector,AutotaskSingleDataSelector,AutotaskSingleDataSelector,AutotaskSingleDataSelector,AutotaskSingleDataSelector,AutotaskSingleDataSelector,AutotaskSingleDataSelector,AutotaskSingleDataSelector,AutotaskSingleDataSelector,AutotaskSingleItemSelector,AutotaskSingleItemSelector,AutotaskSingleItemSelector,AutotaskSingleItemSelector,AutotaskSingleItemSelector,AutotaskSingleItemSelector,AutotaskSingleItemSelector,AutotaskSingleItemSelector,AutotaskSingleItemSelector,AutotaskSingleItemSelector,AutotaskSingleItemSelector,AutotaskSingleItemSelector,AutotaskSingleItemSelector,AutotaskSingleItemSelector,AutotaskSingleItemSelector,AutotaskSingleItemSelector,AutotaskSingleItemSelector,AutotaskSingleItemSelector,AutotaskSingleItemSelector,AutotaskSingleItemSelector,AutotaskSingleItemSelector,AutotaskSingleItemSelector,AutotaskSingleItemSelector,AutotaskSingleItemSelector,AutotaskTextArea,AutotaskTextArea,AutotaskTextArea,AutotaskTextArea,AutotaskTextArea,AutotaskTextArea,AutotaskTextArea,AutotaskTextArea,AutotaskTextArea,AutotaskTextBox,AutotaskTextBox,AutotaskTextBox,AutotaskTextBox,AutotaskTextBox,AutotaskTextBox,AutotaskTextBox,AutotaskTextBox,AutotaskTextBox,AutotaskTimeBox,AutotaskTimeBox,AutotaskTimeBox,AutotaskTimeBox,AutotaskTimeBox,AutotaskFormTemplateSystem,AutotaskFormTemplateSystem,AutotaskFormTemplateSystem,AutotaskFormTemplateSystem,AutotaskFormTemplateSystem,AutotaskFormTemplateSystem,AutotaskFormTemplateSystem,AutotaskFormTemplateSystem,AutotaskFormTemplateSystem,AutotaskFormTemplateSystem,AutotaskFormTemplateSystem,AutotaskFormTemplateSystem,AutotaskFormTemplateSystem,AutotaskFormTemplateSystem,AutotaskFormTemplateSystem,AutotaskFormTemplateSystem,AutotaskFormTemplateSystem,AutotaskFormTemplateSystem,AutotaskFormTemplateSystem,AutotaskFormTemplateSystem,AutotaskFormTemplateSystem,AutotaskFormTemplateSystem,AutotaskFormTemplateSystem,AutotaskFormTemplateSystem,AutotaskFormTemplateSystem,AutotaskFormTemplateSystem,AutotaskFormTemplateSystem,AutotaskFormTemplateSystem,AutotaskFormTemplateSystem,AutotaskFormTemplateSystem,AutotaskFormTemplateSystem,AutotaskFormTemplateSystem,AutotaskFormTemplateSystem,AutotaskFormTemplateSystem,AutotaskFormTemplateSystem,AutotaskFormTemplateSystem,AutotaskFormTemplateSystem,AutotaskFormTemplateSystem,AutotaskFormTemplateSystem,AutotaskFormTemplateSystem,AutotaskFormTemplateSystem,AutotaskFormTemplateSystem,AutotaskFormTemplateSystem,AutotaskFormTemplateSystem,AutotaskFormTemplateSystem,AutotaskGaugeSystem,AutotaskGaugeSystem,AutotaskGaugeSystem,AutotaskGaugeSystem,AutotaskGaugeSystem,AutotaskGaugeSystem,AutotaskGaugeSystem,AutotaskGaugeSystem,AutotaskGaugeSystem,AutotaskGaugeSystem,AutotaskGaugeSystem,AutotaskGaugeSystem,AutotaskGaugeSystem,AutotaskGaugeSystem,AutotaskGaugeSystem,AutotaskGaugeSystem,AutotaskGridSystem,AutotaskGridSystem,AutotaskGridSystem,AutotaskGridSystem,AutotaskGridSystem,AutotaskGridSystem,AutotaskGridSystem,AutotaskGridSystem,AutotaskGridSystem,AutotaskGridSystem,AutotaskGridSystem,AutotaskGridSystem,AutotaskGridSystem,AutotaskGridSystem,AutotaskGridSystem,AutotaskGridSystem,AutotaskGridSystem,AutotaskGridSystem,AutotaskGridSystem,AutotaskGridSystem,AutotaskGridSystem,AutotaskGridSystem,AutotaskGridSystem,AutotaskGridSystem,AutotaskGridSystem,AutotaskGridSystem,AutotaskGridSystem,AutotaskGridSystem,AutotaskGridSystem,AutotaskGridSystem,AutotaskGridSystem,AutotaskGridSystem,AutotaskGridSystem,AutotaskImmutableDataSystem,AutotaskImmutableDataSystem,AutotaskImmutableDataSystem,AutotaskImmutableDataSystem,AutotaskImmutableDataSystem,AutotaskImmutableDataSystem,AutotaskImmutableDataSystem,AutotaskImmutableDataSystem,AutotaskItemSelectionSystem,AutotaskItemSelectionSystem,AutotaskItemSelectionSystem,AutotaskItemSelectionSystem,AutotaskLabel,AutotaskLabel,AutotaskOverlaySystem,AutotaskOverlaySystem,AutotaskOverlaySystem,AutotaskOverlaySystem,AutotaskOverlaySystem,AutotaskOverlaySystem,AutotaskOverlaySystem,AutotaskOverlaySystem,AutotaskOverlaySystem,AutotaskOverlaySystem,AutotaskOverlaySystem,AutotaskOverlaySystem,AutotaskOverlaySystem,AutotaskOverlaySystem,AutotaskOverlaySystem,AutotaskOverlaySystem,AutotaskOverlays,AutotaskOverlays,AutotaskOverlays,AutotaskOverlays,AutotaskOverlays,AutotaskOverlays,AutotaskOverlays,AutotaskOverlays,AutotaskOverlays,AutotaskOverlays,AutotaskOverlays,AutotaskOverlays,AutotaskOverlays,AutotaskOverlays,AutotaskOverlays,AutotaskOverlays,AutotaskPositionApplicatorSystem,AutotaskPositionApplicatorSystem,AutotaskPositionSystem,AutotaskPositionSystem,AutotaskPositionSystem,AutotaskPositionSystem,AutotaskPositionSystem,AutotaskPositionSystem,AutotaskPositionSystem,AutotaskPositionSystem,AutotaskPositionSystem,AutotaskPositionSystem,AutotaskPositionSystem,AutotaskPositionSystem,AutotaskPositionSystem,AutotaskPromiseSystem,AutotaskPromiseSystem,AutotaskReadOnlyDataSystem,AutotaskRequestDataSystem,AutotaskRequestDataSystem,AutotaskRequestDataSystem,AutotaskRequestDataSystem,AutotaskRequestDataSystem,AutotaskSection,AutotaskSection,AutotaskSection,AutotaskSinglePointPositionSystem,AutotaskSinglePointPositionSystem,AutotaskSinglePointPositionSystem,AutotaskSinglePointPositionSystem,AutotaskSinglePointPositionSystem,AutotaskSinglePointPositionSystem,AutotaskTabbingSystem,AutotaskTabbingSystem,AutotaskTextSystem,AutotaskValidationSystem,AutotaskValidationSystem,AutotaskValidationSystem,AutotaskValidationSystem,AutotaskWidgetSystem,AutotaskWidgetSystem,AutotaskWidgetSystem,AutotaskWidgetSystem,AutotaskWidgetSystem,AutotaskWidgetSystem,AutotaskWidgetSystem,AutotaskWidgetSystem,AutotaskWidgetSystem,AutotaskWidgetSystem,AutotaskWidgetSystem,AutotaskWidgetSystem,AutotaskWidgetSystem,AutotaskWidgetSystem,AutotaskWidgetSystem,AutotaskWidgetSystem,AutotaskWidgetSystem,AutotaskWidgetSystem,AutotaskWidgetSystem,AutotaskWidgetSystem,AutotaskWidgetSystem,AutotaskWidgetSystem,AutotaskWidgetSystem,AutotaskWidgetSystem,AutotaskWidgetSystem,AutotaskWidgetSystem,AutotaskWidgetSystem,AutotaskWidgetSystem,AutotaskWidgetSystem,AutotaskWidgetSystem,AutotaskWidgetSystem,AutotaskWidgetSystem,AutotaskWidgetSystem,AutotaskWidgetSystem,AutotaskWidgetSystem,AutotaskWidgetSystem;!function(t){var e=function(){function t(t){if(null!==t){var e=0;Math.floor(t)!==t&&(e=t.toString(10).split(".")[1].length),this._value=window.autotask.convert.decimalToString(t,e,!1)}else this._value=null}return Object.defineProperty(t.prototype,"data",{get:function(){return this._value},enumerable:!1,configurable:!0}),t}();t.AjaxDecimalData=e}(AutotaskAjaxSystem||(AutotaskAjaxSystem={})),function(t){var e=function(){function t(t){try{this._javaScriptExecutionDelegate=new Function(t),this._isParseSuccessful=!0}catch(t){this._javaScriptExecutionDelegate=function(){},this._isParseSuccessful=!1}}return Object.defineProperty(t.prototype,"javaScriptExecutionDelegate",{get:function(){return this._javaScriptExecutionDelegate},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isParseSuccessful",{get:function(){return this._isParseSuccessful},enumerable:!1,configurable:!0}),t}();t.JavaScriptParser=e}(AutotaskAjaxSystem||(AutotaskAjaxSystem={})),function(t){var e=function(){function t(t){this._cancelHandler=t}return t.prototype.__cancelRequest=function(){this._cancelHandler()},t}();t.AjaxRequestCanceler=e}(AutotaskAjaxSystem||(AutotaskAjaxSystem={})),function(t){var e=function(t){this.htmlForInstanceTrackerContainer=t.Html.HtmlForInstanceTrackerContainer,this.deferredHtml=t.Html.DeferredHtml,this.javaScript=t.JavaScript};t.AjaxResponseHtmlAndJavaScript=e}(AutotaskAjaxSystem||(AutotaskAjaxSystem={})),function(t){var e=function(){function t(t){this._id=t}return Object.defineProperty(t.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),t}();t.LifecycleObject=e}(Autotask||(Autotask={})),function(t){var e=function(t){function e(e,n){var i=t.call(this,e)||this;(i._element=AutotaskDomSystem.Document.getElementById(e),i._overlayId=n,null!==n)&&new AutotaskButtonSystem.EventsManagement((function(){}),(function(){i._touchEventHandler()}),(function(){i._mouseEnterEventHandler()}),(function(){i._mouseLeaveEventHandler()}),(function(){})).registerElement(i._element);return i._overlayInstance=null,i}return __extends(e,t),e.prototype.__initialize=function(){null!==this._overlayId&&(this._overlayInstance=autotask.find(this._overlayId))},e.prototype._hideOverlay=function(){this._overlayInstance.hide()},e.prototype._mouseEnterEventHandler=function(){this._showOverlay()},e.prototype._mouseLeaveEventHandler=function(){this._hideOverlay()},e.prototype._showOverlay=function(){this._overlayInstance.show(this._element)},e.prototype._touchEventHandler=function(){this._overlayInstance.isVisible?this._hideOverlay():this._showOverlay()},e}(Autotask.LifecycleObject);t.AppliedFiltersBadge=e}(AutotaskBoardsSystem||(AutotaskBoardsSystem={})),function(t){var e=function(e){function n(n,i,o,a){var r=e.call(this,n)||this;r._isCompact=a;var s=AutotaskDomSystem.Document.getElementById(n);return window.autotask.browserDetection.isFirefox()||window.autotask.browserDetection.isSafari()?s.classList.add("DefaultScrolling"):s.classList.add("AdvancedScrolling"),2===s.childElementCount?(r._headerElement=s.children[0],r._scrollingElement=s.children[1].firstElementChild,r._scrollingElement.addEventListener("scroll",(function(){r._bodyScrollListener()}))):(r._headerElement=null,r._scrollingElement=s.children[0].firstElementChild),r._pinnedCellContainers=Array.from(AutotaskDomSystem.Document.getElementsByClassName(r._scrollingElement,"PinnedCellContainer3")),r._promiseQueue=new AutotaskPromiseSystem.PromiseQueue,r._headerCellSystem=new t.HeaderCellSystem(s,i,o),r._cardSystem=new t.BoardCardSystem(r._scrollingElement,r._headerCellSystem),r._onDeckSectionCardShellDroppedHandlers=[],r._cardShells=[],r._pinnedCardCells=[],r._sizingSystemCardParticipantReplacedHandlers=[],r._unpinnedCardCells=[],r._userInteractionEventHandlers=[],r}return __extends(n,e),n.prototype.addOnDeckSectionCardShellDroppedHandler=function(t){this._onDeckSectionCardShellDroppedHandlers.push(t)},n.prototype.addSizingSystemCardParticipantReplacedHandler=function(t){this._sizingSystemCardParticipantReplacedHandlers.push(t)},n.prototype.addUserInteractionEventHandler=function(t){this._userInteractionEventHandlers.push(t)},n.prototype.clearSelections=function(){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(e){switch(e.label){case 0:return[4,this._promiseQueue.enqueue((function(){return __awaiter(t,void 0,void 0,(function(){var t=this;return __generator(this,(function(e){return[2,new Promise((function(e){t._cardSystem.clearSelections(),e()}))]}))}))}))];case 1:return e.sent(),[2]}}))}))},n.prototype.createDragAreas=function(){for(var t=[],e=0,n=this._cardShells;e<n.length;e++){var i=n[e].createDragArea(this._isCompact);null!==i&&t.push(i)}return t},n.prototype.createDropArea=function(){var e=this;return new t.BoardDropArea(this._scrollingElement.getBoundingClientRect(),this.getPinnedCellOffset(),this._pinnedCardCells,this._unpinnedCardCells,(function(t,n,i){e._cardShellDroppedHandler(t,n,i)}))},n.prototype.createScrollArea=function(){var e=this._scrollingElement.getBoundingClientRect(),n=new AutotaskScrollingSystem.AnimatedScroller(this._scrollingElement);return new t.BoardScrollArea(e,n,this.getPinnedCellOffset())},n.prototype.findCardSizingParticipants=function(){for(var t=[],e=0,n=Array.from(AutotaskDomSystem.Document.getElementsByAttributeName(this._scrollingElement,"data-sizing-system-card-participant"));e<n.length;e++){var i=n[e].dataset.alphaId;t.push(autotask.find(i))}return t},n.prototype.findCellSizingParticipants=function(){var t=[];if(null!==this._headerElement)for(var e=0,n=Array.from(AutotaskDomSystem.Document.getElementsByAttributeName(this._headerElement,"data-sizing-system-cell-participant"));e<n.length;e++){var i=n[e].dataset.alphaId;t.push(autotask.find(i))}for(var o=0,a=Array.from(AutotaskDomSystem.Document.getElementsByAttributeName(this._scrollingElement,"data-sizing-system-cell-participant"));o<a.length;o++){i=a[o].dataset.alphaId;t.push(autotask.find(i))}return t},n.prototype.getAllKeys=function(){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(e){return[2,this._promiseQueue.enqueue((function(){return __awaiter(t,void 0,void 0,(function(){var t=this;return __generator(this,(function(e){return[2,new Promise((function(e){e(t._cardSystem.allKeys)}))]}))}))}))]}))}))},n.prototype.getKeysNotInDataSet=function(){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(e){return[2,this._promiseQueue.enqueue((function(){return __awaiter(t,void 0,void 0,(function(){var t=this;return __generator(this,(function(e){return[2,new Promise((function(e){e(t._cardSystem.keysNotInDataSet)}))]}))}))}))]}))}))},n.prototype.getPinnedCellOffset=function(){return this._pinnedCellContainers.length>0?this._pinnedCellContainers[0].offsetWidth:0},n.prototype.getSelectedKeys=function(){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(e){return[2,this._promiseQueue.enqueue((function(){return __awaiter(t,void 0,void 0,(function(){var t=this;return __generator(this,(function(e){return[2,new Promise((function(e){e(t._cardSystem.selectedKeys)}))]}))}))}))]}))}))},n.prototype.selectAll=function(){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(e){switch(e.label){case 0:return[4,this._promiseQueue.enqueue((function(){return __awaiter(t,void 0,void 0,(function(){var t=this;return __generator(this,(function(e){return[2,new Promise((function(e){t._cardSystem.selectAll(),e()}))]}))}))}))];case 1:return e.sent(),[2]}}))}))},n.prototype.selectAllNotInDataSet=function(){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(e){switch(e.label){case 0:return[4,this._promiseQueue.enqueue((function(){return __awaiter(t,void 0,void 0,(function(){var t=this;return __generator(this,(function(e){return[2,new Promise((function(e){t._cardSystem.selectAllNotInDataSet(),e()}))]}))}))}))];case 1:return e.sent(),[2]}}))}))},n.prototype.__dispose=function(){this._promiseQueue.clear()},n.prototype.__initialize=function(){for(var t=0,e=Array.from(AutotaskDomSystem.Document.getElementsByAttributeName(this._scrollingElement,"data-card-cell"));t<e.length;t++){var n=e[t],i=n.dataset.alphaId,o=autotask.find(i);this._pinnedCellContainers.indexOf(n.parentElement)<0?this._unpinnedCardCells.push(o):this._pinnedCardCells.push(o)}this._registerCardShells(),this._headerCellSystem.reset(),this._cardSystem.reset()},n.prototype._bodyScrollListener=function(){this._raiseUserInteractionEvent(),null!==this._headerElement&&(this._headerElement.scrollLeft=this._scrollingElement.scrollLeft)},n.prototype._cardShellDroppedHandler=function(t,e,n){null===t&&null===e&&(this._raiseOnDeckSectionCardShellDroppedEvent(n),this._registerCardShells())},n.prototype._cardShellMovingHandler=function(t){return __awaiter(this,void 0,void 0,(function(){var e,n,i,o,a,r;return __generator(this,(function(s){switch(s.label){case 0:for(e=null,n=0,i=this._pinnedCardCells;n<i.length;n++)if((r=i[n]).targetForMove(t.columnKey,t.rowKey)){e=r;break}if(null===e)for(o=0,a=this._unpinnedCardCells;o<a.length;o++)if((r=a[o]).targetForMove(t.columnKey,t.rowKey)){e=r;break}return null===e&&autotask.throwException("moveTarget is null."),[4,e.moveCardShell((function(e,n){return t.createAnimator(e,n)}),t.sortValue)];case 1:return s.sent(),[2]}}))}))},n.prototype._cardShellRefreshedHandler=function(t){this._cardSystem.reset(),this._raiseSizingSystemCardParticipantReplacedEvent(t.sizingSystemCardParticipant)},n.prototype._raiseOnDeckSectionCardShellDroppedEvent=function(t){for(var e=0,n=this._onDeckSectionCardShellDroppedHandlers;e<n.length;e++){(0,n[e])(t)}},n.prototype._raiseSizingSystemCardParticipantReplacedEvent=function(t){for(var e=0,n=this._sizingSystemCardParticipantReplacedHandlers;e<n.length;e++){(0,n[e])(t)}},n.prototype._raiseUserInteractionEvent=function(){for(var t=0,e=this._userInteractionEventHandlers;t<e.length;t++){(0,e[t])()}},n.prototype._registerCardShells=function(){var t=this;this._cardShells.length=0;for(var e=0,n=Array.from(AutotaskDomSystem.Document.getElementsByAttributeName(this._scrollingElement,"data-card-shell"));e<n.length;e++){var i=n[e].dataset.alphaId,o=autotask.find(i);o.addMovingHandler(this.id,(function(e){return __awaiter(t,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:return[4,this._cardShellMovingHandler(e)];case 1:return t.sent(),[2]}}))}))})),o.addRefreshedHandler(this.id,(function(e){t._cardShellRefreshedHandler(e)})),this._cardShells.push(o)}},n}(Autotask.LifecycleObject);t.Board=e}(AutotaskBoardsSystem||(AutotaskBoardsSystem={})),function(t){var e=function(e){function n(t,n,i,o,a,r,s,l,u){var c=e.call(this,t)||this;return c._boardContainerElement=AutotaskDomSystem.Document.getElementById(n),c._boardSkeletonElement=c._boardContainerElement.lastElementChild,c._boardInstanceTracker=new Autotask.InstanceTracker(i,i),c._refreshBoardRoute=o,c._isOnDeckSectionEnabled=a,c._onDeckSectionContainerElement=AutotaskDomSystem.Document.getElementById(r),c._onDeckSectionSkeletonElement=c._onDeckSectionContainerElement.lastElementChild,c._onDeckSectionInstanceTracker=new Autotask.InstanceTracker(s,s),c._refreshOnDeckSectionRoute=l,c._isCompact=u,c._windowResizeListener=function(){c._windowResizeHandler()},window.addEventListener("resize",c._windowResizeListener),c._promiseQueue=new AutotaskPromiseSystem.PromiseQueue,c._isAdvancedScrollbarStyleSupported=!window.autotask.browserDetection.isFirefox()&&!window.autotask.browserDetection.isSafari(),c._activeCssClass="Active",c._pageLoadCssClass="PageLoad",c._boardRefreshingHandlers=[],c._onDeckSectionRefreshingHandlers=[],c._userInteractionEventHandlers=[],c._board=null,c._cancelBoardRequestDelegate=null,c._cancelOnDeckSectionRequestDelegate=null,c._dragEventResolveHandler=null,c._dragAndDropEventCoordinator=null,c._onDeckSection=null,c._removeCustomCssDelegate=null,c._sizingSystem=null,c._windowResizeTimeoutId=null,c}return __extends(n,e),n.prototype.addBoardRefreshingHandler=function(t){this._boardRefreshingHandlers.push(t)},n.prototype.addOnDeckSectionRefreshingHandler=function(t){this._onDeckSectionRefreshingHandlers.push(t)},n.prototype.addUserInteractionEventHandler=function(t){this._userInteractionEventHandlers.push(t)},n.prototype.refresh=function(t){return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(n){switch(n.label){case 0:return[4,this._promiseQueue.enqueue((function(){return __awaiter(e,void 0,void 0,(function(){var e=this;return __generator(this,(function(n){return[2,new Promise((function(n){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return this._isCompact=t,[4,Promise.all([this._refreshBoard(!0),this._refreshOnDeckSection(!0)])];case 1:return e.sent(),n(),[2]}}))}))}))]}))}))}))];case 1:return n.sent(),[2]}}))}))},n.prototype.refreshOnDeckSection=function(){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(e){switch(e.label){case 0:return[4,this._promiseQueue.enqueue((function(){return __awaiter(t,void 0,void 0,(function(){var t=this;return __generator(this,(function(e){return[2,new Promise((function(e){return __awaiter(t,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:return[4,this._refreshOnDeckSection(!0)];case 1:return t.sent(),e(),[2]}}))}))}))]}))}))}))];case 1:return e.sent(),[2]}}))}))},n.prototype.__finalize=function(){var t=this;this._promiseQueue.enqueue((function(){return __awaiter(t,void 0,void 0,(function(){var t=this;return __generator(this,(function(e){return[2,new Promise((function(e){return __awaiter(t,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:return[4,Promise.all([this._refreshBoard(!1),this._isOnDeckSectionEnabled?this._refreshOnDeckSection(!1):Promise.resolve()])];case 1:return t.sent(),e(),[2]}}))}))}))]}))}))}))},n.prototype.__dispose=function(){var t;this._promiseQueue.clear(),this._cancelBoardRequest(),this._cancelOnDeckSectionRequest(),this._disposeDragAndDropCoordinator(),this._removeCustomCss(),window.removeEventListener("resize",this._windowResizeListener),this._boardInstanceTracker.__dispose(),null===(t=this._onDeckSectionInstanceTracker)||void 0===t||t.__dispose()},n.prototype.__initialize=function(){if(!this._isAdvancedScrollbarStyleSupported){var t=window.autotask.scrolling.__get_scrollBarWidth();this._removeCustomCssDelegate=this._insertCustomCss(".Board3.DefaultScrolling > .Header3 > .Row3.HeaderRow3 > .ScrollBarSpacer3 { flex: 0 0 "+t.toString(10)+"px; }")}},n.prototype._cancelBoardRequest=function(){null!==this._cancelBoardRequestDelegate&&(this._cancelBoardRequestDelegate(),this._cancelBoardRequestDelegate=null)},n.prototype._cancelOnDeckSectionRequest=function(){null!==this._cancelOnDeckSectionRequestDelegate&&(this._cancelOnDeckSectionRequestDelegate(),this._cancelOnDeckSectionRequestDelegate=null)},n.prototype._disposeDragAndDropCoordinator=function(){var t;null===(t=this._dragAndDropEventCoordinator)||void 0===t||t.dispose(),this._dragAndDropEventCoordinator=null},n.prototype._dragEventEndedHandler=function(){null!==this._dragEventResolveHandler&&(this._dragEventResolveHandler(),this._dragEventResolveHandler=null)},n.prototype._dragEventStartedHandler=function(){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(e){return this._raiseUserInteractionEvent(),[2,this._promiseQueue.enqueue((function(){return __awaiter(t,void 0,void 0,(function(){var t=this;return __generator(this,(function(e){return[2,new Promise((function(e){t._dragEventResolveHandler=e}))]}))}))}))]}))}))},n.prototype._fadeSkeleton=function(t,e){return __awaiter(this,void 0,void 0,(function(){var n=this;return __generator(this,(function(i){return[2,new Promise((function(i){var o=[{opacity:e?0:1},{opacity:e?1:0}];e&&t.classList.add(n._activeCssClass),t.animate(o,{duration:300,fill:"forwards",iterations:1}).addEventListener("finish",(function(){e||(t.classList.remove(n._activeCssClass),t.classList.remove(n._pageLoadCssClass)),i()}))}))]}))}))},n.prototype._insertCustomCss=function(t){var e=document.createElement("style");document.head.appendChild(e);var n=e.sheet.insertRule(t);return function(){e.sheet.deleteRule(n),e.remove()}},n.prototype._onDeckSectionCardShellDroppedHandler=function(t){var e;this._onDeckSectionInstanceTracker.__removeInstanceId(t),null===(e=this._onDeckSection)||void 0===e||e.removeCardShellInstanceId(t),this._boardInstanceTracker.__addInstanceId(t)},n.prototype._onDeckSectionCardShellReplacedHandler=function(t){var e;null===(e=this._sizingSystem)||void 0===e||e.fixNewCardParticipants([t]),this._resetDragAndDropCoordinator(),this._resetOnDeckSectionHeight()},n.prototype._onDeckSectionCollapsedStateChangedHandler=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:return[4,this._resetOnDeckSectionHeight()];case 1:return t.sent(),this._resetDragAndDropCoordinator(),[2]}}))}))},n.prototype._raiseBoardRefreshingEvent=function(t){for(var e=0,n=this._boardRefreshingHandlers;e<n.length;e++){(0,n[e])(t)}},n.prototype._raiseOnDeckSectionRefreshingEvent=function(t){for(var e=0,n=this._onDeckSectionRefreshingHandlers;e<n.length;e++){(0,n[e])(t)}},n.prototype._raiseUserInteractionEvent=function(){for(var t=0,e=this._userInteractionEventHandlers;t<e.length;t++){(0,e[t])()}},n.prototype._refreshBoard=function(e){return __awaiter(this,void 0,void 0,(function(){var n=this;return __generator(this,(function(i){return[2,new Promise((function(i){return __awaiter(n,void 0,void 0,(function(){var n,o,a=this;return __generator(this,(function(r){switch(r.label){case 0:return this._cancelBoardRequest(),e?[4,this._fadeSkeleton(this._boardSkeletonElement,!0)]:[3,2];case 1:r.sent(),r.label=2;case 2:return n=new t.BoardShellRefreshingEventArgs(this._isCompact),this._raiseBoardRefreshingEvent(n),o=this._refreshBoardRoute.makeRequest(n.requestData,(function(t){a._refreshBoardSuccessHandler(t,i)})),this._cancelBoardRequestDelegate=function(){o.__cancelRequest(),i()},[2]}}))}))}))]}))}))},n.prototype._refreshBoardSuccessHandler=function(t,e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){switch(n.label){case 0:return this._cancelBoardRequestDelegate=null,this._boardInstanceTracker.__loadHtmlAndJavaScript(t.htmlJavaScriptPair.htmlForInstanceTrackerContainer,t.htmlJavaScriptPair.javaScript),this._resetBoard(),[4,this._fadeSkeleton(this._boardSkeletonElement,!1)];case 1:return n.sent(),e(),[2]}}))}))},n.prototype._refreshOnDeckSection=function(e){return __awaiter(this,void 0,void 0,(function(){var n=this;return __generator(this,(function(i){return[2,new Promise((function(i){return __awaiter(n,void 0,void 0,(function(){var n,o,a=this;return __generator(this,(function(r){switch(r.label){case 0:return this._cancelOnDeckSectionRequest(),e?[4,this._fadeSkeleton(this._onDeckSectionSkeletonElement,!0)]:[3,2];case 1:r.sent(),r.label=2;case 2:return n=new t.BoardShellRefreshingEventArgs(this._isCompact),this._raiseOnDeckSectionRefreshingEvent(n),o=this._refreshOnDeckSectionRoute.makeRequest(n.requestData,(function(t){a._refreshOnDeckSuccessHandler(t,i)})),this._cancelOnDeckSectionRequestDelegate=function(){o.__cancelRequest(),i()},[2]}}))}))}))]}))}))},n.prototype._refreshOnDeckSuccessHandler=function(t,e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){switch(n.label){case 0:return this._cancelOnDeckSectionRequestDelegate=null,this._onDeckSectionInstanceTracker.__loadHtmlAndJavaScript(t.htmlJavaScriptPair.htmlForInstanceTrackerContainer,t.htmlJavaScriptPair.javaScript),[4,this._resetOnDeckSection()];case 1:return n.sent(),[4,this._fadeSkeleton(this._onDeckSectionSkeletonElement,!1)];case 2:return n.sent(),e(),[2]}}))}))},n.prototype._removeCustomCss=function(){null!==this._removeCustomCssDelegate&&(this._removeCustomCssDelegate(),this._removeCustomCssDelegate=null)},n.prototype._resetDragAndDropCoordinator=function(){var t=this;this._promiseQueue.enqueue((function(){return __awaiter(t,void 0,void 0,(function(){var t=this;return __generator(this,(function(e){return[2,new Promise((function(e){return __awaiter(t,void 0,void 0,(function(){var t,n,i,o,a,r,s=this;return __generator(this,(function(l){if(this._disposeDragAndDropCoordinator(),t=new AutotaskDragAndDropSystem.EventCoordinator,null!==this._board)for(t.scrollArea=this._board.createScrollArea(),t.addDropArea(this._board.createDropArea()),n=0,i=this._board.createDragAreas();n<i.length;n++)r=i[n],t.addDragArea(r);if(null!==this._onDeckSection)for(o=0,a=this._onDeckSection.createDragAreas();o<a.length;o++)r=a[o],t.addDragArea(r);return t.addEventEndedHandler((function(){s._dragEventEndedHandler()})),t.addEventStartedHandler((function(){s._dragEventStartedHandler()})),this._dragAndDropEventCoordinator=t,e(),[2]}))}))}))]}))}))}))},n.prototype._resetBoard=function(){var e=this,n=this._boardContainerElement.firstElementChild.firstElementChild.id;if(this._board=autotask.find(n),this._board.addOnDeckSectionCardShellDroppedHandler((function(t){e._onDeckSectionCardShellDroppedHandler(t)})),this._board.addSizingSystemCardParticipantReplacedHandler((function(t){e._sizingSystemCardParticipantReplacedHandler(t)})),this._sizingSystem=new t.SizingSystem(this._board.findCellSizingParticipants(),this._board.findCardSizingParticipants(),this._isCompact),null!==this._onDeckSection&&this._sizingSystem.fixNewCardParticipants(this._onDeckSection.findCardSizingParticipants()),this._isAdvancedScrollbarStyleSupported){this._removeCustomCss();var i=this._board.getPinnedCellOffset();this._removeCustomCssDelegate=this._insertCustomCss(".Board3.AdvancedScrolling > .Body3 > .ScrollingContainer3::-webkit-scrollbar-track { margin-left: "+i.toString(10)+"px }")}this._resetDragAndDropCoordinator()},n.prototype._resetOnDeckSection=function(){var t;return __awaiter(this,void 0,void 0,(function(){var e,n,i=this;return __generator(this,(function(o){switch(o.label){case 0:return null===(e=this._onDeckSectionContainerElement.firstElementChild).firstElementChild?[3,2]:(n=e.firstElementChild.id,this._onDeckSection=autotask.find(n),this._onDeckSection.addCardShellReplacedHandler((function(t){i._onDeckSectionCardShellReplacedHandler(t)})),this._onDeckSection.addCollapsedStateChangeHandler((function(){i._onDeckSectionCollapsedStateChangedHandler()})),this._onDeckSection.addSizingSystemCardParticipantReplacedHandler((function(t){i._sizingSystemCardParticipantReplacedHandler(t),i._resetOnDeckSectionHeight()})),null===(t=this._sizingSystem)||void 0===t||t.fixNewCardParticipants(this._onDeckSection.findCardSizingParticipants()),this._onDeckSectionContainerElement.classList.add(this._activeCssClass),[4,this._resetOnDeckSectionHeight()]);case 1:return o.sent(),[3,3];case 2:this._onDeckSection=null,this._onDeckSectionContainerElement.classList.remove(this._activeCssClass),o.label=3;case 3:return this._resetDragAndDropCoordinator(),[2]}}))}))},n.prototype._resetOnDeckSectionHeight=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:return null===this._onDeckSection?[3,2]:[4,n._animateHeightChange(this._onDeckSectionContainerElement,this._onDeckSection.height)];case 1:t.sent(),t.label=2;case 2:return[2]}}))}))},n.prototype._sizingSystemCardParticipantReplacedHandler=function(t){var e;null===(e=this._sizingSystem)||void 0===e||e.fixNewCardParticipants([t])},n.prototype._windowResizeHandler=function(){var t=this;null!==this._windowResizeTimeoutId&&window.clearTimeout(this._windowResizeTimeoutId),this._windowResizeTimeoutId=window.setTimeout((function(){t._resetDragAndDropCoordinator(),t._resetOnDeckSectionHeight()}),100)},n._animateHeightChange=function(t,e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){return[2,new Promise((function(n){var i=[{height:t.clientHeight.toString(10).concat("px")},{height:e.toString(10).concat("px")}];t.animate(i,{duration:300,fill:"forwards",iterations:1}).addEventListener("finish",(function(){n()}))}))]}))}))},n}(Autotask.LifecycleObject);t.BoardShell=e}(AutotaskBoardsSystem||(AutotaskBoardsSystem={})),function(t){var e=function(t){function e(e,n,i,o,a,r,s){var l=t.call(this,e)||this;return l._element=AutotaskDomSystem.Document.getElementById(e),l.key=n,l.isInDataSet=i,l._checkboxId=o,l.sorter=a,l.rowSummand=r,l.columnSummand=s,l._selectedCssClass="Selected",l._mouseDownHandlers=[],l._selectionChangedHandlers=[],l._touchStartHandlers=[],l._checkboxInstance=void 0,l._removeMouseEventListenersDelegate=null,l._removeTouchEventListenersDelegate=null,l}return __extends(e,t),Object.defineProperty(e.prototype,"isSelected",{get:function(){return this._checkbox.value},set:function(t){this._checkbox.value=t,t?this._element.classList.add(this._selectedCssClass):this._element.classList.remove(this._selectedCssClass)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"width",{get:function(){return this._element.offsetWidth},set:function(t){this._element.style.width=t.toString(10)+"px"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_checkbox",{get:function(){return void 0===this._checkboxInstance&&autotask.throwException("_checkbox is undefined."),this._checkboxInstance},enumerable:!1,configurable:!0}),e.prototype.addMouseDownHandler=function(t){var e=this;if(0===this._mouseDownHandlers.length){var n=function(t){e._mouseDownHandler(t)};this._element.addEventListener("mousedown",n),this._removeMouseEventListenersDelegate=function(){e._element.removeEventListener("mousedown",n)}}this._mouseDownHandlers.push(t)},e.prototype.addSelectionChangedHandler=function(t){this._selectionChangedHandlers.push(t)},e.prototype.addTouchStartHandler=function(t){var e=this;if(0===this._touchStartHandlers.length){var n=function(t){e._touchStartHandler(t)};this._element.addEventListener("touchstart",n),this._removeTouchEventListenersDelegate=function(){e._element.removeEventListener("touchstart",n)}}this._touchStartHandlers.push(t)},e.prototype.clearHandlers=function(){this._removeEventListeners(),this._mouseDownHandlers.length=0,this._touchStartHandlers.length=0},e.prototype.__dispose=function(){this._removeEventListeners()},e.prototype.__initialize=function(){var t=this;this._checkboxInstance=autotask.find(this._checkboxId),this._checkboxInstance.addChangeHandler((function(){t._checkBoxChangeHandler()}))},e.prototype._checkBoxChangeHandler=function(){this.isSelected=this._checkbox.value,this._raiseSelectionChangedEvent()},e.prototype._mouseDownHandler=function(t){this._raiseMouseDownEvent(t.clientX,t.clientY)},e.prototype._raiseMouseDownEvent=function(t,e){for(var n=0,i=this._mouseDownHandlers;n<i.length;n++){(0,i[n])(t,e)}},e.prototype._raiseSelectionChangedEvent=function(){for(var t=0,e=this._selectionChangedHandlers;t<e.length;t++){(0,e[t])()}},e.prototype._raiseTouchStartEvent=function(t,e){for(var n=0,i=this._touchStartHandlers;n<i.length;n++){(0,i[n])(t,e)}},e.prototype._removeEventListeners=function(){null!==this._removeMouseEventListenersDelegate&&(this._removeMouseEventListenersDelegate(),this._removeMouseEventListenersDelegate=null),null!==this._removeTouchEventListenersDelegate&&(this._removeTouchEventListenersDelegate(),this._removeTouchEventListenersDelegate=null)},e.prototype._touchStartHandler=function(t){var e=t.targetTouches[0];this._raiseTouchStartEvent(e.clientX,e.clientY)},e}(Autotask.LifecycleObject);t.Card=e}(AutotaskBoardsSystem||(AutotaskBoardsSystem={})),function(t){var e=function(e){function n(t,n,i,o,a){var r=e.call(this,t)||this;return r._element=AutotaskDomSystem.Document.getElementById(t),r._columnKey=n,r._rowKey=i,r._isTargetingAcrossColumnsAllowed=o,r._isTargetingAcrossRowsAllowed=a,r._targetedCssClass="Targeted",r._widthAdjustment=20,r._compactWidthAdjustment=8,r}return __extends(n,e),n.prototype.applyWidth=function(t,e){var n=t+(e?this._compactWidthAdjustment:this._widthAdjustment);this._element.style.width=n.toString(10)+"px"},n.prototype.createDropData=function(e){var n=new t.SortingSystem(this._element).indexOf(e),i=new t.PlaceholderAnimator(!0);return i.appendToElement(this._element,n),new t.DropTargetData(this._columnKey,this._rowKey,i)},n.prototype.moveCardShell=function(e,n){return __awaiter(this,void 0,void 0,(function(){var i,o;return __generator(this,(function(a){switch(a.label){case 0:return i=new t.SortingSystem(this._element),o=i.indexOf(n),[4,e(this._element,o).animate()];case 1:return a.sent(),[2]}}))}))},n.prototype.removeTarget=function(){this._element.classList.remove(this._targetedCssClass)},n.prototype.targetForDrop=function(t){var e,n,i=this._columnKey!==t.columnKey,o=this._rowKey!==t.rowKey;return e=null===t.columnKey&&null===t.rowKey||!i&&!o||(i||o)&&!(i&&!this._isTargetingAcrossColumnsAllowed)&&!(o&&!this._isTargetingAcrossRowsAllowed),n=this._isIntersectingArea(t),e&&n&&this._element.classList.add(this._targetedCssClass),{isValid:e,isIntersecting:n}},n.prototype.targetForMove=function(t,e){return this._columnKey===t&&this._rowKey===e},n.prototype._isIntersectingArea=function(t){var e=this._element.getBoundingClientRect();return t.clientX>e.left&&t.clientX<e.left+e.width&&t.clientY>e.top&&t.clientY<e.top+e.height},n}(Autotask.LifecycleObject);t.CardCell=e}(AutotaskBoardsSystem||(AutotaskBoardsSystem={})),function(t){var e=function(e){function n(t,n,i,o,a){var r=e.call(this,t)||this;return r._trackingKey=n,r._element=AutotaskDomSystem.Document.getElementById(t),r._columnKey=i,r._rowKey=o,r._dropRefreshRoute=a,r._promiseQueue=new AutotaskPromiseSystem.PromiseQueue,r._droppedHandlers={},r._movingHandlers={},r._refreshedHandlers={},r._dropConfirmationHandlers=[],r._activeCssClass="Active",r._cardInstance=void 0,r._instanceTrackerInstance=void 0,r._cancelRequestDelegate=null,r._dragArea=null,r._dropTimer=null,r}return __extends(n,e),Object.defineProperty(n.prototype,"sorter",{get:function(){return this._card.sorter},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"width",{get:function(){return this._card.width},set:function(t){this._card.width=t},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"_card",{get:function(){return void 0===this._cardInstance&&autotask.throwException("_cardInstance is undefined."),this._cardInstance},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"_instanceTracker",{get:function(){return void 0===this._instanceTrackerInstance&&autotask.throwException("_instanceTrackerInstance is undefined."),this._instanceTrackerInstance},enumerable:!1,configurable:!0}),n.prototype.addDropConfirmationHandler=function(t){this._dropConfirmationHandlers.push(t)},n.prototype.addDroppedHandler=function(t,e){this._droppedHandlers[t]=e},n.prototype.addMovingHandler=function(t,e){this._movingHandlers[t]=e},n.prototype.addRefreshedHandler=function(t,e){this._refreshedHandlers[t]=e},n.prototype.createDragArea=function(e){var n=this;if(null!==this._dropRefreshRoute){var i=new t.CardGrabArea(this._card);this._dragArea=new t.CardShellDragArea(i,this._columnKey,this._rowKey,this.id,this._card.sorter.sortValue,e,(function(t){return n._dragAreaStartHandler(t)}),(function(){n._dragAreaCancelHandler()}),(function(t,e,i,o,a,r){n._dragAreaConfirmDropHandler(t,e,i,o,a,r)}))}return this._dragArea},n.prototype.refresh=function(t,e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){switch(n.label){case 0:return[4,this._refresh(t,e)];case 1:return n.sent(),[2]}}))}))},n.prototype.removeDroppedHandler=function(t){delete this._droppedHandlers[t]},n.prototype.removeMovingHandler=function(t){delete this._movingHandlers[t]},n.prototype.removeRefreshedHandler=function(t){delete this._refreshedHandlers[t]},n.prototype.__dispose=function(){var t,e;this._promiseQueue.clear(),this._cancelRequest(),null===(t=this._dragArea)||void 0===t||t.clearHandlers(),null===(e=this._dropTimer)||void 0===e||e.stop()},n.prototype.__initialize=function(){this._resetCard(),this._instanceTrackerInstance=autotask.instanceTrackerManagement.__findInstanceTracker(this._trackingKey)},n.prototype._updateCoordinates=function(t,e){var n;this._columnKey=t,this._rowKey=e,null===(n=this._dragArea)||void 0===n||n.updateCoordinates(t,e)},n.prototype._cancelRequest=function(){null!==this._cancelRequestDelegate&&(this._cancelRequestDelegate(),this._cancelRequestDelegate=null)},n.prototype._dragAreaCancelHandler=function(){var t;null===(t=this._dropTimer)||void 0===t||t.reset()},n.prototype._dragAreaConfirmDropHandler=function(e,n,i,o,a,r){return __awaiter(this,void 0,void 0,(function(){var s,l,u=this;return __generator(this,(function(c){switch(c.label){case 0:return e!==this._columnKey||n!==this._rowKey?[3,2]:[4,i.animate(!1)];case 1:return c.sent(),o(),[3,3];case 2:s=function(){return __awaiter(u,void 0,void 0,(function(){var a=this;return __generator(this,(function(r){switch(r.label){case 0:return[4,i.animate(!0)];case 1:return r.sent(),this._dropTimer=new t.DropTimer((function(){return __awaiter(a,void 0,void 0,(function(){var i;return __generator(this,(function(o){switch(o.label){case 0:return i=new t.CardShellDroppedEventArgs(this._card.key,e,n),this._raiseDroppedEvent(i),[4,this._refresh(this._dropRefreshRoute,i.requestData)];case 1:return o.sent(),this._dropTimer=null,[2]}}))}))})),o(),this._updateCoordinates(e,n),[2]}}))}))},l=function(){return __awaiter(u,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:return[4,a.animate()];case 1:return t.sent(),r(),[2]}}))}))},this._raiseDropConfirmationEvent(this._columnKey,this._rowKey,e,n,s,l),c.label=3;case 3:return[2]}}))}))},n.prototype._dragAreaStartHandler=function(e){null!==this._dropTimer&&this._dropTimer.stop();var n=this._element.getBoundingClientRect();return new t.DragStartData(n.left,n.top,e.replaceElement(this._element))},n.prototype._fadeLoadingElements=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,Promise.all([this._fadeTransitionContainer(t),this._fadeLoadingIndicator(t)])];case 1:return e.sent(),[2]}}))}))},n.prototype._fadeLoadingIndicator=function(t){return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(n){return[2,new Promise((function(n){var i=[{opacity:t?0:1},{opacity:t?1:0}],o=e._element.lastElementChild;t&&o.classList.add(e._activeCssClass),o.animate(i,{duration:300,fill:"forwards",iterations:1}).addEventListener("finish",(function(){t||o.classList.remove(e._activeCssClass),n()}))}))]}))}))},n.prototype._fadeTransitionContainer=function(t){return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(n){return[2,new Promise((function(n){var i=[{opacity:t?0:.7},{opacity:t?.7:0}],o=e._element.lastElementChild.previousElementSibling;t&&o.classList.add(e._activeCssClass),o.animate(i,{duration:300,fill:"forwards",iterations:1}).addEventListener("finish",(function(){t||o.classList.remove(e._activeCssClass),n()}))}))]}))}))},n.prototype._raiseDropConfirmationEvent=function(e,n,i,o,a,r){if(this._dropConfirmationHandlers.length>0)for(var s=new t.CardShellDropConfirmationEventArgs(e,n,i,o,a,r),l=0,u=this._dropConfirmationHandlers;l<u.length;l++){(0,u[l])(s)}else a()},n.prototype._raiseDroppedEvent=function(t){for(var e in this._droppedHandlers)this._droppedHandlers.hasOwnProperty(e)&&this._droppedHandlers[e](t)},n.prototype._raiseMovingEvent=function(e,n){return __awaiter(this,void 0,void 0,(function(){var i,o,a,r,s;return __generator(this,(function(l){switch(l.label){case 0:for(a in i=new t.CardShellMovingEventArgs(e,n,this._element,this.sorter.sortValue),o=[],this._movingHandlers)o.push(a);r=0,l.label=1;case 1:return r<o.length?(s=o[r],this._movingHandlers.hasOwnProperty(s)?[4,this._movingHandlers[s](i)]:[3,3]):[3,4];case 2:l.sent(),l.label=3;case 3:return r++,[3,1];case 4:return[2]}}))}))},n.prototype._raiseRefreshedEvent=function(){var e=new t.CardShellRefreshedEventArgs(this._card);for(var n in this._refreshedHandlers)this._refreshedHandlers.hasOwnProperty(n)&&this._refreshedHandlers[n](e)},n.prototype._refresh=function(t,e){return __awaiter(this,void 0,void 0,(function(){var n=this;return __generator(this,(function(i){switch(i.label){case 0:return[4,this._promiseQueue.enqueue((function(){return __awaiter(n,void 0,void 0,(function(){var n=this;return __generator(this,(function(i){return[2,new Promise((function(i){return __awaiter(n,void 0,void 0,(function(){var n,o=this;return __generator(this,(function(a){switch(a.label){case 0:return this._cancelRequest(),[4,this._fadeLoadingElements(!0)];case 1:return a.sent(),n=t.makeRequest(e,(function(t){o._refreshSuccessHandler(t,i)})),this._cancelRequestDelegate=function(){n.__cancelRequest(),i()},[2]}}))}))}))]}))}))}))];case 1:return i.sent(),[2]}}))}))},n.prototype._refreshSuccess=function(e,n,i,o){var a;return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(r){switch(r.label){case 0:return this._cancelRequestDelegate=null,this._instanceTracker.__loadHtmlAndJavaScript(i.htmlForInstanceTrackerContainer,i.javaScript),this._resetCard(),null===(a=this._dragArea)||void 0===a||a.updateGrabArea(new t.CardGrabArea(this._card)),e===this._columnKey&&n===this._rowKey?[3,2]:[4,this._raiseMovingEvent(e,n)];case 1:r.sent(),this._updateCoordinates(e,n),r.label=2;case 2:return this._raiseRefreshedEvent(),[4,this._fadeLoadingElements(!1)];case 3:return r.sent(),o(),[2]}}))}))},n.prototype._removeSuccess=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){switch(n.label){case 0:return[4,new t.RemoveCardShellAnimator(this._element).animate()];case 1:return n.sent(),e(),this.__dispose(),[2]}}))}))},n.prototype._refreshSuccessHandler=function(t,e){this._cancelRequestDelegate=null,t.isRemoved?this._removeSuccess(e):this._refreshSuccess(t.columnKey,t.rowKey,t.htmlJavaScriptPair,e)},n.prototype._resetCard=function(){var t=!1;void 0!==this._cardInstance&&(t=this._cardInstance.isSelected);var e=this._element.firstElementChild.firstElementChild.id;this._cardInstance=autotask.find(e),this._cardInstance.isSelected=t},n}(Autotask.LifecycleObject);t.CardShell=e}(AutotaskBoardsSystem||(AutotaskBoardsSystem={})),function(t){var e=function(t){function e(e,n,i,o,a,r){var s=t.call(this,e)||this;return s._element=AutotaskDomSystem.Document.getElementById(e),s._columnKey=n,s._rowKey=i,s._checkboxId=o,s._countElement=null!==a?AutotaskDomSystem.Document.getElementById(a):null,s._totalTextElement=null!==r?AutotaskDomSystem.Document.getElementById(r):null,s._selectionChangedHandlers=[],s._widthAdjustment=32,s._compactWidthAdjustment=18,s._checkbox=null,s}return __extends(e,t),Object.defineProperty(e.prototype,"columnKey",{get:function(){return this._columnKey},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isSelected",{get:function(){return this._checkbox.value},set:function(t){this._checkbox.value=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rowKey",{get:function(){return this._rowKey},enumerable:!1,configurable:!0}),e.prototype.addSelectionChangedHandler=function(t){this._selectionChangedHandlers.push(t)},e.prototype.applyWidth=function(t,e){var n=t+(e?this._compactWidthAdjustment:this._widthAdjustment);this._element.style.width=n.toString(10).concat("px")},e.prototype.updateCount=function(t){null!==this._countElement&&(this._countElement.innerText=" (".concat(t.toString(10)).concat(")"))},e.prototype.updateTotal=function(t){null!==this._totalTextElement&&(this._totalTextElement.innerText=": ".concat(t))},e.prototype.__initialize=function(){var t=this;this._checkbox=autotask.find(this._checkboxId),this._checkbox.addChangeHandler((function(e){t._checkboxChangeHandler(e)}))},e.prototype._checkboxChangeHandler=function(t){this._raiseSelectionChangedEvent(t.editorInstance.value)},e.prototype._raiseSelectionChangedEvent=function(t){for(var e=0,n=this._selectionChangedHandlers;e<n.length;e++){(0,n[e])(t,this._columnKey,this._rowKey)}},e}(Autotask.LifecycleObject);t.HeaderCell=e}(AutotaskBoardsSystem||(AutotaskBoardsSystem={})),function(t){var e=function(e){function n(n,i,o,a,r){var s=e.call(this,n)||this;return s._sectionElement=AutotaskDomSystem.Document.getElementById(n),s._headingElement=s._sectionElement.children[0],s._scrollingElement=s._sectionElement.children[1],s._isCollapsed=i,s._replaceCardShellRoute=o,s._replaceCardShellContainerElement=AutotaskDomSystem.Document.getElementById(a),s._isCompact=r,s._replaceCardShellInstanceTrackers=[],s._replaceCardShellInstanceTrackers.push(new Autotask.InstanceTracker(a,a)),window.autotask.browserDetection.isFirefox()||window.autotask.browserDetection.isSafari()?s._sectionElement.classList.add("DefaultScrolling"):s._sectionElement.classList.add("AdvancedScrolling"),s._headingElement.children[0].addEventListener("click",(function(){s._toggleClickListener()})),s._scrollingElement.addEventListener("scroll",(function(){s._scrollListener()})),s._cardSystem=new t.OnDeckSectionCardSystem(s._scrollingElement),s._promiseQueue=new AutotaskPromiseSystem.PromiseQueue,s._cardShellReplacedHandlers=[],s._cardShells=[],s._collapsedStateChangeHandlers=[],s._replacingCardShellEventHandlers=[],s._sizingSystemCardParticipantReplacedHandlers=[],s._userInteractionEventHandlers=[],s._collapsedCssClass="Collapsed",s._replaceCardShellContainerCssClass="ReplaceCardShellContainer",s._cancelRequestDelegate=null,s}return __extends(n,e),Object.defineProperty(n.prototype,"height",{get:function(){var t=this._headingElement.offsetHeight;return this._isCollapsed||(t+=this._scrollingElement.offsetHeight),t},enumerable:!1,configurable:!0}),n.prototype.addCardShellReplacedHandler=function(t){this._cardShellReplacedHandlers.push(t)},n.prototype.addCollapsedStateChangeHandler=function(t){this._collapsedStateChangeHandlers.push(t)},n.prototype.addReplacingCardShellHandler=function(t){this._replacingCardShellEventHandlers.push(t)},n.prototype.addSizingSystemCardParticipantReplacedHandler=function(t){this._sizingSystemCardParticipantReplacedHandlers.push(t)},n.prototype.addUserInteractionEventHandler=function(t){this._userInteractionEventHandlers.push(t)},n.prototype.clearSelections=function(){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(e){switch(e.label){case 0:return[4,this._promiseQueue.enqueue((function(){return __awaiter(t,void 0,void 0,(function(){var t=this;return __generator(this,(function(e){return[2,new Promise((function(e){t._cardSystem.clearSelections(),e()}))]}))}))}))];case 1:return e.sent(),[2]}}))}))},n.prototype.createDragAreas=function(){for(var t=[],e=0,n=this._cardShells;e<n.length;e++){var i=n[e].createDragArea(this._isCompact);null!==i&&t.push(i)}return t},n.prototype.findCardSizingParticipants=function(){for(var t=[],e=0,n=Array.from(AutotaskDomSystem.Document.getElementsByAttributeName(this._scrollingElement,"data-sizing-system-card-participant"));e<n.length;e++){var i=n[e].dataset.alphaId;t.push(autotask.find(i))}return t},n.prototype.getSelectedKeys=function(){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(e){return[2,this._promiseQueue.enqueue((function(){return __awaiter(t,void 0,void 0,(function(){var t=this;return __generator(this,(function(e){return[2,new Promise((function(e){e(t._cardSystem.selectedKeys)}))]}))}))}))]}))}))},n.prototype.removeCardShellInstanceId=function(t){for(var e=0,n=this._replaceCardShellInstanceTrackers;e<n.length;e++){n[e].__removeInstanceId(t)}},n.prototype.selectAll=function(){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(e){switch(e.label){case 0:return[4,this._promiseQueue.enqueue((function(){return __awaiter(t,void 0,void 0,(function(){var t=this;return __generator(this,(function(e){return[2,new Promise((function(e){t._cardSystem.selectAll(),e()}))]}))}))}))];case 1:return e.sent(),[2]}}))}))},n.prototype.__dispose=function(){this._promiseQueue.clear(),this._cancelRequest();for(var t=0,e=this._replaceCardShellInstanceTrackers;t<e.length;t++){e[t].__dispose()}},n.prototype.__initialize=function(){this._registerCardShells(),this._cardSystem.reset()},n.prototype._cancelRequest=function(){null!==this._cancelRequestDelegate&&(this._cancelRequestDelegate(),this._cancelRequestDelegate=null)},n.prototype._cardShellDroppedHandler=function(t){t.removeDroppedHandler(this.id),t.removeRefreshedHandler(this.id),this._registerCardShells(),this._replaceCardShell()},n.prototype._cardShellRefreshedHandler=function(t){this._cardSystem.reset(),this._raiseSizingSystemCardParticipantReplacedEvent(t.sizingSystemCardParticipant)},n.prototype._collapse=function(){this._sectionElement.classList.add(this._collapsedCssClass),this._isCollapsed=!0,this._raiseCollapsedStateChangedEvent()},n.prototype._expand=function(){this._sectionElement.classList.remove(this._collapsedCssClass),this._isCollapsed=!1,this._raiseCollapsedStateChangedEvent()},n.prototype._raiseCardShellReplacedHandler=function(t){for(var e=0,n=this._cardShellReplacedHandlers;e<n.length;e++){(0,n[e])(t)}},n.prototype._raiseCollapsedStateChangedEvent=function(){if(this._collapsedStateChangeHandlers.length>0)for(var t=0,e=this._collapsedStateChangeHandlers;t<e.length;t++){(0,e[t])(new AutotaskSection.CollapsedStateChangeEventArgs(this._isCollapsed))}},n.prototype._raiseReplacingCardShellEvent=function(t){for(var e=0,n=this._replacingCardShellEventHandlers;e<n.length;e++){(0,n[e])(t)}},n.prototype._raiseSizingSystemCardParticipantReplacedEvent=function(t){for(var e=0,n=this._sizingSystemCardParticipantReplacedHandlers;e<n.length;e++){(0,n[e])(t)}},n.prototype._raiseUserInteractionEvent=function(){for(var t=0,e=this._userInteractionEventHandlers;t<e.length;t++){(0,e[t])()}},n.prototype._registerCardShell=function(t){var e=this;t.addDroppedHandler(this.id,(function(){e._cardShellDroppedHandler(t)})),t.addRefreshedHandler(this.id,(function(t){e._cardShellRefreshedHandler(t)})),this._cardShells.push(t)},n.prototype._registerCardShells=function(){this._cardShells.length=0;for(var t=0,e=Array.from(AutotaskDomSystem.Document.getElementsByAttributeName(this._scrollingElement,"data-card-shell"));t<e.length;t++){var n=e[t].dataset.alphaId,i=autotask.find(n);this._registerCardShell(i)}},n.prototype._replaceCardShell=function(){var e=this;this._promiseQueue.enqueue((function(){return __awaiter(e,void 0,void 0,(function(){var e=this;return __generator(this,(function(n){return[2,new Promise((function(n){var i=new t.ReplacingCardShellEventArgs;e._raiseReplacingCardShellEvent(i);var o=e._replaceCardShellRoute.makeRequest(i.requestData,(function(t){e._replaceCardShellSuccessHandler(t,n)}));e._cancelRequestDelegate=function(){o.__cancelRequest(),n()}}))]}))}))}))},n.prototype._replaceCardShellSuccessHandler=function(t,e){if(this._cancelRequestDelegate=null,this._replaceCardShellInstanceTrackers[0].__loadHtmlAndJavaScript(t.htmlJavaScriptPair.htmlForInstanceTrackerContainer,t.htmlJavaScriptPair.javaScript),!t.isEmpty){var n=this._replaceCardShellContainerElement.firstElementChild,i=autotask.find(n.dataset.alphaId);this._registerCardShell(i),this._resetTracking(t.replaceCardShellTrackingKey),this._cardSystem.reset(),this._raiseCardShellReplacedHandler(i)}e()},n.prototype._resetTracking=function(t){this._replaceCardShellContainerElement=document.createElement("div"),this._replaceCardShellContainerElement.id=t,this._replaceCardShellContainerElement.classList.add(this._replaceCardShellContainerCssClass),this._scrollingElement.appendChild(this._replaceCardShellContainerElement),this._replaceCardShellInstanceTrackers.unshift(new Autotask.InstanceTracker(t,t))},n.prototype._scrollListener=function(){this._raiseUserInteractionEvent()},n.prototype._toggleClickListener=function(){this._isCollapsed?this._expand():this._collapse()},n}(Autotask.LifecycleObject);t.OnDeckSection=e}(AutotaskBoardsSystem||(AutotaskBoardsSystem={})),function(t){var e=function(t){this.isCompact=t,this.requestData=new AutotaskRequestDataSystem.RequestData};t.BoardShellRefreshingEventArgs=e}(AutotaskBoardsSystem||(AutotaskBoardsSystem={})),function(t){var e=function(){function t(t,e,n,i,o,a){this.columnKey=t,this.rowKey=e,this.targetColumnKey=n,this.targetRowKey=i,this._confirmHandler=o,this._rejectHandler=a}return t.prototype.confirm=function(){this._confirmHandler()},t.prototype.reject=function(){this._rejectHandler()},t}();t.CardShellDropConfirmationEventArgs=e}(AutotaskBoardsSystem||(AutotaskBoardsSystem={})),function(t){var e=function(t,e,n){this.cardKey=t,this.columnKey=e,this.rowKey=n,this.requestData=new AutotaskRequestDataSystem.RequestData};t.CardShellDroppedEventArgs=e}(AutotaskBoardsSystem||(AutotaskBoardsSystem={})),function(t){var e=function(){function e(t,e,n,i){this.columnKey=t,this.rowKey=e,this._originElement=n,this.sortValue=i}return e.prototype.createAnimator=function(e,n){return new t.MoveAnimator(this._originElement,e,n)},e}();t.CardShellMovingEventArgs=e}(AutotaskBoardsSystem||(AutotaskBoardsSystem={})),function(t){var e=function(t){this.sizingSystemCardParticipant=t};t.CardShellRefreshedEventArgs=e}(AutotaskBoardsSystem||(AutotaskBoardsSystem={})),function(t){var e=function(){this.requestData=new AutotaskRequestDataSystem.RequestData};t.ReplacingCardShellEventArgs=e}(AutotaskBoardsSystem||(AutotaskBoardsSystem={})),function(t){var e=function(){function e(e){this._element=e;var n=e.getBoundingClientRect();this._currentClientX=n.left+e.offsetWidth/2,this._targetClientX=this._currentClientX,this._currentClientY=n.top+e.offsetHeight/2,this._targetClientY=this._currentClientY,this._maximumRotationDegrees=5,this._rotationSpeed=.1,this._isActive=!1,this._requestId=null;this._xCoordinateCalculator=new t.DragCoordinateCalculator(.85,.4);this._yCoordinateCalculator=new t.DragCoordinateCalculator(.99,.35)}return e.prototype.animate=function(t,e){var n=this;this._targetClientX=t,this._targetClientY=e,this._isActive||(this._xCoordinateCalculator.setValue(this._currentClientX),this._yCoordinateCalculator.setValue(this._currentClientY),this._requestId=window.requestAnimationFrame((function(){n._requestAnimationFrameHandler()})),this._isActive=!0)},e.prototype.end=function(){null!==this._requestId&&(window.cancelAnimationFrame(this._requestId),this._requestId=null,this._isActive=!1)},e.prototype._calculateRotation=function(t){return 2/Math.PI*this._maximumRotationDegrees*Math.atan(t/(1/this._rotationSpeed))},e.prototype._requestAnimationFrameHandler=function(){var t=this;this._currentClientX=this._xCoordinateCalculator.calculateCoordinate(this._targetClientX),this._currentClientY=this._yCoordinateCalculator.calculateCoordinate(this._targetClientY),this._element.style.left=(this._currentClientX-this._element.offsetWidth/2).toString(10)+"px",this._element.style.top=(this._currentClientY-this._element.offsetHeight/2).toString(10)+"px";var e=this._calculateRotation(this._targetClientX-this._currentClientX);this._element.style.transform="rotate(".concat(e.toString(10)).concat("deg)"),this._requestId=window.requestAnimationFrame((function(){t._requestAnimationFrameHandler()}))},e}();t.DragAnimator=e}(AutotaskBoardsSystem||(AutotaskBoardsSystem={})),function(t){var e=function(){function t(t,e){this._acceleration=t,this._resistance=e,this._delta=0,this._value=0}return t.prototype.calculateCoordinate=function(t){return this._delta+=(t-this._value)*this._acceleration,this._delta*=this._resistance,this._value+=this._delta,this._value},t.prototype.setValue=function(t){this._value=t},t}();t.DragCoordinateCalculator=e}(AutotaskBoardsSystem||(AutotaskBoardsSystem={})),function(t){var e=function(){function t(t,e,n){this._targetPlaceholderAnimator=t,this._originPlaceholderAnimator=e,this._element=n}return t.prototype.animate=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return t?[4,this._targetPlaceholderAnimator.replaceWithElement(this._element)]:[3,3];case 1:return e.sent(),[4,this._originPlaceholderAnimator.remove()];case 2:return e.sent(),[3,6];case 3:return[4,this._originPlaceholderAnimator.replaceWithElement(this._element)];case 4:return e.sent(),[4,this._targetPlaceholderAnimator.remove()];case 5:e.sent(),e.label=6;case 6:return[2]}}))}))},t}();t.DropAnimator=e}(AutotaskBoardsSystem||(AutotaskBoardsSystem={})),function(t){var e=function(){function e(t,e,n){this._originElement=t,this._destinationElement=e,this._desintationIndex=n,this._moveAreaCssClass="CardShellMoveArea3"}return e.prototype.animate=function(){return __awaiter(this,void 0,void 0,(function(){var e,n,i,o;return __generator(this,(function(a){switch(a.label){case 0:return(e=document.createElement("div")).classList.add(this._moveAreaCssClass),e.style.left=this._originElement.offsetLeft.toString(10).concat("px"),e.style.top=this._originElement.offsetTop.toString(10).concat("px"),this._originElement.insertAdjacentElement("beforebegin",e),n=new t.PlaceholderAnimator(!1),i=n.replaceElement(this._originElement),e.appendChild(i),(o=new t.PlaceholderAnimator(!0)).appendToElement(this._destinationElement,this._desintationIndex),[4,o.replaceWithElement(e)];case 1:return a.sent(),[4,n.remove()];case 2:return a.sent(),[2]}}))}))},e}();t.MoveAnimator=e}(AutotaskBoardsSystem||(AutotaskBoardsSystem={})),function(t){var e=function(){function e(t){this._isCollapsed=t,this._placeholder=document.createElement("div"),this._placeholder.classList.add("Placeholder3")}return e.prototype.appendToElement=function(t,e){e<t.childElementCount?t.children[e].insertAdjacentElement("beforebegin",this._placeholder):t.append(this._placeholder)},e.prototype.remove=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:return[4,this._collapse()];case 1:return t.sent(),this._placeholder.remove(),[2]}}))}))},e.prototype.replaceElement=function(t){t.insertAdjacentElement("beforebegin",this._placeholder);var e=parseInt(getComputedStyle(t).marginBottom,10),n=t.clientHeight+e,i=parseInt(getComputedStyle(t).marginRight,10),o=t.clientWidth+i;this._placeholder.append(t),this._placeholder.style.width=o.toString(10).concat("px"),this._placeholder.style.height=n.toString(10).concat("px");var a=new DocumentFragment;return a.append(t),a},e.prototype.returnElement=function(t){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(n){switch(n.label){case 0:for(this._placeholder.style.opacity="0",e=new DocumentFragment;null!==t.firstElementChild;)e.appendChild(t.firstElementChild);return this._placeholder.append(e),this._placeholder.style.width="",this._placeholder.style.height="",[4,this._fadeIn()];case 1:for(n.sent();null!==this._placeholder.firstElementChild;)this._placeholder.insertAdjacentElement("beforebegin",this._placeholder.firstElementChild);return t.remove(),this._placeholder.remove(),[2]}}))}))},e.prototype.replaceWithElement=function(t){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(n){switch(n.label){case 0:return[4,Promise.all([this._expand(t.offsetHeight,t.offsetWidth),this._positionElement(t)])];case 1:for(n.sent(),e=new DocumentFragment;null!==t.firstElementChild;)e.appendChild(t.firstElementChild);for(this._placeholder.append(e),this._placeholder.style.width="",this._placeholder.style.height="";null!==this._placeholder.firstElementChild;)this._placeholder.insertAdjacentElement("beforebegin",this._placeholder.firstElementChild);return t.remove(),this._placeholder.remove(),[2]}}))}))},e._calculateCoordinate=function(t,e,n){return t+(e-t)*n},e.prototype._collapse=function(){return __awaiter(this,void 0,void 0,(function(){var e,n,i,o=this;return __generator(this,(function(a){switch(a.label){case 0:return this._isCollapsed?[3,2]:(e=this._placeholder.getBoundingClientRect(),n=e.height,i=e.width,[4,new t.TimedAnimation((function(t){return t}),(function(t){var e=(n-n*t).toString(10).concat("px"),a=(i-i*t).toString(10).concat("px");o._placeholder.style.height=e,o._placeholder.style.width=a}),300).start()]);case 1:a.sent(),this._isCollapsed=!0,a.label=2;case 2:return[2]}}))}))},e.prototype._expand=function(e,n){return __awaiter(this,void 0,void 0,(function(){var i=this;return __generator(this,(function(o){switch(o.label){case 0:return this._isCollapsed?[4,new t.TimedAnimation((function(t){return t}),(function(t){var o=(e*t).toString(10).concat("px"),a=(n*t).toString(10).concat("px");i._placeholder.style.height=o,i._placeholder.style.width=a}),300).start()]:[3,2];case 1:o.sent(),this._isCollapsed=!1,o.label=2;case 2:return[2]}}))}))},e.prototype._fadeIn=function(){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(e){return[2,new Promise((function(e){t._placeholder.animate([{opacity:0},{opacity:1}],{duration:200,fill:"forwards",iterations:1}).addEventListener("finish",(function(){e()}))}))]}))}))},e.prototype._positionElement=function(n){return __awaiter(this,void 0,void 0,(function(){var i,o,a,r,s,l,u,c,d,h;return __generator(this,(function(_){switch(_.label){case 0:return i=AutotaskDomSystem.Document.getElementById("2191EEDC-D747-4E2D-8054-B021D397D9E9"),o=n.getBoundingClientRect(),a=i.parentElement,r=i.parentElement.getBoundingClientRect(),s=o.left-r.left+a.scrollLeft,l=o.top-r.top+a.scrollTop,i.style.position="absolute",i.style.left=s.toString(10).concat("px"),i.style.top=l.toString(10).concat("px"),u=0,null!==this._placeholder.closest(".PinnedCellContainer3")&&(u=1),i.style.zIndex=u.toString(10),i.append(n),c=this._placeholder.getBoundingClientRect(),d=c.left-r.left+a.scrollLeft,h=c.top-r.top+a.scrollTop,[4,new t.TimedAnimation((function(t){return.5*(Math.sin((t-.5)*Math.PI)+1)}),(function(t){i.style.left=e._calculateCoordinate(s,d,t).toString(10).concat("px"),i.style.top=e._calculateCoordinate(l,h,t).toString(10).concat("px")}),300).start()];case 1:return _.sent(),[2]}}))}))},e}();t.PlaceholderAnimator=e}(AutotaskBoardsSystem||(AutotaskBoardsSystem={})),function(t){var e=function(){function e(t){this._element=t}return e.prototype.animate=function(){return __awaiter(this,void 0,void 0,(function(){var n,i,o,a;return __generator(this,(function(r){switch(r.label){case 0:return(n=document.createElement("div")).style.position="absolute",n.style.zIndex="2",i=this._element.getBoundingClientRect(),n.style.left=i.left.toString(10).concat("px"),n.style.top=i.top.toString(10).concat("px"),o=new t.PlaceholderAnimator(!1),a=o.replaceElement(this._element),n.appendChild(a),document.body.appendChild(n),[4,e._fade(n)];case 1:return r.sent(),[4,o.remove()];case 2:return r.sent(),n.remove(),this._element.remove(),[2]}}))}))},e._fade=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){switch(n.label){case 0:return[4,new t.TimedAnimation((function(t){return t}),(function(t){e.style.opacity=(1-t).toString(10)}),300).start()];case 1:return n.sent(),[2]}}))}))},e}();t.RemoveCardShellAnimator=e}(AutotaskBoardsSystem||(AutotaskBoardsSystem={})),function(t){var e=function(){function t(t,e){this._placeholderAnimator=t,this._element=e}return t.prototype.animate=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:return[4,this._wiggle()];case 1:return t.sent(),[4,this._fadeOut()];case 2:return t.sent(),[4,this._placeholderAnimator.returnElement(this._element)];case 3:return t.sent(),[2]}}))}))},t.prototype._fadeOut=function(){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(e){return[2,new Promise((function(e){t._element.animate([{opacity:1},{opacity:0}],{duration:200,fill:"forwards",iterations:1}).addEventListener("finish",(function(){e()}))}))]}))}))},t.prototype._wiggle=function(){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(e){return[2,new Promise((function(e){t._element.animate([{transform:"translateX(0)"},{transform:"translateX(10px)"},{transform:"translatex(-10px)"},{transform:"translateX(0)"}],{duration:200,iterations:2}).addEventListener("finish",(function(){e()}))}))]}))}))},t}();t.ResetAnimator=e}(AutotaskBoardsSystem||(AutotaskBoardsSystem={})),function(t){var e=function(){function t(t,e,n){this._calculateProgressHandler=t,this._animationHandler=e,this._durationMilliseconds=n,this._requestId=null}return t.prototype.start=function(){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(e){return[2,new Promise((function(e){var n=window.performance.now();window.requestAnimationFrame((function(i){t._requestAnimationFrameHandler(n,i,e)}))}))]}))}))},t.prototype.stop=function(){null!==this._requestId&&(window.cancelAnimationFrame(this._requestId),this._requestId=null)},t.prototype._requestAnimationFrameHandler=function(t,e,n){var i=this,o=(e-t)/this._durationMilliseconds;o>1&&(o=1);var a=this._calculateProgressHandler(o);this._animationHandler(a),o<1?window.requestAnimationFrame((function(e){i._requestAnimationFrameHandler(t,e,n)})):n()},t}();t.TimedAnimation=e}(AutotaskBoardsSystem||(AutotaskBoardsSystem={})),function(t){var e=function(){function t(t,e){var n=this;this._containerElement=t,this._headerCellSystem=e,this._headerCellSystem.addSelectionChangedHandler((function(t,e,i){n._headerCellSystemSelectionChangedHandler(t,e,i)})),this._participants=[],this._columnKeyDictionary={},this._rowKeyDictionary={}}return Object.defineProperty(t.prototype,"allKeys",{get:function(){for(var t=[],e=0,n=this._participants;e<n.length;e++){var i=n[e];t.push(i.key)}return t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"keysNotInDataSet",{get:function(){for(var t=[],e=0,n=this._participants;e<n.length;e++){var i=n[e];i.isInDataSet||t.push(i.key)}return t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"selectedKeys",{get:function(){for(var t=[],e=0,n=this._participants;e<n.length;e++){var i=n[e];i.isSelected&&t.push(i.key)}return t},enumerable:!1,configurable:!0}),t.prototype.clearSelections=function(){for(var t=0,e=this._participants;t<e.length;t++){e[t].isSelected=!1}this._equilibrateHeaderCellSelections()},t.prototype.selectAll=function(){for(var t=0,e=this._participants;t<e.length;t++){e[t].isSelected=!0}this._equilibrateHeaderCellSelections()},t.prototype.selectAllNotInDataSet=function(){for(var t=0,e=this._participants;t<e.length;t++){var n=e[t];n.isInDataSet||(n.isSelected=!0)}this._equilibrateHeaderCellSelections()},t.prototype.reset=function(){var t=this;this._participants.length=0,this._columnKeyDictionary={},this._rowKeyDictionary={};for(var e=0,n=Array.from(AutotaskDomSystem.Document.getElementsByAttributeName(this._containerElement,"data-selection-system-card-participant"));e<n.length;e++){var i=n[e],o=i.dataset.alphaId,a=autotask.find(o);a.addSelectionChangedHandler((function(){t._participantSelectionChangedHandler()})),this._participants.push(a);var r=i.dataset.columnKey;r.length>0&&(void 0===this._columnKeyDictionary[r]?this._columnKeyDictionary[r]=[a]:this._columnKeyDictionary[r].push(a));var s=i.dataset.rowKey;s.length>0&&(void 0===this._rowKeyDictionary[s]?this._rowKeyDictionary[s]=[a]:this._rowKeyDictionary[s].push(a))}this._headerCellSystem.updateStatistics(this._columnKeyDictionary,this._rowKeyDictionary),this._equilibrateHeaderCellSelections()},t.prototype._headerCellSystemSelectionChangedHandler=function(t,e,n){if(null!==e){if(void 0!==this._columnKeyDictionary[e])for(var i=0,o=this._columnKeyDictionary[e];i<o.length;i++){o[i].isSelected=t}}else if(null!==n){if(void 0!==this._rowKeyDictionary[n])for(var a=0,r=this._rowKeyDictionary[n];a<r.length;a++){r[a].isSelected=t}}else for(var s=0,l=this._participants;s<l.length;s++){l[s].isSelected=t}this._equilibrateHeaderCellSelections()},t.prototype._participantSelectionChangedHandler=function(){this._equilibrateHeaderCellSelections()},t.prototype._equilibrateHeaderCellSelections=function(){var t=!0;for(var e in this._columnKeyDictionary)if(this._columnKeyDictionary.hasOwnProperty(e)){for(var n=!0,i=0,o=this._columnKeyDictionary[e];i<o.length;i++){var a=o[i];if(!(n=n&&a.isSelected)){t=!1;break}}this._headerCellSystem.updateColumnSelection(e,n)}for(var e in this._rowKeyDictionary)if(this._rowKeyDictionary.hasOwnProperty(e)){for(var r=!0,s=0,l=this._rowKeyDictionary[e];s<l.length;s++){a=l[s];if(!(r=r&&a.isSelected)){t=!1;break}}this._headerCellSystem.updateRowSelection(e,r)}this._headerCellSystem.updateSelectAllSelection(t)},t}();t.BoardCardSystem=e}(AutotaskBoardsSystem||(AutotaskBoardsSystem={})),function(t){var e=function(){function t(t){this._containerElement=t,this._participants=[]}return Object.defineProperty(t.prototype,"selectedKeys",{get:function(){for(var t=[],e=0,n=this._participants;e<n.length;e++){var i=n[e];i.isSelected&&t.push(i.key)}return t},enumerable:!1,configurable:!0}),t.prototype.clearSelections=function(){for(var t=0,e=this._participants;t<e.length;t++){e[t].isSelected=!1}},t.prototype.selectAll=function(){for(var t=0,e=this._participants;t<e.length;t++){e[t].isSelected=!0}},t.prototype.reset=function(){this._participants.length=0;for(var t=0,e=Array.from(AutotaskDomSystem.Document.getElementsByAttributeName(this._containerElement,"data-selection-system-card-participant"));t<e.length;t++){var n=e[t].dataset.alphaId,i=autotask.find(n);this._participants.push(i)}},t}();t.OnDeckSectionCardSystem=e}(AutotaskBoardsSystem||(AutotaskBoardsSystem={})),function(t){var e=function(){function t(t,e,n,i,o){this._area=t,this._pinnedCellOffset=e,this._pinnedCardCells=n,this._cardCells=i,this._cardShellDroppedHandler=o,this._validCardCellDropTargets=[],this._validPinnedCardCellDropTargets=[],this._draggingCssClass="BoardDragging",this._targetingCssClass="BoardDropTargeting",this._dropTarget=null,this._reset()}return t.prototype.dragAreaDropped=function(t){this._reset(),this._raiseCardShellDroppedEvent(t.columnKey,t.rowKey,t.cardShellInstanceId)},t.prototype.dragAreaDropping=function(t,e){(document.body.classList.remove(this._draggingCssClass),null!==this._dropTarget)&&e(this._dropTarget.createDropData(t.sortValue))},t.prototype.dragAreaMoved=function(t){document.body.classList.add(this._draggingCssClass);var e=null;this._isIntersectingArea(t,0)&&(e=this._isIntersectingArea(t,this._pinnedCellOffset)?this._findDropTarget(t,this._validCardCellDropTargets):this._findDropTarget(t,this._validPinnedCardCellDropTargets)),null===this._dropTarget||null!==e&&e.id===this._dropTarget.id||this._dropTarget.removeTarget(),null!==e?document.body.classList.add(this._targetingCssClass):document.body.classList.remove(this._targetingCssClass),this._dropTarget=e},t.prototype.dragCanceled=function(){document.body.classList.remove(this._draggingCssClass),this._reset()},t.prototype._findDropTarget=function(t,e){for(var n=null,i=e.length;i--;){var o=e[i],a=o.targetForDrop(t);if(a.isValid||e.splice(i,1),a.isValid&&a.isIntersecting){n=o;break}}return n},t.prototype._isIntersectingArea=function(t,e){var n=Math.min(this._area.left+this._area.width,t.left+t.width)-Math.max(this._area.left+e,t.left),i=Math.min(this._area.top+this._area.height,t.top+t.height)-Math.max(this._area.top,t.top);return n>0&&i>0&&n*i>t.width*t.height/2},t.prototype._raiseCardShellDroppedEvent=function(t,e,n){this._cardShellDroppedHandler(t,e,n)},t.prototype._reset=function(){var t;document.body.classList.remove(this._targetingCssClass),null===(t=this._dropTarget)||void 0===t||t.removeTarget(),this._dropTarget=null,this._validCardCellDropTargets=__spreadArrays(this._cardCells),this._validPinnedCardCellDropTargets=__spreadArrays(this._pinnedCardCells)},t}();t.BoardDropArea=e}(AutotaskBoardsSystem||(AutotaskBoardsSystem={})),function(t){var e=function(){function t(t){this._scroller=t,this._hasInBoundsMovement=!1,this._boundaries=null,this._scrollDownTimeoutId=null,this._scrollLeftTimeoutId=null,this._scrollRightTimeoutId=null,this._scrollUpTimeoutId=null,this._removeMouseEventListenersDelegate=null,this._removeTouchEventListenersDelegate=null}return Object.defineProperty(t.prototype,"_delay",{get:function(){return 0},enumerable:!1,configurable:!0}),t.prototype.activate=function(t){this._hasInBoundsMovement=!1,this._boundaries=this._createBoundaries(),t?this._beginTouchDragging():this._beginMouseDragging()},t.prototype.deactivate=function(){this._hasInBoundsMovement=!1,null!==this._removeMouseEventListenersDelegate&&(this._removeMouseEventListenersDelegate(),this._removeMouseEventListenersDelegate=null),null!==this._removeTouchEventListenersDelegate&&(this._removeTouchEventListenersDelegate(),this._removeTouchEventListenersDelegate=null),this._clearScrollDownTimeout(),this._clearScrollLeftTimeout(),this._clearScrollRightTimeout(),this._clearScrollUpTimeout(),this._scroller.stopHorizontalScrolling(),this._scroller.stopVerticalScrolling()},t.prototype._beginMouseDragging=function(){var t=this,e=function(e){t._mouseMoveHandler(e)};document.addEventListener("mousemove",e),this._removeMouseEventListenersDelegate=function(){document.removeEventListener("mousemove",e)}},t.prototype._beginTouchDragging=function(){var t=this,e=function(e){t._touchMoveHandler(e)};document.addEventListener("touchmove",e),this._removeTouchEventListenersDelegate=function(){document.removeEventListener("touchmove",e)}},t.prototype._clearScrollDownTimeout=function(){null!==this._scrollDownTimeoutId&&(window.clearTimeout(this._scrollDownTimeoutId),this._scrollDownTimeoutId=null)},t.prototype._clearScrollLeftTimeout=function(){null!==this._scrollLeftTimeoutId&&(window.clearTimeout(this._scrollLeftTimeoutId),this._scrollLeftTimeoutId=null)},t.prototype._clearScrollRightTimeout=function(){null!==this._scrollRightTimeoutId&&(window.clearTimeout(this._scrollRightTimeoutId),this._scrollRightTimeoutId=null)},t.prototype._clearScrollUpTimeout=function(){null!==this._scrollUpTimeoutId&&(window.clearTimeout(this._scrollUpTimeoutId),this._scrollUpTimeoutId=null)},t.prototype._inBoundsHorizontalMoveHandler=function(t,e){t<e.left?this._scrollLeft():t>e.right?this._scrollRight():t>=e.left&&t<=e.right&&this._stopHorizontalScrolling()},t.prototype._inBoundsVerticalMoveHandler=function(t,e){t<e.top?this._scrollUp():t>e.bottom?this._scrollDown():t>=e.top&&t<=e.bottom&&this._stopVerticalScrolling()},t.prototype._mouseMoveHandler=function(t){this._moveHandler(t.pageX,t.pageY)},t.prototype._moveHandler=function(t,e){var n=this._boundaries;this._hasInBoundsMovement?(this._inBoundsHorizontalMoveHandler(t,n),this._inBoundsVerticalMoveHandler(e,n)):t>n.left&&t<n.right&&e>n.top&&e<n.bottom&&(this._hasInBoundsMovement=!0)},t.prototype._scrollDown=function(){var t=this;this._clearScrollUpTimeout(),null===this._scrollDownTimeoutId&&(this._scrollDownTimeoutId=window.setTimeout((function(){t._scroller.scrollDown()}),this._delay))},t.prototype._scrollLeft=function(){var t=this;this._clearScrollRightTimeout(),null===this._scrollLeftTimeoutId&&(this._scrollLeftTimeoutId=window.setTimeout((function(){t._scroller.scrollLeft()}),this._delay))},t.prototype._scrollRight=function(){var t=this;this._clearScrollLeftTimeout(),null===this._scrollRightTimeoutId&&(this._scrollRightTimeoutId=window.setTimeout((function(){t._scroller.scrollRight()}),this._delay))},t.prototype._scrollUp=function(){var t=this;this._clearScrollDownTimeout(),null===this._scrollUpTimeoutId&&(this._scrollUpTimeoutId=window.setTimeout((function(){t._scroller.scrollUp()}),this._delay))},t.prototype._stopHorizontalScrolling=function(){this._clearScrollLeftTimeout(),this._clearScrollRightTimeout(),this._scroller.stopHorizontalScrolling()},t.prototype._stopVerticalScrolling=function(){this._clearScrollDownTimeout(),this._clearScrollUpTimeout(),this._scroller.stopVerticalScrolling()},t.prototype._touchMoveHandler=function(t){var e=t.targetTouches[0];this._moveHandler(e.pageX,e.pageY)},t}();t.ScrollArea=e}(AutotaskDragAndDropSystem||(AutotaskDragAndDropSystem={})),function(t){var e=function(e){function n(t,n,i){var o=e.call(this,n)||this;return o._area=t,o._pinnedCellOffset=i,o}return __extends(n,e),Object.defineProperty(n.prototype,"_delay",{get:function(){return 400},enumerable:!1,configurable:!0}),n.prototype._createBoundaries=function(){return new t.BoardScrollAreaBoundaries(this._area,this._pinnedCellOffset)},n}(AutotaskDragAndDropSystem.ScrollArea);t.BoardScrollArea=e}(AutotaskBoardsSystem||(AutotaskBoardsSystem={})),function(t){var e=function(){function t(t){this._area=t}return Object.defineProperty(t.prototype,"bottom",{get:function(){return this._area.bottom-this._bottomOffset},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"left",{get:function(){return this._area.left+this._leftOffset},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"right",{get:function(){return this._area.right-this._rightOffset},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"top",{get:function(){return this._area.top+this._topOffset},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"_bottomOffset",{get:function(){return 50},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"_leftOffset",{get:function(){return 50},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"_rightOffset",{get:function(){return 50},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"_topOffset",{get:function(){return 50},enumerable:!1,configurable:!0}),t}();t.ScrollAreaBoundaries=e}(AutotaskDragAndDropSystem||(AutotaskDragAndDropSystem={})),function(t){var e=function(t){function e(e,n){var i=t.call(this,e)||this;return i._pinnedCellOffset=n,i}return __extends(e,t),Object.defineProperty(e.prototype,"_leftOffset",{get:function(){return this._pinnedCellOffset+50},enumerable:!1,configurable:!0}),e}(AutotaskDragAndDropSystem.ScrollAreaBoundaries);t.BoardScrollAreaBoundaries=e}(AutotaskBoardsSystem||(AutotaskBoardsSystem={})),function(t){var e=function(){function t(t){this._eventTarget=t,this._isSuspended=!1,this._dragStartedHandlers=[],this._removeMouseEventListenersDelegate=null,this._removeTouchEventListenersDelegate=null}return Object.defineProperty(t.prototype,"_tearThreshold",{get:function(){return 15},enumerable:!1,configurable:!0}),t.prototype.addDragStartedHandler=function(t){var e=this;0===this._dragStartedHandlers.length&&(this._eventTarget.addMouseDownHandler((function(t,n){e._mouseDownHandler(t,n)})),this._eventTarget.addTouchStartHandler((function(t,n){e._touchStartHandler(t,n)}))),this._dragStartedHandlers.push(t)},t.prototype.clearHandlers=function(){this._removeEventListeners(),this._eventTarget.clearHandlers(),this._dragStartedHandlers.length=0},t.prototype.resume=function(){this._isSuspended=!1},t.prototype.suspend=function(){this._isSuspended=!0},t.prototype._mouseDownHandler=function(t,e){var n=this;if(!this._isSuspended){var i=function(i){n._mouseMoveHandler(i,t,e)};document.addEventListener("mousemove",i);var o=function(){n._mouseUpHandler()};document.addEventListener("mouseup",o),this._removeMouseEventListenersDelegate=function(){document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",o)}}},t.prototype._mouseMoveHandler=function(t,e,n){document.body.style.userSelect="none",t.preventDefault();var i=Math.abs(t.clientX-e),o=Math.abs(t.clientY-n);this._moveEventHandler(i,o,!1)},t.prototype._mouseUpHandler=function(){document.body.style.userSelect="",this._removeEventListeners()},t.prototype._moveEventHandler=function(t,e,n){Math.sqrt(Math.pow(t,2)+Math.pow(e,2))>this._tearThreshold&&(this._raiseDragStartedEvent(n),this._removeEventListeners())},t.prototype._raiseDragStartedEvent=function(t){for(var e=0,n=this._dragStartedHandlers;e<n.length;e++){(0,n[e])(t)}},t.prototype._removeEventListeners=function(){null!==this._removeMouseEventListenersDelegate&&(this._removeMouseEventListenersDelegate(),this._removeMouseEventListenersDelegate=null),null!==this._removeTouchEventListenersDelegate&&(this._removeTouchEventListenersDelegate(),this._removeTouchEventListenersDelegate=null)},t.prototype._touchCancelHandler=function(){this._removeEventListeners()},t.prototype._touchEndHandler=function(){this._removeEventListeners()},t.prototype._touchMoveHandler=function(t,e,n){t.preventDefault();var i=t.targetTouches[0],o=Math.abs(i.clientX-e),a=Math.abs(i.clientY-n);this._moveEventHandler(o,a,!0)},t.prototype._touchStartHandler=function(t,e){var n=this;if(!this._isSuspended){var i=function(i){n._touchMoveHandler(i,t,e)};document.addEventListener("touchmove",i);var o=function(){n._touchCancelHandler()};document.addEventListener("touchcancel",o);var a=function(){n._touchEndHandler()};document.addEventListener("touchend",a),this._removeTouchEventListenersDelegate=function(){document.removeEventListener("touchmove",i),document.removeEventListener("touchcancel",o),document.removeEventListener("touchend",a)}}},t}();t.GrabArea=e}(AutotaskDragAndDropSystem||(AutotaskDragAndDropSystem={})),function(t){var e=function(t){function e(e){return t.call(this,e)||this}return __extends(e,t),e}(AutotaskDragAndDropSystem.GrabArea);t.CardGrabArea=e}(AutotaskBoardsSystem||(AutotaskBoardsSystem={})),function(t){var e=function(){function e(t){this._grabArea=t,this._dragCanceledHandlers=[],this._dragMovedHandlers=[],this._dragStartedHandlers=[],this._droppedHandlers=[],this._droppingHandlers=[],this._removeMouseEventListenersDelegate=null,this._removeTouchEventListenersDelegate=null}return e.prototype.addDragCanceledHandler=function(t){this._dragCanceledHandlers.push(t)},e.prototype.addDragMovedHandler=function(t){this._dragMovedHandlers.push(t)},e.prototype.addDragStartedHandler=function(t){var e=this;0===this._dragStartedHandlers.length&&this._grabArea.addDragStartedHandler((function(t){e._grabAreaDragStartedHandler(t)})),this._dragStartedHandlers.push(t)},e.prototype.addDroppedHandler=function(t){this._droppedHandlers.push(t)},e.prototype.addDroppingHandler=function(t){this._droppingHandlers.push(t)},e.prototype.clearHandlers=function(){this._removeEventListeners(),this._grabArea.clearHandlers(),this._dragCanceledHandlers.length=0,this._dragMovedHandlers.length=0,this._dragStartedHandlers.length=0,this._droppedHandlers.length=0},e.prototype.resume=function(){this._grabArea.resume()},e.prototype.suspend=function(){this._grabArea.suspend()},e.prototype._updateGrabArea=function(t){var e=this;this._grabArea.clearHandlers(),this._grabArea=t,this._dragStartedHandlers.length>0&&this._grabArea.addDragStartedHandler((function(t){e._grabAreaDragStartedHandler(t)}))},e.prototype._beginMouseDragging=function(){var t=this,e=function(e){t._mouseMoveHandler(e)};document.addEventListener("mousemove",e);var n=function(){t._mouseUpHandler()};document.addEventListener("mouseup",n),this._removeMouseEventListenersDelegate=function(){document.removeEventListener("mousemove",e),document.removeEventListener("mouseup",n)}},e.prototype._beginTouchDragging=function(){var t=this,e=function(e){t._touchMoveHandler(e)};document.addEventListener("touchmove",e);var n=function(){t._touchEndHandler()};document.addEventListener("touchend",n);var i=function(){t._touchCancelHandler()};document.addEventListener("touchcancel",i),this._removeTouchEventListenersDelegate=function(){document.removeEventListener("touchmove",e),document.removeEventListener("touchend",n),document.removeEventListener("touchcancel",i)}},e.prototype._dropConfirmHandler=function(){this._raiseDroppedEvent()},e.prototype._dropRejectHandler=function(){this._raiseDragCanceledEvent()},e.prototype._grabAreaDragStartedHandler=function(t){t?this._beginTouchDragging():this._beginMouseDragging(),this._raiseDragStartedEvent(t)},e.prototype._mouseMoveHandler=function(t){t.preventDefault();var e=this._move(t.clientX,t.clientY);this._raiseDragMovedEvent(e,t.clientX,t.clientY)},e.prototype._mouseUpHandler=function(){this._raiseDroppingEvent(),this._removeEventListeners()},e.prototype._raiseDragCanceledEvent=function(){for(var t=0,e=this._dragCanceledHandlers;t<e.length;t++){(0,e[t])()}},e.prototype._raiseDragMovedEvent=function(e,n,i){for(var o=new t.DragAreaMovedEventArgs(e,n,i),a=0,r=this._dragMovedHandlers;a<r.length;a++){(0,r[a])(o)}},e.prototype._raiseDragStartedEvent=function(t){for(var e=0,n=this._dragStartedHandlers;e<n.length;e++){(0,n[e])(t)}},e.prototype._raiseDroppedEvent=function(){for(var e=this._createDroppedData(),n=new t.DragAreaDroppedEventArgs(e),i=0,o=this._droppedHandlers;i<o.length;i++){(0,o[i])(n)}},e.prototype._raiseDroppingEvent=function(){return __awaiter(this,void 0,void 0,(function(){var e,n,i,o,a=this;return __generator(this,(function(r){switch(r.label){case 0:for(e=this._createDroppingData(),n=new t.DragAreaDroppingEventArgs(e),i=0,o=this._droppingHandlers;i<o.length;i++)(0,o[i])(n);return null===n.dropTargetData?[3,1]:(this._confirmDrop(n.dropTargetData,(function(){a._dropConfirmHandler()}),(function(){a._dropRejectHandler()})),[3,3]);case 1:return[4,this._reset()];case 2:r.sent(),this._dropRejectHandler(),r.label=3;case 3:return[2]}}))}))},e.prototype._removeEventListeners=function(){null!==this._removeMouseEventListenersDelegate&&(this._removeMouseEventListenersDelegate(),this._removeMouseEventListenersDelegate=null),null!==this._removeTouchEventListenersDelegate&&(this._removeTouchEventListenersDelegate(),this._removeTouchEventListenersDelegate=null)},e.prototype._touchMoveHandler=function(t){t.preventDefault();var e=t.targetTouches[0],n=this._move(e.clientX,e.clientY);this._raiseDragMovedEvent(n,e.clientX,e.clientY)},e.prototype._touchCancelHandler=function(){this._reset(),this._raiseDragCanceledEvent(),this._removeEventListeners()},e.prototype._touchEndHandler=function(){this._raiseDroppingEvent(),this._removeEventListeners()},e}();t.DragArea=e}(AutotaskDragAndDropSystem||(AutotaskDragAndDropSystem={})),function(t){var e=function(e){function n(n,i,o,a,r,s,l,u,c){var d=e.call(this,n)||this;return d._columnKey=i,d._rowKey=o,d._cardShellInstanceId=a,d._sortValue=r,d._isCompact=s,d._startHandler=l,d._resetHandler=u,d._confirmDropHandler=c,d._element=document.createElement("div"),d._animator=new t.DragAnimator(d._element),d._placeholderAnimator=new t.PlaceholderAnimator(!1),d._compactCssClass="Compact",d._dragAreaCssClass="CardShellDragArea3",d._isActive=!1,d}return __extends(n,e),n.prototype.updateCoordinates=function(t,e){this._columnKey=t,this._rowKey=e},n.prototype.updateGrabArea=function(t){this._updateGrabArea(t)},n.prototype._confirmDrop=function(e,n,i){var o=this,a=new t.DropAnimator(e.placeholderAnimator,this._placeholderAnimator,this._element),r=new t.ResetAnimator(this._placeholderAnimator,this._element);this._confirmDropHandler(e.columnKey,e.rowKey,a,(function(){o._animator.end(),n(),o._isActive=!1}),r,(function(){o._animator.end(),i(),o._isActive=!1}))},n.prototype._createDroppedData=function(){return new t.DroppedData(this._columnKey,this._rowKey,this._cardShellInstanceId)},n.prototype._createDroppingData=function(){return new t.DroppingData(this._sortValue)},n.prototype._move=function(e,n){this._isActive||(this._element=this._createElement(),document.body.appendChild(this._element),this._animator=new t.DragAnimator(this._element),this._isActive=!0),this._animator.animate(e,n);var i=this._element.getBoundingClientRect();return new t.DraggingData(this._columnKey,this._rowKey,i.left,i.width,i.top,i.height,e,n)},n.prototype._reset=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return this._isActive?(this._animator.end(),[4,new t.ResetAnimator(this._placeholderAnimator,this._element).animate()]):[3,2];case 1:e.sent(),this._isActive=!1,e.label=2;case 2:return this._resetHandler(),[2]}}))}))},n.prototype._createElement=function(){this._placeholderAnimator=new t.PlaceholderAnimator(!1);var e=this._startHandler(this._placeholderAnimator),n=document.createElement("div");return n.classList.add(this._dragAreaCssClass),this._isCompact&&n.classList.add(this._compactCssClass),n.style.left=e.clientX.toString(10).concat("px"),n.style.top=e.clientY.toString(10).concat("px"),n.appendChild(e.fragment),n},n}(AutotaskDragAndDropSystem.DragArea);t.CardShellDragArea=e}(AutotaskBoardsSystem||(AutotaskBoardsSystem={})),function(t){var e=function(t,e,n){this.clientX=t,this.clientY=e,this.fragment=n};t.DragStartData=e}(AutotaskBoardsSystem||(AutotaskBoardsSystem={})),function(t){var e=function(t,e,n,i,o,a,r,s){this.columnKey=t,this.rowKey=e,this.left=n,this.width=i,this.top=o,this.height=a,this.clientX=r,this.clientY=s};t.DraggingData=e}(AutotaskBoardsSystem||(AutotaskBoardsSystem={})),function(t){var e=function(t,e,n){this.columnKey=t,this.rowKey=e,this.placeholderAnimator=n};t.DropTargetData=e}(AutotaskBoardsSystem||(AutotaskBoardsSystem={})),function(t){var e=function(){function t(t){this._refreshDelegate=t,this._timeoutId=null,this.reset()}return t.prototype.reset=function(){var t=this;this._timeoutId=window.setTimeout((function(){t._refreshDelegate(),t._timeoutId=null}),400)},t.prototype.stop=function(){null!==this._timeoutId&&(window.clearTimeout(this._timeoutId),this._timeoutId=null)},t}();t.DropTimer=e}(AutotaskBoardsSystem||(AutotaskBoardsSystem={})),function(t){var e=function(t,e,n){this.columnKey=t,this.rowKey=e,this.cardShellInstanceId=n};t.DroppedData=e}(AutotaskBoardsSystem||(AutotaskBoardsSystem={})),function(t){var e=function(t){this.sortValue=t};t.DroppingData=e}(AutotaskBoardsSystem||(AutotaskBoardsSystem={})),function(t){var e=function(){function t(t,e){this._currencySymbol=t,this._numberOfDecimalPlaces=e}return t.prototype.generateText=function(t){for(var e=0,n=0,i=t;n<i.length;n++){var o=i[n];null!==o&&(e+=o)}return this._currencySymbol.concat(window.autotask.convert.decimalToString(e,this._numberOfDecimalPlaces,!1))},t}();t.CurrencyTotalTextGenerator=e}(AutotaskBoardsSystem||(AutotaskBoardsSystem={})),function(t){var e=function(){function t(t,e){this._isTrailingZeroesTrimmingEnabled=t,this._numberOfDecimalPlaces=e}return t.prototype.generateText=function(t){for(var e=0,n=0,i=t;n<i.length;n++){var o=i[n];null!==o&&(e+=o)}return window.autotask.convert.decimalToString(e,this._numberOfDecimalPlaces,this._isTrailingZeroesTrimmingEnabled)},t}();t.DecimalTotalTextGenerator=e}(AutotaskBoardsSystem||(AutotaskBoardsSystem={})),function(t){var e=function(){function t(t,e,n){this._containerElement=t,this._rowTotalTextGenerator=e,this._columnTotalTextGenerator=n,this._participants=[],this._selectionChangedHandlers=[],this._selectAllParticipant=null}return t.prototype.addSelectionChangedHandler=function(t){this._selectionChangedHandlers.push(t)},t.prototype.reset=function(){var t=this;this._participants.length=0;for(var e=0,n=Array.from(AutotaskDomSystem.Document.getElementsByAttributeName(this._containerElement,"data-header-cell-system-participant"));e<n.length;e++){var i=n[e].dataset.alphaId,o=autotask.find(i);o.addSelectionChangedHandler((function(e,n,i){t._participantSelectionChangedHandler(e,n,i)})),null===o.columnKey&&null===o.rowKey?this._selectAllParticipant=o:this._participants.push(o)}},t.prototype.updateColumnSelection=function(t,e){for(var n=0,i=this._participants;n<i.length;n++){var o=i[n];if(o.columnKey===t){o.isSelected=e;break}}},t.prototype.updateRowSelection=function(t,e){for(var n=0,i=this._participants;n<i.length;n++){var o=i[n];if(o.rowKey===t){o.isSelected=e;break}}},t.prototype.updateSelectAllSelection=function(t){null!==this._selectAllParticipant&&(this._selectAllParticipant.isSelected=t)},t.prototype.updateStatistics=function(t,e){for(var n=0,i=this._participants;n<i.length;n++){var o=i[n];if(null!==o.columnKey){var a=0,r=[];t.hasOwnProperty(o.columnKey)&&(a=t[o.columnKey].length,r=t[o.columnKey].map((function(t){return t.columnSummand}))),o.updateCount(a),o.updateTotal(this._columnTotalTextGenerator.generateText(r))}if(null!==o.rowKey){var s=0,l=[];e.hasOwnProperty(o.rowKey)&&(s=e[o.rowKey].length,l=e[o.rowKey].map((function(t){return t.rowSummand}))),o.updateCount(s),o.updateTotal(this._rowTotalTextGenerator.generateText(l))}}},t.prototype._participantSelectionChangedHandler=function(t,e,n){this._raiseSelectionChangedEvent(t,e,n)},t.prototype._raiseSelectionChangedEvent=function(t,e,n){for(var i=0,o=this._selectionChangedHandlers;i<o.length;i++){(0,o[i])(t,e,n)}},t}();t.HeaderCellSystem=e}(AutotaskBoardsSystem||(AutotaskBoardsSystem={})),function(t){var e=function(){function t(t){this._isGroupSeparatorEnabled=t}return t.prototype.generateText=function(t){for(var e=0,n=0,i=t;n<i.length;n++){var o=i[n];null!==o&&(e+=o)}return this._isGroupSeparatorEnabled?window.autotask.convert.integerToString(e):window.autotask.convert.integerToStringWithoutGroupSeparator(e)},t}();t.IntegerTotalTextGenerator=e}(AutotaskBoardsSystem||(AutotaskBoardsSystem={})),function(t){var e=function(){function t(e,n,i){this._maximumWidth=i?200:250,this._minimumWidth=i?120:140,this._isCompact=i,this._equilibratedWidth=this._calculateWidth(n),this._setCellParticipantWidths(e,this._equilibratedWidth),t._setCardParticipantWidths(n,this._equilibratedWidth)}return t.prototype.fixNewCardParticipants=function(e){t._setCardParticipantWidths(e,this._equilibratedWidth)},t.prototype._calculateWidth=function(t){for(var e=this._minimumWidth,n=0,i=t;n<i.length;n++){var o=i[n];if(o.width>e){if(o.width>this._maximumWidth){e=this._maximumWidth;break}e=o.width}}return e},t._setCardParticipantWidths=function(t,e){for(var n=0,i=t;n<i.length;n++){i[n].width=e}},t.prototype._setCellParticipantWidths=function(t,e){for(var n=0,i=t;n<i.length;n++){i[n].applyWidth(e,this._isCompact)}},t}();t.SizingSystem=e}(AutotaskBoardsSystem||(AutotaskBoardsSystem={})),function(t){var e=function(){function t(t){this._sortValue=t}return Object.defineProperty(t.prototype,"sortValue",{get:function(){return this._sortValue},enumerable:!1,configurable:!0}),t.prototype.compareTo=function(t){return this._sortValue===t?0:null===this._sortValue?-1:null===t?1:this._sortValue<t?-1:1},t}();t.CardSorter=e}(AutotaskBoardsSystem||(AutotaskBoardsSystem={})),function(t){var e=function(t){function e(e){return t.call(this,e)||this}return __extends(e,t),e}(t.CardSorter);t.BooleanSorter=e}(AutotaskBoardsSystem||(AutotaskBoardsSystem={})),function(t){var e=function(t){function e(e){return t.call(this,e)||this}return __extends(e,t),e}(t.CardSorter);t.DateSorter=e}(AutotaskBoardsSystem||(AutotaskBoardsSystem={})),function(t){var e=function(t){function e(e){return t.call(this,e)||this}return __extends(e,t),e}(t.CardSorter);t.NumberSorter=e}(AutotaskBoardsSystem||(AutotaskBoardsSystem={})),function(t){var e=function(){function t(t){var e=Array.from(AutotaskDomSystem.Document.getElementsByAttributeName(t,"data-sorting-system-participant"));this._sorters=[];for(var n=0,i=e;n<i.length;n++){var o=i[n].dataset.alphaId,a=autotask.find(o);this._sorters.push(a.sorter)}}return t.prototype.indexOf=function(t){for(var e=0,n=0,i=this._sorters;n<i.length;n++){if(i[n].compareTo(t)>0)break;e++}return e},t}();t.SortingSystem=e}(AutotaskBoardsSystem||(AutotaskBoardsSystem={})),function(t){var e=function(t){function e(e){return t.call(this,e)||this}return __extends(e,t),e}(t.CardSorter);t.StringSorter=e}(AutotaskBoardsSystem||(AutotaskBoardsSystem={})),function(t){var e=function(){function t(t,e,n,i){this._clickEventHandler=t,this._touchEventHandler=e,this._mouseEnterEventHandler=n,this._mouseLeaveEventHandler=i}return t.prototype.raiseClickEvent=function(t,e){null===this._clickEventHandler||t&&null!==this._touchEventHandler||this._clickEventHandler(e)},t.prototype.raiseMouseEnterEvent=function(t){null===this._mouseEnterEventHandler||t&&null!==this._touchEventHandler||this._mouseEnterEventHandler()},t.prototype.raiseMouseLeaveEvent=function(t){null===this._mouseLeaveEventHandler||t&&null!==this._touchEventHandler||this._mouseLeaveEventHandler()},t.prototype.raiseTouchEvent=function(t){null!==this._touchEventHandler&&this._touchEventHandler(t)},t}();t.AdvancedTouchEventHandler=e}(AutotaskButtonSystem||(AutotaskButtonSystem={})),function(t){var e=function(){function t(t,e){this._isControlKeyPressed=t,this._isSelected=e}return Object.defineProperty(t.prototype,"isControlKeyPressed",{get:function(){return this._isControlKeyPressed},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),t}();t.ClickEventArgs=e}(AutotaskButtonSystem||(AutotaskButtonSystem={})),function(t){var e=function(){function t(t){this._clickEventHandler=t}return t.prototype.raiseClickEvent=function(t,e){this._clickEventHandler(e)},t.prototype.raiseMouseEnterEvent=function(t){},t.prototype.raiseMouseLeaveEvent=function(t){},t.prototype.raiseTouchEvent=function(){},t}();t.ClickEventHandler=e}(AutotaskButtonSystem||(AutotaskButtonSystem={})),function(t){var e=function(){function t(t,e,n,i,o){this._clickEventHandler=t,this._touchEventHandler=e,this._mouseEnterEventHandler=n,this._mouseLeaveEventHandler=i,this._tabbingAwayEventHandler=o,this._isTouchEvent=!1}return t.prototype.registerElement=function(t){var e=this;t.addEventListener("click",(function(t){e._clickListener(t)})),t.addEventListener("keydown",(function(t){e._keyDownListener(t)})),t.addEventListener("keyup",(function(t){e._keyUpListener(t)})),t.addEventListener("mouseenter",(function(){e._mouseEnterListener()})),t.addEventListener("mouseleave",(function(){e._mouseLeaveListener()})),t.addEventListener("touchstart",(function(){e._touchStartListener()}),{passive:!0}),t.addEventListener("touchend",(function(){e._touchEndListener()}))},t.prototype._clickListener=function(t){this._raiseClickEvent(this._isTouchEvent,t.ctrlKey)},t.prototype._keyDownListener=function(t){AutotaskDomSystem.KeyCode.isTab(t.which)&&this._raiseTabbingAwayEvent(t.shiftKey,(function(){t.preventDefault()}))},t.prototype._keyUpListener=function(t){AutotaskDomSystem.KeyCode.isEnter(t.which)&&this._raiseClickEvent(!1,t.ctrlKey)},t.prototype._mouseEnterListener=function(){this._raiseMouseEnterEvent(this._isTouchEvent)},t.prototype._mouseLeaveListener=function(){this._raiseMouseLeaveEvent(this._isTouchEvent)},t.prototype._raiseClickEvent=function(t,e){this._clickEventHandler(t,e)},t.prototype._raiseMouseEnterEvent=function(t){this._mouseEnterEventHandler(t)},t.prototype._raiseMouseLeaveEvent=function(t){this._mouseLeaveEventHandler(t)},t.prototype._raiseTouchEvent=function(){this._touchEventHandler()},t.prototype._raiseTabbingAwayEvent=function(t,e){this._tabbingAwayEventHandler(t,e)},t.prototype._touchEndListener=function(){this._raiseTouchEvent(),this._isTouchEvent=!1},t.prototype._touchStartListener=function(){this._isTouchEvent=!0},t}();t.EventsManagement=e}(AutotaskButtonSystem||(AutotaskButtonSystem={})),function(t){var e=function(){function t(t,e,n){this._instanceId=t,this._isShiftKeyPressed=e,this._cancelDelegate=n}return Object.defineProperty(t.prototype,"instanceId",{get:function(){return this._instanceId},enumerable:!1,configurable:!0}),t.prototype.cancel=function(){this._cancelDelegate()},Object.defineProperty(t.prototype,"isShiftKeyPressed",{get:function(){return this._isShiftKeyPressed},enumerable:!1,configurable:!0}),t}();t.TabbingAwayEventArgs=e}(AutotaskButtonSystem||(AutotaskButtonSystem={})),function(t){var e=function(){function t(t){this._isSelected=t}return Object.defineProperty(t.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),t}();t.TouchEventArgs=e}(AutotaskButtonSystem||(AutotaskButtonSystem={})),function(t){var e=function(t){function e(e,n,i,o){var a=t.call(this,e)||this;return a._isEnabled=i,a._isSelected=o,a._buttonElement=AutotaskDomSystem.Document.getElementById(e),new AutotaskButtonSystem.EventsManagement((function(t,e){a._clickEventHandler(t,e)}),(function(){a._touchEventHandler()}),(function(t){a._mouseEnterEventHandler(t)}),(function(t){a._mouseLeaveHandler(t)}),(function(t,e){a._tabbingAwayEventHandler(t,e)})).registerElement(a._buttonElement),a._eventHandlers=[],null!==n&&a._eventHandlers.push(n),a._tabbingAwayHandlers=[],a._disabledCssClass="Disabled2",a._iconOnlyCssClass="IconOnly2",a._selectedCssClass="Selected2",a}return __extends(e,t),Object.defineProperty(e.prototype,"isEnabled",{get:function(){return this._isEnabled},set:function(t){t!==this._isEnabled&&(this._isEnabled=t,this._isEnabled?this._buttonElement.classList.remove(this._disabledCssClass):(this._buttonElement.classList.add(this._disabledCssClass),this._isSelected=!1,this._buttonElement.classList.remove(this._selectedCssClass)))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isSelected",{get:function(){return this._isSelected},set:function(t){t!==this._isSelected&&this._isEnabled&&(this._isSelected=t,this._isSelected?this._buttonElement.classList.add(this._selectedCssClass):this._buttonElement.classList.remove(this._selectedCssClass))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"text",{get:function(){return AutotaskDomSystem.Document.getChildElementByClassName(this._buttonElement,"Text2").textContent},set:function(t){var e=AutotaskDomSystem.Document.getChildElementByClassName(this._buttonElement,"Text2");e.textContent=t,null===t||0===t.length?(null===e.previousElementSibling&&autotask.throwException("Do not provide null or empty text when there is no icon."),this._buttonElement.classList.add(this._iconOnlyCssClass)):this._buttonElement.classList.remove(this._iconOnlyCssClass)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"title",{set:function(t){this._buttonElement.title=t},enumerable:!1,configurable:!0}),e.prototype.addEventHandler=function(t){this._eventHandlers.push(t)},e.prototype.addTabbingAwayHandler=function(t){this._tabbingAwayHandlers.push(t)},e.prototype.focus=function(){this._buttonElement.focus()},e.prototype.focusEnd=function(){this.focus()},e.prototype.focusStart=function(){this.focus()},e.prototype._clickEventHandler=function(t,e){if(this._isEnabled&&this._eventHandlers.length>0){for(var n=new AutotaskButtonSystem.ClickEventArgs(e,this._isSelected),i=0,o=this._eventHandlers;i<o.length;i++){o[i].raiseClickEvent(t,n)}window.autotask.contextOverlayManagement.__determineIfElementIsWithinContextOverlay(this._buttonElement)&&window.autotask.contextOverlayManagement.__hideVisibleContextOverlays()}},e.prototype._mouseEnterEventHandler=function(t){if(this._isEnabled)for(var e=0,n=this._eventHandlers;e<n.length;e++){n[e].raiseMouseEnterEvent(t)}},e.prototype._mouseLeaveHandler=function(t){if(this._isEnabled)for(var e=0,n=this._eventHandlers;e<n.length;e++){n[e].raiseMouseLeaveEvent(t)}},e.prototype._raiseTabbingAwayEvent=function(t,e){if(this._tabbingAwayHandlers.length>0)for(var n=new AutotaskButtonSystem.TabbingAwayEventArgs(this.id,t,e),i=0,o=this._tabbingAwayHandlers;i<o.length;i++){(0,o[i])(n)}},e.prototype._tabbingAwayEventHandler=function(t,e){this._raiseTabbingAwayEvent(t,e)},e.prototype._touchEventHandler=function(){if(this._isEnabled&&this._eventHandlers.length>0){for(var t=new AutotaskButtonSystem.TouchEventArgs(this._isSelected),e=0,n=this._eventHandlers;e<n.length;e++){n[e].raiseTouchEvent(t)}window.autotask.contextOverlayManagement.__determineIfElementIsWithinContextOverlay(this._buttonElement)&&window.autotask.contextOverlayManagement.__hideVisibleContextOverlays()}},e}(Autotask.LifecycleObject);t.Button2=e}(AutotaskButtons||(AutotaskButtons={})),function(t){var e=function(e){function n(t,n,i,o){var a=e.call(this,t)||this;a._isEnabled=i,a._selectionState=o,a._buttonElement=AutotaskDomSystem.Document.getElementById(t);var r=a._buttonElement.getElementsByClassName("Icon2");return a._iconElement=r[0].children[0],new AutotaskButtonSystem.EventsManagement((function(t,e){a._clickEventHandler(t,e)}),(function(){a._touchEventHandler()}),(function(t){a._mouseEnterEventHandler(t)}),(function(t){a._mouseLeaveHandler(t)}),(function(t,e){a._tabbingAwayEventHandler(t,e)})).registerElement(a._buttonElement),a._eventHandlers=[],null!==n&&a._eventHandlers.push(n),a._tabbingAwayHandlers=[],a._disabledCssClass="DisabledState",a._indeterminateCssClass="IndeterminateState",a._selectedCssClass="SelectedState",a._selectionStateChangeHandlers=[],a}return __extends(n,e),Object.defineProperty(n.prototype,"isEnabled",{get:function(){return this._isEnabled},set:function(t){t!==this._isEnabled&&(this._isEnabled=t,this._isEnabled?this._buttonElement.classList.remove(this._disabledCssClass):this._buttonElement.classList.add(this._disabledCssClass))},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isSelected",{get:function(){return this.selectionState===t.CheckBoxButtonState.Checked},set:function(e){if(this._isEnabled){var n=e?t.CheckBoxButtonState.Checked:t.CheckBoxButtonState.Unchecked;n!==this._selectionState&&(this._selectionState=n,this._applySelectionCss(),this._raiseSelectionStateChangeEvent())}},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"selectionState",{get:function(){return this._selectionState},set:function(t){this._isEnabled&&t!==this._selectionState&&(this._selectionState=t,this._applySelectionCss(),this._raiseSelectionStateChangeEvent())},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"title",{get:function(){return this._buttonElement.title},set:function(t){this._buttonElement.title=t},enumerable:!1,configurable:!0}),n.prototype.addEventHandler=function(t){this._eventHandlers.push(t)},n.prototype.addSelectionStateChangeHandler=function(t){this._selectionStateChangeHandlers.push(t)},n.prototype.addTabbingAwayHandler=function(t){this._tabbingAwayHandlers.push(t)},n.prototype.focus=function(){this._buttonElement.focus()},n.prototype.focusEnd=function(){this.focus()},n.prototype.focusStart=function(){this.focus()},n.prototype._applySelectionCss=function(){this._iconElement.classList.remove(this._indeterminateCssClass),this._iconElement.classList.remove(this._selectedCssClass),this._selectionState===t.CheckBoxButtonState.Checked?this._iconElement.classList.add(this._selectedCssClass):this._selectionState===t.CheckBoxButtonState.Indeterminate&&this._iconElement.classList.add(this._indeterminateCssClass)},n.prototype._clickEventHandler=function(e,n){if(this._isEnabled&&(this._selectionState===t.CheckBoxButtonState.Unchecked||this._selectionState===t.CheckBoxButtonState.Indeterminate?this._selectionState=t.CheckBoxButtonState.Checked:this._selectionState=t.CheckBoxButtonState.Unchecked,this._applySelectionCss(),this._raiseSelectionStateChangeEvent(),this._eventHandlers.length>0))for(var i=this._selectionState===t.CheckBoxButtonState.Checked,o=new AutotaskButtonSystem.ClickEventArgs(n,i),a=0,r=this._eventHandlers;a<r.length;a++){r[a].raiseClickEvent(e,o)}},n.prototype._mouseEnterEventHandler=function(t){if(this._isEnabled)for(var e=0,n=this._eventHandlers;e<n.length;e++){n[e].raiseMouseEnterEvent(t)}},n.prototype._mouseLeaveHandler=function(t){if(this._isEnabled)for(var e=0,n=this._eventHandlers;e<n.length;e++){n[e].raiseMouseLeaveEvent(t)}},n.prototype._raiseSelectionStateChangeEvent=function(){for(var t=0,e=this._selectionStateChangeHandlers;t<e.length;t++){(0,e[t])()}},n.prototype._raiseTabbingAwayEvent=function(t,e){if(this._tabbingAwayHandlers.length>0)for(var n=new AutotaskButtonSystem.TabbingAwayEventArgs(this.id,t,e),i=0,o=this._tabbingAwayHandlers;i<o.length;i++){(0,o[i])(n)}},n.prototype._tabbingAwayEventHandler=function(t,e){this._raiseTabbingAwayEvent(t,e)},n.prototype._touchEventHandler=function(){if(this._isEnabled&&this._eventHandlers.length>0)for(var e=this._selectionState===t.CheckBoxButtonState.Checked,n=new AutotaskButtonSystem.TouchEventArgs(e),i=0,o=this._eventHandlers;i<o.length;i++){o[i].raiseTouchEvent(n)}},n}(Autotask.LifecycleObject);t.CheckBoxButton2=e}(AutotaskButtons||(AutotaskButtons={})),function(t){!function(t){t[t.Checked=0]="Checked",t[t.Indeterminate=1]="Indeterminate",t[t.Unchecked=2]="Unchecked"}(t.CheckBoxButtonState||(t.CheckBoxButtonState={}))}(AutotaskButtons||(AutotaskButtons={})),function(t){var e=function(e){function n(t,n,i,o,a,r){var s=e.call(this,t)||this;return s._buttonElement=AutotaskDomSystem.Document.getElementById(t),s._leftButtonId=n,s._rightButtonId=i,s._contextOverlayId=o,s._isEnabled=a,s._leftButtonEventHandlers=[],s._tabbingAwayHandlers=[],s._contextOverlay=null,s._isLeftButtonBehaviorEnabled=!1,s._leftButton=null,s._rightButton=null,null!==r&&s.addLeftButtonEventHandler(r),s}return __extends(n,e),Object.defineProperty(n.prototype,"isEnabled",{get:function(){return this._isEnabled},set:function(t){this._leftButton.isEnabled=t,this._rightButton.isEnabled=t,this._isEnabled=t},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"selectionState",{get:function(){return this._leftButton.selectionState},set:function(t){this._leftButton.selectionState=t},enumerable:!1,configurable:!0}),n.prototype.addTabbingAwayHandler=function(t){this._tabbingAwayHandlers.push(t)},n.prototype.addLeftButtonEventHandler=function(t){this._isLeftButtonBehaviorEnabled=!0,this._leftButtonEventHandlers.push(t),this._buttonElement.classList.remove("Combined")},n.prototype.focus=function(){this._leftButton.focus()},n.prototype.focusEnd=function(){this.focus()},n.prototype.focusStart=function(){this.focus()},n.prototype.hideContextOverlay=function(){this._contextOverlay.hideWithoutDelay()},n.prototype.__dispose=function(){this._contextOverlay.__dispose()},n.prototype.__initialize=function(){var t=this;this._contextOverlay=autotask.find(this._contextOverlayId),this._leftButton=autotask.find(this._leftButtonId),this._leftButton.addTabbingAwayHandler((function(e){t._leftButtonTabbingAwayHandler(e)}));var e=new AutotaskButtonSystem.AdvancedTouchEventHandler((function(e){t._leftButtonClickEventHandler(e)}),(function(e){t._leftButtonTouchEventHandler(e)}),(function(){t._leftButtonMouseEnterEventHandler()}),(function(){t._leftButtonMouseLeaveEventHandler()}));this._leftButton.addEventHandler(e),this._leftButton.addSelectionStateChangeHandler((function(){t._checkBoxSelectionStateChangeHandler()})),this._checkBoxSelectionStateChangeHandler(),this._rightButton=autotask.find(this._rightButtonId);var n=new AutotaskButtonSystem.AdvancedTouchEventHandler(null,(function(){t._rightButtonTouchEventHandler()}),(function(){t._rightButtonMouseEnterEventHandler()}),(function(){t._rightButtonMouseLeaveEventHandler()}));this._rightButton.addEventHandler(n)},n.prototype._leftButtonClickEventHandler=function(t){this._isLeftButtonBehaviorEnabled&&(this._contextOverlay.hide(),this._raiseLeftButtonClickEvent(!1,t.isControlKeyPressed,t.isSelected))},n.prototype._leftButtonMouseEnterEventHandler=function(){this._isLeftButtonBehaviorEnabled||this._rightButtonMouseEnterEventHandler()},n.prototype._leftButtonMouseLeaveEventHandler=function(){this._isLeftButtonBehaviorEnabled||this._rightButtonMouseLeaveEventHandler()},n.prototype._leftButtonTabbingAwayHandler=function(t){this._raiseTabbingAwayEvent(t.isShiftKeyPressed,(function(){t.cancel()}))},n.prototype._leftButtonTouchEventHandler=function(t){this._isLeftButtonBehaviorEnabled?this._raiseLeftButtonClickEvent(!0,!1,t.isSelected):this._rightButtonTouchEventHandler()},n.prototype._raiseLeftButtonClickEvent=function(t,e,n){if(this._leftButtonEventHandlers.length>0)for(var i=new AutotaskButtonSystem.ClickEventArgs(e,n),o=0,a=this._leftButtonEventHandlers;o<a.length;o++){a[o].raiseClickEvent(t,i)}},n.prototype._raiseTabbingAwayEvent=function(t,e){if(this._tabbingAwayHandlers.length>0)for(var n=new AutotaskButtonSystem.TabbingAwayEventArgs(this.id,t,e),i=0,o=this._tabbingAwayHandlers;i<o.length;i++){(0,o[i])(n)}},n.prototype._rightButtonMouseEnterEventHandler=function(){this._contextOverlay.show(this._buttonElement)},n.prototype._rightButtonMouseLeaveEventHandler=function(){this._contextOverlay.hide()},n.prototype._rightButtonTouchEventHandler=function(){var t=this._contextOverlay;t.isVisible?t.hide():t.show(this._buttonElement)},n.prototype._checkBoxSelectionStateChangeHandler=function(){this._leftButton.selectionState===t.CheckBoxButtonState.Unchecked?this._buttonElement.classList.add("NoSelection"):this._buttonElement.classList.remove("NoSelection")},n}(Autotask.LifecycleObject);t.CheckBoxDropDownButton2=e}(AutotaskButtons||(AutotaskButtons={})),function(t){var e=function(t){function e(e,n,i,o){var a=t.call(this,e)||this;return a._buttonElement=AutotaskDomSystem.Document.getElementById(e),a._buttonId=n,a._contextOverlayId=i,a._isEnabled=o,a._contextOverlay=null,a._button=null,a}return __extends(e,t),Object.defineProperty(e.prototype,"isEnabled",{get:function(){return this._isEnabled},set:function(t){this._button.isEnabled=t,this._isEnabled=t},enumerable:!1,configurable:!0}),e.prototype.hideContextOverlay=function(){this._contextOverlay.hideWithoutDelay()},e.prototype.__dispose=function(){this._contextOverlay.__dispose()},e.prototype.__initialize=function(){var t=this;this._contextOverlay=autotask.find(this._contextOverlayId),this._button=autotask.find(this._buttonId);var e=new AutotaskButtonSystem.AdvancedTouchEventHandler((function(){t._buttonClickEventHandler()}),(function(){t._buttonTouchEventHandler()}),(function(){t._buttonMouseEnterEventHandler()}),(function(){t._buttonMouseLeaveEventHandler()}));this._button.addEventHandler(e)},e.prototype._buttonClickEventHandler=function(){this._toggleOverlay()},e.prototype._buttonMouseEnterEventHandler=function(){this._contextOverlay.show(this._buttonElement)},e.prototype._buttonMouseLeaveEventHandler=function(){this._contextOverlay.hide()},e.prototype._buttonTouchEventHandler=function(){this._toggleOverlay()},e.prototype._toggleOverlay=function(){var t=this._contextOverlay;t.isVisible?t.hide():t.show(this._buttonElement)},e}(Autotask.LifecycleObject);t.ContextMenuIconButton2=e}(AutotaskButtons||(AutotaskButtons={})),function(t){var e=function(t){function e(e,n,i,o,a,r){var s=t.call(this,e)||this;return s._buttonElement=AutotaskDomSystem.Document.getElementById(e),s._leftButtonId=n,s._rightButtonId=i,s._contextOverlayId=o,s._isEnabled=a,s._leftButtonEventHandlers=[],s._tabbingAwayHandlers=[],s._contextOverlay=null,s._isLeftButtonBehaviorEnabled=!1,s._leftButton=null,s._rightButton=null,null!==r&&s.addLeftButtonEventHandler(r),s}return __extends(e,t),Object.defineProperty(e.prototype,"isEnabled",{get:function(){return this._isEnabled},set:function(t){this._leftButton.isEnabled=t,this._rightButton.isEnabled=t,this._isEnabled=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isSelected",{get:function(){return this._leftButton.isSelected},set:function(t){this._leftButton.isSelected=t},enumerable:!1,configurable:!0}),e.prototype.addTabbingAwayHandler=function(t){this._tabbingAwayHandlers.push(t)},e.prototype.addLeftButtonEventHandler=function(t){this._isLeftButtonBehaviorEnabled=!0,this._leftButtonEventHandlers.push(t),this._buttonElement.classList.remove("Combined")},e.prototype.focus=function(){this._leftButton.focus()},e.prototype.focusEnd=function(){this.focus()},e.prototype.focusStart=function(){this.focus()},e.prototype.hideContextOverlay=function(){this._contextOverlay.hideWithoutDelay()},e.prototype.__dispose=function(){this._contextOverlay.__dispose()},e.prototype.__initialize=function(){var t=this;this._contextOverlay=autotask.find(this._contextOverlayId),this._leftButton=autotask.find(this._leftButtonId),this._leftButton.addTabbingAwayHandler((function(e){t._leftButtonTabbingAwayHandler(e)}));var e=new AutotaskButtonSystem.AdvancedTouchEventHandler((function(e){t._leftButtonClickEventHandler(e)}),(function(e){t._leftButtonTouchEventHandler(e)}),(function(){t._leftButtonMouseEnterEventHandler()}),(function(){t._leftButtonMouseLeaveEventHandler()}));this._leftButton.addEventHandler(e),this._rightButton=autotask.find(this._rightButtonId);var n=new AutotaskButtonSystem.AdvancedTouchEventHandler(null,(function(){t._rightButtonTouchEventHandler()}),(function(){t._rightButtonMouseEnterEventHandler()}),(function(){t._rightButtonMouseLeaveEventHandler()}));this._rightButton.addEventHandler(n)},e.prototype._leftButtonClickEventHandler=function(t){this._isLeftButtonBehaviorEnabled&&(this._contextOverlay.hide(),this._raiseLeftButtonClickEvent(!1,t.isControlKeyPressed,t.isSelected))},e.prototype._leftButtonMouseEnterEventHandler=function(){this._isLeftButtonBehaviorEnabled||this._rightButtonMouseEnterEventHandler()},e.prototype._leftButtonMouseLeaveEventHandler=function(){this._isLeftButtonBehaviorEnabled||this._rightButtonMouseLeaveEventHandler()},e.prototype._leftButtonTabbingAwayHandler=function(t){this._raiseTabbingAwayEvent(t.isShiftKeyPressed,(function(){t.cancel()}))},e.prototype._leftButtonTouchEventHandler=function(t){this._isLeftButtonBehaviorEnabled?this._raiseLeftButtonClickEvent(!0,!1,t.isSelected):this._rightButtonTouchEventHandler()},e.prototype._raiseLeftButtonClickEvent=function(t,e,n){if(this._leftButtonEventHandlers.length>0)for(var i=new AutotaskButtonSystem.ClickEventArgs(e,n),o=0,a=this._leftButtonEventHandlers;o<a.length;o++){a[o].raiseClickEvent(t,i)}},e.prototype._raiseTabbingAwayEvent=function(t,e){if(this._tabbingAwayHandlers.length>0)for(var n=new AutotaskButtonSystem.TabbingAwayEventArgs(this.id,t,e),i=0,o=this._tabbingAwayHandlers;i<o.length;i++){(0,o[i])(n)}},e.prototype._rightButtonMouseEnterEventHandler=function(){this._contextOverlay.show(this._buttonElement)},e.prototype._rightButtonMouseLeaveEventHandler=function(){this._contextOverlay.hide()},e.prototype._rightButtonTouchEventHandler=function(){var t=this._contextOverlay;t.isVisible?t.hide():t.show(this._buttonElement)},e}(Autotask.LifecycleObject);t.DropDownButton2=e}(AutotaskButtons||(AutotaskButtons={})),function(t){var e=function(t){function e(e,n){var i=t.call(this,e)||this;return i._isEnabled=n,i._buttonElement=AutotaskDomSystem.Document.getElementById(e),i._buttonElement.addEventListener("click",(function(){i._clickListener()})),i._buttonElement.addEventListener("keydown",(function(t){i._keyDownListener(t)})),i._buttonElement.addEventListener("keyup",(function(t){i._keyUpListener(t)})),i._buttonElement.addEventListener("mouseenter",(function(){i._mouseEnterListener()})),i._buttonElement.addEventListener("mouseleave",(function(){i._mouseLeaveListener()})),i._clickHandlers=[],i._tabbingAwayHandlers=[],i._disabledCssClass="DisabledState",i._hoverCssClass="HoverState",i._mouseLeaveHandlers=[],i._selectedCssClass="SelectedState",i._isSelected=!1,i}return __extends(e,t),Object.defineProperty(e.prototype,"isEnabled",{get:function(){return this._isEnabled},set:function(t){t!==this._isEnabled&&(this._isEnabled=t,this._isEnabled?this._buttonElement.classList.remove(this._disabledCssClass):(this._buttonElement.classList.add(this._disabledCssClass),this._buttonElement.classList.remove(this._hoverCssClass),this._isSelected=!1,this._buttonElement.classList.remove(this._selectedCssClass)))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isSelected",{get:function(){return this._isSelected},set:function(t){t!==this._isSelected&&this._isEnabled&&(this._isSelected=t,this._isSelected?this._buttonElement.classList.add(this._selectedCssClass):this._buttonElement.classList.remove(this._selectedCssClass))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_primaryElement",{get:function(){return this._buttonElement},enumerable:!1,configurable:!0}),e.prototype.addClickHandler=function(t){this._clickHandlers.push(t)},e.prototype.addMouseLeaveHandler=function(t){this._mouseLeaveHandlers.push(t)},e.prototype.addTabbingAwayHandler=function(t){this._tabbingAwayHandlers.push(t)},e.prototype.focus=function(){this._buttonElement.focus()},e.prototype._clickListener=function(){this._isEnabled&&this._raiseClickEvent()},e.prototype._keyDownListener=function(t){AutotaskDomSystem.KeyCode.isTab(t.which)&&this._raiseTabbingAwayEvent(t.shiftKey,(function(){t.preventDefault()}))},e.prototype._keyUpListener=function(t){this._isEnabled&&AutotaskDomSystem.KeyCode.isEnter(t.which)&&this._raiseClickEvent()},e.prototype._mouseEnterListener=function(){this._isEnabled&&this._buttonElement.classList.add(this._hoverCssClass)},e.prototype._mouseLeaveListener=function(){this._isEnabled&&(this._buttonElement.classList.remove(this._hoverCssClass),this._raiseMouseLeaveEvent())},e.prototype._raiseClickEvent=function(){for(var t=0,e=this._clickHandlers;t<e.length;t++){(0,e[t])()}},e.prototype._raiseMouseLeaveEvent=function(){for(var t=0,e=this._mouseLeaveHandlers;t<e.length;t++){(0,e[t])()}},e.prototype._raiseTabbingAwayEvent=function(t,e){if(this._tabbingAwayHandlers.length>0)for(var n=0,i=this._tabbingAwayHandlers;n<i.length;n++){(0,i[n])(t,e)}},e}(Autotask.LifecycleObject);t.EditorButton=e}(AutotaskButtons||(AutotaskButtons={})),function(t){var e=function(t){function e(e,n){var i=t.call(this,e)||this;return i._isEnabled=n,i._buttonElement=AutotaskDomSystem.Document.getElementById(e),i._buttonElement.addEventListener("click",(function(){i._clickListener()})),i._buttonElement.addEventListener("keydown",(function(t){i._keyDownListener(t)})),i._buttonElement.addEventListener("keyup",(function(t){i._keyUpListener(t)})),i._fileInputElement=i._buttonElement.children[0],i._fileInputElement.addEventListener("change",(function(){i._fileInputChangeListener()})),i._fileListChangedHandlers=[],i._tabbingAwayHandlers=[],i._disabledCssClass="Disabled2",i}return __extends(e,t),Object.defineProperty(e.prototype,"isEnabled",{get:function(){return this._isEnabled},set:function(t){t!==this._isEnabled&&(this._isEnabled=t,this._isEnabled?this._buttonElement.classList.remove(this._disabledCssClass):this._buttonElement.classList.add(this._disabledCssClass))},enumerable:!1,configurable:!0}),e.prototype.addFileListChangedHandler=function(t){this._fileListChangedHandlers.push(t)},e.prototype.addTabbingAwayHandler=function(t){this._tabbingAwayHandlers.push(t)},e.prototype.focus=function(){this._buttonElement.focus()},e.prototype._clickListener=function(){this._isEnabled&&this._showFileSelection()},e.prototype._fileInputChangeListener=function(){this._raiseFileListChangedEvent()},e.prototype._keyDownListener=function(t){AutotaskDomSystem.KeyCode.isTab(t.which)&&this._raiseTabbingAwayEvent(t.shiftKey,(function(){t.preventDefault()}))},e.prototype._keyUpListener=function(t){this._isEnabled&&AutotaskDomSystem.KeyCode.isEnter(t.which)&&this._showFileSelection()},e.prototype._raiseFileListChangedEvent=function(){if(null!==this._fileInputElement.files){for(var t=0,e=this._fileListChangedHandlers;t<e.length;t++){(0,e[t])(this._fileInputElement.files)}this._fileInputElement.value=""}},e.prototype._raiseTabbingAwayEvent=function(t,e){if(this._tabbingAwayHandlers.length>0)for(var n=0,i=this._tabbingAwayHandlers;n<i.length;n++){(0,i[n])(t,e)}},e.prototype._showFileSelection=function(){this._fileInputElement.click()},e}(Autotask.LifecycleObject);t.FileUploadButton=e}(AutotaskButtons||(AutotaskButtons={})),function(t){var e=function(t){function e(e,n,i,o){var a=t.call(this,e)||this;return a._leftMonthId=n,a._middleMonthId=i,a._rightMonthId=o,a._leftMonth=null,a._middleMonth=null,a._rightMonth=null,a._calendarElement=AutotaskDomSystem.Document.getElementById(e),a}return __extends(e,t),Object.defineProperty(e.prototype,"LeftMonth",{get:function(){return null===this._leftMonth?autotask.throwException("AutotaskCalendarSystem.ContinuousCalendar.LeftMonth: unexpected null value."):this._leftMonth},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"MiddleMonth",{get:function(){return null===this._middleMonth?autotask.throwException("AutotaskCalendarSystem.ContinuousCalendar.MiddleMonth: unexpected null value."):this._middleMonth},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"RightMonth",{get:function(){return null===this._rightMonth?autotask.throwException("AutotaskCalendarSystem.ContinuousCalendar.RightMonth: unexpected null value."):this._rightMonth},enumerable:!1,configurable:!0}),e.prototype.__initialize=function(){var t=this;this._leftMonth=autotask.find(this._leftMonthId),this._middleMonth=autotask.find(this._middleMonthId),this._rightMonth=autotask.find(this._rightMonthId),this._leftMonth.__setNavigationHandlers((function(){t._onNavigatePreviousRequest()}),(function(){t._onNavigateNextRequest()})),this._middleMonth.__setNavigationHandlers((function(){t._onNavigatePreviousRequest()}),(function(){t._onNavigateNextRequest()})),this._rightMonth.__setNavigationHandlers((function(){t._onNavigatePreviousRequest()}),(function(){t._onNavigateNextRequest()})),this._leftMonth.__setDateSelectedHandler((function(e){t._onDateSelected(e)})),this._middleMonth.__setDateSelectedHandler((function(e){t._onDateSelected(e)})),this._rightMonth.__setDateSelectedHandler((function(e){t._onDateSelected(e)}))},e.prototype._loadDate=function(t,e){this.MiddleMonth.__loadDate(t,e)},e.prototype._navigatePrevious=function(t){var e=this.MiddleMonth.__firstDate,n=new Date(e.getFullYear(),e.getMonth()-1);this.LeftMonth.__loadDate(n,t),this._slideRight()},e.prototype._navigateNext=function(t){var e=this.MiddleMonth.__firstDate,n=new Date(e.getFullYear(),e.getMonth()+1);this.RightMonth.__loadDate(n,t),this._slideLeft()},e.prototype._slideLeft=function(){var t=AutotaskDomSystem.Document.getChildElementByClassNames(this._calendarElement,["Left","MonthContainer"]),e=AutotaskDomSystem.Document.getChildElementByClassNames(this._calendarElement,["Middle","MonthContainer"]),n=AutotaskDomSystem.Document.getChildElementByClassNames(this._calendarElement,["Right","MonthContainer"]);e.classList.add("Slide"),e.classList.add("Left"),e.classList.remove("Middle"),n.classList.add("Slide"),n.classList.add("Middle"),n.classList.remove("Right"),t.classList.add("Staging"),t.classList.remove("Slide"),t.classList.add("Right"),t.classList.remove("Left"),t.classList.remove("Staging");var i=this.MiddleMonth;this._middleMonth=this._rightMonth,this._rightMonth=this._leftMonth,this._leftMonth=i},e.prototype._slideRight=function(){var t=AutotaskDomSystem.Document.getChildElementByClassNames(this._calendarElement,["Left","MonthContainer"]),e=AutotaskDomSystem.Document.getChildElementByClassNames(this._calendarElement,["Middle","MonthContainer"]),n=AutotaskDomSystem.Document.getChildElementByClassNames(this._calendarElement,["Right","MonthContainer"]);e.classList.add("Slide"),e.classList.add("Right"),e.classList.remove("Middle"),t.classList.add("Slide"),t.classList.add("Middle"),t.classList.remove("Left"),n.classList.add("Staging"),n.classList.remove("Slide"),n.classList.add("Left"),n.classList.remove("Right"),n.classList.remove("Staging");var i=this.MiddleMonth;this._middleMonth=this._leftMonth,this._leftMonth=this._rightMonth,this._rightMonth=i},e}(Autotask.LifecycleObject);t.ContinuousCalendar=e}(AutotaskCalendarSystem||(AutotaskCalendarSystem={})),function(t){var e=function(t){function e(e,n,i){var o=t.call(this,e)||this;return o._headerId=n,o._bodyId=i,o._header=null,o._body=null,o}return __extends(e,t),Object.defineProperty(e.prototype,"__firstDate",{get:function(){return this.Body.__firstDate},enumerable:!1,configurable:!0}),e.prototype.__setDateSelectedHandler=function(t){this.Body.__setDateSelectedHandler(t)},Object.defineProperty(e.prototype,"Body",{get:function(){return null===this._body?autotask.throwException("AutotaskCalendarSystem.Month.Body: unexpected null value."):this._body},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"Header",{get:function(){return null===this._header?autotask.throwException("AutotaskCalendarSystem.Month.Header: unexpected null value."):this._header},enumerable:!1,configurable:!0}),e.prototype.__initialize=function(){this._header=autotask.find(this._headerId),this._body=autotask.find(this._bodyId)},e.prototype.__loadDate=function(t,e){this.Body.__loadDate(t,e),this.Header.__setText(t)},e}(Autotask.LifecycleObject);t.Month=e}(AutotaskCalendarSystem||(AutotaskCalendarSystem={})),function(t){var e=function(t){function e(e,n,i){var o=t.call(this,e,n,i)||this;return o._continuousCalendarMonthHeaderId=n,o._continuousCalendarMonthHeader=null,o}return __extends(e,t),Object.defineProperty(e.prototype,"ContinuousCalendarMonthHeader",{get:function(){return null===this._continuousCalendarMonthHeader?autotask.throwException("AutotaskCalendarSystem.ContinuousCalendarMonth.ContinuousCalendarMonthHeader: unexpected null value."):this._continuousCalendarMonthHeader},enumerable:!1,configurable:!0}),e.prototype.__initialize=function(){t.prototype.__initialize.call(this),this._continuousCalendarMonthHeader=autotask.find(this._continuousCalendarMonthHeaderId)},e.prototype.__setNavigationHandlers=function(t,e){this.ContinuousCalendarMonthHeader.__setNavigationHandlers(t,e)},e}(t.Month);t.ContinuousCalendarMonth=e}(AutotaskCalendarSystem||(AutotaskCalendarSystem={})),function(t){var e=function(t){function e(e){var n=t.call(this,e)||this;return n._headerElement=AutotaskDomSystem.Document.getElementById(e),n._textElement=AutotaskDomSystem.Document.getChildElementByClassName(n._headerElement,"Text"),n}return __extends(e,t),e.prototype.__setNavigationHandlers=function(t,e){var n=AutotaskDomSystem.Document.getChildElementByClassNames(this._headerElement,["Left","Arrow"]),i=AutotaskDomSystem.Document.getChildElementByClassNames(this._headerElement,["Right","Arrow"]);n.addEventListener("click",t),i.addEventListener("click",e)},e.prototype.__setText=function(t){var e=window.___cultureInfo.DateTimeFormat.MonthGenitiveNames[t.getMonth()],n=t.getFullYear();this._textElement.textContent=e+" "+n.toString()},e}(Autotask.LifecycleObject);t.ContinuousCalendarMonthHeader=e}(AutotaskCalendarSystem||(AutotaskCalendarSystem={})),function(t){var e=function(){function t(t){this._date=t}return Object.defineProperty(t.prototype,"date",{get:function(){return this._date},enumerable:!1,configurable:!0}),t}();t.DateSelectedEventArgs=e}(AutotaskCalendarSystem||(AutotaskCalendarSystem={})),function(t){var e=function(){function t(t,e){t.setHours(0,0,0,0),this._date=t,this._type=e}return Object.defineProperty(t.prototype,"date",{get:function(){return this._date},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"type",{get:function(){return this._type},enumerable:!1,configurable:!0}),t}();t.ImportantDay=e}(AutotaskCalendarSystem||(AutotaskCalendarSystem={})),function(t){!function(t){t.Default="Default"}(t.ImportantDayType||(t.ImportantDayType={}))}(AutotaskCalendarSystem||(AutotaskCalendarSystem={})),function(t){var e=function(e){function n(t){var i=e.call(this,t)||this;i._dateSelectedHandler=null,i._dayDates=[],i._firstDate=null,i._firstDisplayDate=null,i._monthBodyElement=AutotaskDomSystem.Document.getElementById(t);var o=AutotaskDomSystem.Document.getChildElementByClassName(i._monthBodyElement,"Days");return i._dayElements=n._getDayElements(o),i}return __extends(n,e),Object.defineProperty(n.prototype,"__firstDate",{get:function(){return null===this._firstDate?autotask.throwException("AutotaskCalendarSystem.MonthBody._firstDate: unexpected null value."):this._firstDate},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"firstDisplayDate",{get:function(){return null===this._firstDisplayDate?autotask.throwException("AutotaskCalendarSystem.MonthBody._firstDisplayDate unexpected null value."):this._firstDisplayDate},enumerable:!1,configurable:!0}),n.prototype.__loadDate=function(t,e){this._firstDate=n._calculateFirstDayOfMonth(t),this._firstDisplayDate=n._calculateFirstDisplayDate(this.__firstDate);var i=t.getMonth(),o=new Date;o.setHours(0,0,0,0),this._dayDates=[];for(var a=this.firstDisplayDate,r=0,s=this._dayElements;r<s.length;r++){var l=s[r];this._dayDates.push(new Date(a.valueOf()));var u=a.getDate();l.textContent=u.toString();var c=a.valueOf(),d=a.getMonth()!==i,h=c===o.valueOf(),_=d?null:n._getImportantDayType(a,e);n._applyDayCss(l,d,h,_),a.setDate(a.getDate()+1)}},n.prototype.__setDateSelectedHandler=function(t){var e=this;if(null===this._dateSelectedHandler)for(var n=0,i=this._dayElements;n<i.length;n++){i[n].addEventListener("click",(function(t){e._onDayClick(t)}))}this._dateSelectedHandler=t},n._applyDayCss=function(t,e,n,i){t.className="",e&&t.classList.add("Overlap"),n&&t.classList.add("Today"),null!==i&&t.classList.add("ImportanceType"+i.toString())},n._calculateFirstDayOfMonth=function(t){var e=t.getMonth(),n=t.getFullYear();return new Date(n,e)},n._calculateFirstDisplayDate=function(t){var e=t.getDay(),n=window.autotask.culture._calendarFormat.get_orderedDays().indexOf(e),i=new Date(t.valueOf());return i.setDate(t.getDate()-(0===n?7:n)),i},n._getDayElements=function(t){for(var e=[],n=0;n<t.tBodies.length;n++)for(var i=t.tBodies[n],o=0;o<i.rows.length;o++)for(var a=i.rows[o],r=0;r<a.cells.length;r++)e.push(a.cells[r]);return e},n._getImportantDayType=function(t,e){var n=null;if(null!==e)for(var i=0,o=e;i<o.length;i++){var a=o[i];if(a.date.valueOf()===t.valueOf()){n=a.type;break}}return n},n.prototype._onDayClick=function(e){if(null===e.srcElement)autotask.throwException("CalendarBody._onDayClick MouseEvent.srcElement is null.");else if(null!==this._dateSelectedHandler)for(var n=0,i=this._dayElements;n<i.length;n++){var o=i[n];if(e.target===o){var a=this._dayElements.indexOf(o),r=this._dayDates[a];this._dateSelectedHandler(new t.DateSelectedEventArgs(r));break}}},n}(Autotask.LifecycleObject);t.MonthBody=e}(AutotaskCalendarSystem||(AutotaskCalendarSystem={})),function(t){var e=function(e){function n(t,n,i,o){var a=e.call(this,t)||this;return a._dayUnitAbbreviation=i,a._dateSelectedHandler=o,a._containerElement=AutotaskDomSystem.Document.getElementById(t),a._offsetElements=[],a._offsetElements.push(a._containerElement.children[0]),a._offsetElements.push(a._containerElement.children[1]),a._offsetElements.push(a._containerElement.children[2]),a._offsetElements.push(a._containerElement.children[3]),a._todayDate=new Date,a._todayDate.setHours(0,0,0,0),a._offsetDates=[],a._offsetDates.push(a._todayDate),a._offsetDates.push(null),a._offsetDates.push(null),a._offsetDates.push(null),a._offsetValues=null,a.__setOptionalOffsetLinks(n),a}return __extends(n,e),n.prototype.__setOptionalOffsetLinks=function(t){n._equalOffsetValues(t,this._offsetValues)||(null===t?this._hideOptionalOffsetLinks():this._applyOffsetValues(t),this._offsetValues=t)},n.prototype.__initialize=function(){for(var t=this,e=0,n=this._offsetElements;e<n.length;e++){n[e].addEventListener("click",(function(e){t._onOffsetLinkClick(e)}))}},n._equalOffsetValues=function(t,e){var n=!0;if(null===t&&null===e)n=!0;else if(null===t||null===e)n=!1;else if(t.length!==e.length)n=!1;else for(var i=0;i<t.length;++i)if(t[i]!==e[i]){n=!1;break}return n},n.prototype._applyOffsetValues=function(t){for(var e=0;e<this._offsetElements.length-1;e++){var n=this._offsetElements[e+1],i=e<t.length?t[e]:null;this._applyOffsetValue(n,i);var o=null;null!==i&&(o=new Date(this._todayDate.valueOf())).setDate(this._todayDate.getDate()+i),this._offsetDates[e+1]=o}this._containerElement.classList.remove("HideOptional")},n.prototype._applyOffsetValue=function(t,e){null!==e?(t.textContent=e>0?"+"+e.toString()+this._dayUnitAbbreviation:e.toString()+this._dayUnitAbbreviation,t.classList.add("Active")):(t.textContent=null,t.classList.remove("Active"))},n.prototype._hideOptionalOffsetLinks=function(){this._containerElement.classList.add("HideOptional")},n.prototype._onOffsetLinkClick=function(e){for(var n=0,i=this._offsetElements;n<i.length;n++){var o=i[n];if(e.target===o){var a=this._offsetElements.indexOf(o),r=this._offsetDates[a];if(null===r)return autotask.throwException("OffsetLinks._onOffsetLinkClick: unexpected null date value.");this._dateSelectedHandler(new t.DateSelectedEventArgs(r));break}}},n}(Autotask.LifecycleObject);t.OffsetLinks=e}(AutotaskCalendarSystem||(AutotaskCalendarSystem={})),function(t){var e=function(t){function e(e,n,i,o,a,r){var s=t.call(this,e,n,i,o)||this;return s._offsetLinksId=a,s._dateSelectedHandler=r,s._importantDays=null,s._offsetLinks=null,s}return __extends(e,t),Object.defineProperty(e.prototype,"OffsetLinks",{get:function(){return null===this._offsetLinks?autotask.throwException("AutotaskCalendars.GlobalCalendar.OffsetLinks: unexpected null value."):this._offsetLinks},enumerable:!1,configurable:!0}),e.prototype.__initialize=function(){t.prototype.__initialize.call(this),this._offsetLinks=autotask.find(this._offsetLinksId)},e.prototype.__loadDate=function(t,e){var n=null!==t?t:new Date;this._importantDays=[new AutotaskCalendarSystem.ImportantDay(n,AutotaskCalendarSystem.ImportantDayType.Default)],this.OffsetLinks.__setOptionalOffsetLinks(e),this._loadDate(n,this._importantDays)},e.prototype._onDateSelected=function(t){this._dateSelectedHandler(t)},e.prototype._onNavigatePreviousRequest=function(){this._navigatePrevious(this._importantDays)},e.prototype._onNavigateNextRequest=function(){this._navigateNext(this._importantDays)},e}(AutotaskCalendarSystem.ContinuousCalendar);t.GlobalCalendar=e}(AutotaskCalendars||(AutotaskCalendars={})),function(t){var e=function(){function t(){this._overlayId="calendarOverlay5D75D30D92504706A949DC4DD367328A",this._dateSelectedHandler=null,this._hideOverlayHandler=null,this._overlay=null}return Object.defineProperty(t.prototype,"Overlay",{get:function(){return null===this._overlay?autotask.throwException("AutotaskCalendars.GlobalCalendarManagement.Overlay: unexpected null value."):this._overlay},enumerable:!1,configurable:!0}),t.prototype.__hide=function(){this.Overlay.hide()},t.prototype.__initialize=function(){var t=this;this._overlay=autotask.find(this._overlayId),this._overlay.addHideCompletedHandler((function(){t._hideCompletedHandler()}))},t.prototype.__onDateSelected=function(t){null!==this._dateSelectedHandler&&this._dateSelectedHandler(t.date),this.Overlay.__hideWithoutDelay()},t.prototype.__show=function(t,e,n,i,o){this._dateSelectedHandler=i,this._hideOverlayHandler=o,this.Overlay.__show(t,e,n)},t.prototype._hideCompletedHandler=function(){null!==this._hideOverlayHandler&&this._hideOverlayHandler()},t}();t.GlobalCalendarManagement=e}(AutotaskCalendars||(AutotaskCalendars={})),function(t){!function(t){function e(t){var e=window.autotask.convert.stringToInteger(t).toString(16);return 1===e.length?"0"+e:e}t.convertToHexadecimalColor=function(t){var n=t.match(/rgba?\((\d{1,3}), ?(\d{1,3}), ?(\d{1,3})\)?(?:, ?(\d(?:\.\d?))\))?/);return null===n?autotask.throwException("Unexpected rgb color value"):"#"+e(n[1])+e(n[2])+e(n[3])},t.convertToHexadecimal=e,t.getBackgroundColorHexadecimal=function(t){var e=window.getComputedStyle(t).getPropertyValue("background-color").match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/),n=function(t){return("0"+parseInt(t,10).toString(16)).slice(-2)};return"#"+n(e[1])+n(e[2])+n(e[3])}}(t.ColorConverter||(t.ColorConverter={}))}(AutotaskColorPickerSystem||(AutotaskColorPickerSystem={})),function(t){var e=function(){function t(){this._hideCompletedHandler=null,this._overlay=null}return t.prototype.getColorCss=function(t){var e=t.toString();return this._overlay.getColorCss(e)},t.prototype.hide=function(){this._overlay.__hideWithoutDelay()},t.prototype.initialize=function(){var t=this;this._overlay=autotask.find("colorPickerOverlay99A91E98D6F440C581F3241C8CF92134"),this._overlay.addHideCompletedHandler((function(){t._overlayHideCompletedHandler()}))},t.prototype.show=function(t,e,n,i){var o=null;null!==i&&(o=i.toString()),this._raiseHideCompletedEvent(),this._overlay.show(t,e,n,o)},t.prototype.showWithHexadecimal=function(t,e,n,i,o){this._raiseHideCompletedEvent(),this._hideCompletedHandler=i,this._overlay.showWithHexadecimal(t,e,n,o)},t.prototype._overlayHideCompletedHandler=function(){this._raiseHideCompletedEvent()},t.prototype._raiseHideCompletedEvent=function(){null!==this._hideCompletedHandler&&(this._hideCompletedHandler(),this._hideCompletedHandler=null)},t}();t.GlobalColorPicker=e}(AutotaskColorPickerSystem||(AutotaskColorPickerSystem={})),function(t){var e=function(){function e(){this._eventHandler=null}return e.prototype.__setHandler=function(t){this._eventHandler=t},e.prototype.__throwException=function(e){var n=new Error(e);throw null!==this._eventHandler&&this._eventHandler(new t.ExceptionEventArgs(n)),n},e}();t.ExceptionEventManagement=e}(Autotask||(Autotask={})),function(t){var e=function(){function t(){this._instances={}}return t.prototype.__addRegistrationKey=function(t,e){t.id=e},t.prototype.__findInstance=function(t){return this._instances[t]},t.prototype.__findInstances=function(){return this._instances},t.prototype.__register=function(t){for(var e=[],n=0,i=t;n<i.length;n++){var o=i[n];if(o instanceof Function)o();else{var a=o,r=a.id;this._instances[r]=a,autotask.instanceTrackerManagement.__trackInstance(r),e.push(a)}}return e},t.prototype.__removeInstance=function(t){var e=this._instances[t];void 0!==e&&(void 0!==e.__dispose&&e.__dispose(),delete this._instances[t])},t.prototype.__removeInstances=function(t){for(var e=0,n=t;e<n.length;e++){var i=n[e];this.__removeInstance(i)}},t}();t.InstanceManagement=e}(Autotask||(Autotask={})),function(t){var e=function(){function t(){this._completedTrackers={},this._startedTrackers=[],this._currentTracker=null}return t.prototype.__findInstanceTracker=function(t){var e=this._completedTrackers[t];return void 0===e&&autotask.throwException('No instance tracker found for key: "'+t+'".'),e},t.prototype.__removeInstanceTracker=function(t){delete this._completedTrackers[t]},t.prototype.__startTrackingInstances=function(t){this._currentTracker=t,this._startedTrackers.push(t)},t.prototype.__stopTrackingInstances=function(t){var e=this._startedTrackers.pop();if(void 0===e||e.__key!==t)autotask.throwException('The currently running instance tracker does not have the key: "'+t+'".');else{this._completedTrackers[e.__key]=e;var n=this._startedTrackers.slice(-1);1===n.length?this._currentTracker=n[0]:this._currentTracker=null}},t.prototype.__trackInstance=function(t){null!==this._currentTracker&&this._currentTracker.__addInstanceId(t)},t}();t.InstanceTrackerManagement=e}(Autotask||(Autotask={})),function(t){var e=function(){function e(){this._exceptionEventManagement=new t.ExceptionEventManagement,this._formTemplateManagement=new AutotaskFormTemplateSystem.FormTemplateManagement,this._globalCalendarOverlayManagement=new AutotaskCalendars.GlobalCalendarManagement,this._globalColorPicker=new AutotaskColorPickerSystem.GlobalColorPicker,this._globalCurrencyOverlayManagement=new AutotaskCurrencySystem.GlobalCurrencyOverlayManagement,this._globalValidationOverlay=new AutotaskValidationSystem.GlobalValidationOverlay,this._instanceManagement=new t.InstanceManagement,this._instanceTrackerManagement=new t.InstanceTrackerManagement}return Object.defineProperty(e.prototype,"exceptionEventManagement",{get:function(){return this._exceptionEventManagement},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"formTemplateManagement",{get:function(){return this._formTemplateManagement},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"globalCalendarOverlayManagement",{get:function(){return this._globalCalendarOverlayManagement},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"globalColorPicker",{get:function(){return this._globalColorPicker},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"globalCurrencyOverlayManagement",{get:function(){return this._globalCurrencyOverlayManagement},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"globalValidationOverlay",{get:function(){return this._globalValidationOverlay},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"instanceManagement",{get:function(){return this._instanceManagement},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"instanceTrackerManagement",{get:function(){return this._instanceTrackerManagement},enumerable:!1,configurable:!0}),e.prototype.find=function(t){return this.instanceManagement.__findInstance(t)},e.prototype.throwException=function(t){return this._exceptionEventManagement.__throwException(t)},e.prototype.throwArgumentNullException=function(t){return this._exceptionEventManagement.__throwException("Argument null exception: "+t)},e}();t.AutotaskCore=e}(Autotask||(Autotask={})),function(t){var e=function(){function t(){}return t.prototype.copyText=function(t){return null==t&&autotask.throwArgumentNullException("text"),"string"!=typeof t&&autotask.throwException("ClipboardManagement.copyText expects an argument of type string."),navigator.clipboard.writeText(t),!0},t}();t.ClipboardManagement=e}(Autotask||(Autotask={})),function(t){var e=function(){function t(t){this._id=t}return Object.defineProperty(t.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),t}();t.DisposingEventArgs=e}(Autotask||(Autotask={})),function(t){var e=function(){function t(t){this._error=t}return Object.defineProperty(t.prototype,"error",{get:function(){return this._error},enumerable:!1,configurable:!0}),t}();t.ExceptionEventArgs=e}(Autotask||(Autotask={})),function(t){var e=function(){function t(){this._ids=[],this._isExceptionGenerationEnabled=!1}return t.prototype.__enableExceptionGeneration=function(){this._isExceptionGenerationEnabled=!0},t.prototype.__registerInstance=function(t,e){this._isExceptionGenerationEnabled&&this._ids.indexOf(e)>-1&&autotask.throwException("Duplicate ids for a specific type of framework instance have been detected (".concat(e,")")),autotask.instanceManagement.__addRegistrationKey(t,e),this._ids.push(t.id)},t.prototype.__unregisterInstance=function(t){var e=this._ids.indexOf(t);this._ids.splice(e,1)},t.prototype._findInstances=function(){for(var t=[],e=0,n=this._ids;e<n.length;e++){var i=n[e];t.push(autotask.instanceManagement.__findInstance(i))}return t},t}();t.TypeSpecificInstanceManagement=e}(Autotask||(Autotask={})),function(t){var e=function(t){function e(){return t.call(this)||this}return __extends(e,t),e}(t.TypeSpecificInstanceManagement);t.GridInstanceManagement=e}(Autotask||(Autotask={})),function(Autotask){var InstanceTracker=function(){function InstanceTracker(t,e){this._trackerKey=t,this._isHtmlManipulationEnabled=!1,this._container=null,null!==e&&(this._container=AutotaskDomSystem.Document.getElementById(e),this._isHtmlManipulationEnabled=!0),this._instanceIds=[]}return Object.defineProperty(InstanceTracker.prototype,"__key",{get:function(){return this._trackerKey},enumerable:!1,configurable:!0}),InstanceTracker.prototype.__addInstanceId=function(t){this._instanceIds.push(t)},InstanceTracker.prototype.__clear=function(){this._clear()},InstanceTracker.prototype.__clearInstancesAndLoadScript=function(t){this._clear(),this._executeScript(t)},InstanceTracker.prototype.__createLoadContentDelegate=function(t,e){var n=this;return function(){n._loadBasicContent(t,e)}},InstanceTracker.prototype.__createLoadContentDelegateForError=function(t){var e=this;return function(){e._loadError(t)}},InstanceTracker.prototype.__dispose=function(){this._clear(),autotask.instanceTrackerManagement.__removeInstanceTracker(this._trackerKey)},InstanceTracker.prototype.__loadHtmlAndJavaScript=function(t,e){this._loadBasicContent(t,e)},InstanceTracker.prototype.__loadError=function(t){this._loadError(t)},InstanceTracker.prototype.__loadScript=function(t){this._executeScript(t)},InstanceTracker.prototype.__removeInstanceId=function(t){var e=this._instanceIds.indexOf(t);e>=0&&this._instanceIds.splice(e,1)},InstanceTracker.prototype._loadBasicContent=function(t,e){(this._clear(),this._isHtmlManipulationEnabled)&&(null===this._container&&autotask.throwException("The container is not set."),this._getContainer().innerHTML=t);this._executeScript(e)},InstanceTracker.prototype._loadError=function(t){if(this._clear(),this._isHtmlManipulationEnabled){var e=document.createElement("div");e.textContent=t,e.style.fontSize="12px",e.style.margin="3px",this._getContainer().appendChild(e)}},InstanceTracker.prototype._clear=function(){if(this._removeInstancesFromGlobalCache(),this._instanceIds.length=0,this._isHtmlManipulationEnabled)for(var t=this._getContainer();null!==t.firstChild;)t.removeChild(t.firstChild);this._disposeOfViewInstances()},InstanceTracker.prototype._disposeOfViewInstances=function(){},InstanceTracker.prototype._executeScript=function(javaScript){try{"function"==typeof javaScript?javaScript():eval(javaScript)}catch(t){autotask.throwException("There was an exception evaluating a script from an ajax call: "+t)}window.autotask.lifeCycleManagement.__executeLifeCycle(!0,this)},InstanceTracker.prototype._getContainer=function(){return null===this._container?autotask.throwException("The container element is not set."):this._container},InstanceTracker.prototype._removeInstancesFromGlobalCache=function(){autotask.instanceManagement.__removeInstances(this._instanceIds)},InstanceTracker}();Autotask.InstanceTracker=InstanceTracker}(Autotask||(Autotask={})),function(t){var e=function(){function t(t,e,n,i,o){t<0&&autotask.throwException("The startingEventDelay must not be less than zero."),n<0&&autotask.throwException("The contentLoadingEventDelay must not be less than zero."),this._resetHandler=o,this._startingEventDelay=t,this._startingHandler=e,this._contentLoadingEventDelay=n,this._contentLoadedHandler=i,this._endingEventDelay=0,this._contentLoadingEventTimeoutId=null,this._endedEventTimeoutId=null,this._endingEventTimeoutId=null,this._startingEventTimeoutId=null,this._contentLoadingHandler=null,this._endingHandler=null,this._preparingHandler=null}return Object.defineProperty(t.prototype,"contentLoadingHandler",{set:function(t){this._contentLoadingHandler=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"preparingHandler",{set:function(t){this._preparingHandler=t},enumerable:!1,configurable:!0}),t.prototype.configureEndingEvent=function(t,e){e<0&&autotask.throwException("The delay must not be less than zero."),this._endingHandler=t,this._endingEventDelay=e},t.prototype.executeTransition=function(t){var e=this;t.length<1&&autotask.throwException("The loadContentDelegates must not be empty."),this.cancel(),this._onPreparing();var n=0;n=n+this._startingEventDelay+5,this._startingEventTimeoutId=window.setTimeout((function(){e._onStarting()}),n),n=n+this._contentLoadingEventDelay+5,this._contentLoadingEventTimeoutId=window.setTimeout((function(){e._onContentLoading(t)}),n),null!==this._endingHandler&&(n=n+this._endingEventDelay+5,this._endingEventTimeoutId=window.setTimeout((function(){e._onEnding()}),n)),n+=5,this._endedEventTimeoutId=window.setTimeout((function(){e._cleanUpTimeoutIds()}),n)},t.prototype.cancel=function(){this._clearTimeouts()&&this._onReset()},t.prototype._clearTimeouts=function(){var t=!1;return null!==this._startingEventTimeoutId&&(window.clearTimeout(this._startingEventTimeoutId),t=!0),null!==this._contentLoadingEventTimeoutId&&(window.clearTimeout(this._contentLoadingEventTimeoutId),t=!0),null!==this._endingEventTimeoutId&&(window.clearTimeout(this._endingEventTimeoutId),t=!0),null!==this._endedEventTimeoutId&&(window.clearTimeout(this._endedEventTimeoutId),t=!0),t&&this._cleanUpTimeoutIds(),t},t.prototype._cleanUpTimeoutIds=function(){this._startingEventTimeoutId=null,this._contentLoadingEventTimeoutId=null,this._endingEventTimeoutId=null,this._endedEventTimeoutId=null},t.prototype._onEnding=function(){null!==this._endingHandler&&this._endingHandler()},t.prototype._onContentLoaded=function(){this._contentLoadedHandler()},t.prototype._onContentLoading=function(t){null!==this._contentLoadingHandler&&this._contentLoadingHandler();for(var e=0,n=t;e<n.length;e++){(0,n[e])()}this._onContentLoaded()},t.prototype._onPreparing=function(){null!==this._preparingHandler&&this._preparingHandler()},t.prototype._onReset=function(){this._resetHandler()},t.prototype._onStarting=function(){this._startingHandler()},t}();t.TransitionCoordinator=e}(Autotask||(Autotask={})),function(t){var e=function(){function t(){this._overlay=null}return t.prototype.__initialize=function(){this._overlay=autotask.find("currencyTranslationOverlay5D75D30D92504706A949DC4DD367328A")},t.prototype._hideCurrencyOverlay=function(){null!==this._overlay&&this._overlay.hide()},t.prototype._showCurrencyOverlay=function(t,e,n,i,o,a,r){var s=this;if(null!==this._overlay){this._overlay.clearShowingHandlers();this._overlay.addShowingHandler((function(){s._overlayShowingHandler(e,n,i,o,a,r)})),this._overlay.show(t)}},t.prototype._overlayShowingHandler=function(t,e,n,i,o,a){null!==this._overlay&&t.__currencyBoxContextOverlay(e,n,i,o,a,null,this._overlay)},t}();t.GlobalCurrencyOverlayManagement=e}(AutotaskCurrencySystem||(AutotaskCurrencySystem={})),function(t){var e=function(t){function e(e,n,i){var o=t.call(this,e)||this;return o._element=AutotaskDomSystem.Document.getElementById(n),o._clickHandler=function(){i()},o._element.addEventListener("click",o._clickHandler),o}return __extends(e,t),e.prototype.__dispose=function(){this._element.removeEventListener("click",this._clickHandler)},e}(Autotask.LifecycleObject);t.CreateTabButton=e}(AutotaskDashboardSystem||(AutotaskDashboardSystem={})),function(t){var e=function(t){function e(e,n,i){var o=t.call(this,e)||this;return o._element=AutotaskDomSystem.Document.getElementById(n),o._clickHandler=function(){i()},o._element.addEventListener("click",o._clickHandler),o}return __extends(e,t),e.prototype.__dispose=function(){this._element.removeEventListener("click",this._clickHandler)},e}(Autotask.LifecycleObject);t.CreateWidgetButton=e}(AutotaskDashboardSystem||(AutotaskDashboardSystem={})),function(t){var e=function(){function t(t){this._element=t,this._duration=50,this._maximumStep=500,this._startStep=5,this._stepIncrement=5,this._horizontalIntervalId=null,this._horizontalStep=this._startStep,this._isIncrementingHorizontally=null,this._isIncrementingVertically=null,this._isScrolledToBottomDelegate=null,this._verticalIntervalId=null,this._verticalStep=this._startStep}return t.prototype.overrideIsScrolledToBottom=function(t){this._isScrolledToBottomDelegate=t},t.prototype.scrollDown=function(){this._verticalScroll(!0)},t.prototype.scrollLeft=function(){this._horizontalScroll(!1)},t.prototype.scrollRight=function(){this._horizontalScroll(!0)},t.prototype.scrollUp=function(){this._verticalScroll(!1)},t.prototype.stopHorizontalScrolling=function(){null!==this._horizontalIntervalId&&(window.clearInterval(this._horizontalIntervalId),this._horizontalStep=this._startStep,this._horizontalIntervalId=null,this._isIncrementingHorizontally=null)},t.prototype.stopVerticalScrolling=function(){null!==this._verticalIntervalId&&(window.clearInterval(this._verticalIntervalId),this._verticalStep=this._startStep,this._verticalIntervalId=null,this._isIncrementingVertically=null)},t.prototype._horizontalScroll=function(t){var e=this;null!==this._isIncrementingHorizontally&&t!==this._isIncrementingHorizontally&&this.stopHorizontalScrolling(),null===this._isIncrementingHorizontally&&(this._isIncrementingHorizontally=t,this._horizontalIntervalId=window.setInterval((function(){e._horizontalTimerHandler(t)}),this._duration))},t.prototype._horizontalTimerHandler=function(t){if(t&&this._isScrolledToRight())this.stopHorizontalScrolling();else if(t||0!==this._element.scrollLeft){var e=this._horizontalStep;t||(e*=-1),this._element.scrollLeft+=e,this._horizontalStep<this._maximumStep&&(this._horizontalStep+=this._stepIncrement)}else this.stopHorizontalScrolling()},t.prototype._isScrolledToRight=function(){return this._element.scrollLeft===this._element.scrollWidth-this._element.offsetWidth},t.prototype._isScrolledToBottom=function(){return null===this._isScrolledToBottomDelegate?this._element.scrollTop===this._element.scrollHeight-this._element.offsetHeight:this._isScrolledToBottomDelegate()},t.prototype._verticalScroll=function(t){var e=this;null!==this._isIncrementingVertically&&t!==this._isIncrementingVertically&&this.stopVerticalScrolling(),null===this._isIncrementingVertically&&(this._isIncrementingVertically=t,this._verticalIntervalId=window.setInterval((function(){e._verticalTimerHandler(t)}),this._duration))},t.prototype._verticalTimerHandler=function(t){if(t&&this._isScrolledToBottom())this.stopVerticalScrolling();else if(t||0!==this._element.scrollTop){var e=this._verticalStep;t||(e*=-1),this._element.scrollTop+=e,this._verticalStep<this._maximumStep&&(this._verticalStep+=this._stepIncrement)}else this.stopVerticalScrolling()},t}();t.AnimatedScroller=e}(AutotaskScrollingSystem||(AutotaskScrollingSystem={})),function(t){var e=function(){function t(t,e,n,i,o,a,r){var s=this;this._scrollingContainer=t;var l=this._scrollingContainer.getBoundingClientRect();if(this._touchScrollOffset=50,this._topBoundary=l.top,this._topTouchScrollBoundary=this._topBoundary+this._touchScrollOffset,this._bottomBoundary=this._topBoundary+this._scrollingContainer.offsetHeight,this._bottomTouchScrollBoundary=this._bottomBoundary-this._touchScrollOffset,this._leftBoundary=l.left,this._rightBoundary=this._leftBoundary+this._scrollingContainer.offsetWidth,e.length>1)for(var u=0,c=e;u<c.length;u++){c[u].enableDragging((function(t,e,n){s._mouseDown(t,e,n)}),(function(t,e,n){s._touchStart(t,e,n)}))}this._startDragHandler=n,this._dragMoveHandler=i,this._stopDragHandler=o,this._suspendDragHandler=a,this._resumeDragHandler=r,this._isLastTouchPositionOverScrollingContainer=!1,this._scroller=new AutotaskScrollingSystem.AnimatedScroller(this._scrollingContainer),this._windowResizeHandler=function(){s._windowResize()},window.addEventListener("resize",this._windowResizeHandler),this._unregisterMouseEventsDelegate=null,this._unregisterTouchEventsDelegate=null}return t.prototype.dispose=function(){window.removeEventListener("resize",this._windowResizeHandler)},t.prototype._animateTouchScrolling=function(t){t.pageY<this._topTouchScrollBoundary?this._scroller.scrollDown():t.pageY>this._bottomTouchScrollBoundary?this._scroller.scrollUp():t.pageY>=this._topTouchScrollBoundary&&t.pageY<=this._bottomTouchScrollBoundary&&this._scroller.stopVerticalScrolling()},t.prototype._mouseDown=function(t,e,n){var i=this,o=this._startDragHandler(t,e,n),a=this,r=function(){a._mouseEnter(o)};this._scrollingContainer.addEventListener("mouseenter",r);var s=function(t){a._mouseLeave(t,o)};this._scrollingContainer.addEventListener("mouseleave",s);var l=function(t){a._mouseMove(t,o)};document.addEventListener("mousemove",l);var u=function(){a._mouseUp(o)};document.addEventListener("mouseup",u),this._unregisterMouseEventsDelegate=function(){i._scrollingContainer.removeEventListener("mouseenter",r),i._scrollingContainer.removeEventListener("mouseleave",s),document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",u)}},t.prototype._mouseEnter=function(t){this._resumeDragHandler(t),this._scroller.stopVerticalScrolling()},t.prototype._mouseLeave=function(t,e){this._suspendDragHandler(e),t.pageY<=this._topBoundary?this._scroller.scrollDown():t.pageY>=this._bottomBoundary&&this._scroller.scrollUp()},t.prototype._mouseMove=function(t,e){t.preventDefault(),this._dragMoveHandler(e,t.clientX,t.clientY,t.pageX,t.pageY)},t.prototype._mouseUp=function(t){this._scroller.stopVerticalScrolling(),null!==this._unregisterMouseEventsDelegate&&(this._unregisterMouseEventsDelegate(),this._unregisterMouseEventsDelegate=null),this._stopDragHandler(t)},t.prototype._touchCancel=function(t){this._scroller.stopVerticalScrolling(),null!==this._unregisterTouchEventsDelegate&&(this._unregisterTouchEventsDelegate(),this._unregisterTouchEventsDelegate=null),this._stopDragHandler(t)},t.prototype._touchEnd=function(t){this._scroller.stopVerticalScrolling(),null!==this._unregisterTouchEventsDelegate&&(this._unregisterTouchEventsDelegate(),this._unregisterTouchEventsDelegate=null),this._stopDragHandler(t)},t.prototype._touchMove=function(t,e){t.preventDefault();var n=t.targetTouches[0],i=n.pageX<this._leftBoundary||n.pageX>this._rightBoundary||n.pageY<this._topBoundary||n.pageY>this._bottomBoundary;this._isLastTouchPositionOverScrollingContainer&&i?(this._isLastTouchPositionOverScrollingContainer=!1,this._suspendDragHandler(e)):this._isLastTouchPositionOverScrollingContainer||i||(this._resumeDragHandler(e),this._isLastTouchPositionOverScrollingContainer=!0),this._animateTouchScrolling(n),this._dragMoveHandler(e,n.clientX,n.clientY,n.pageX,n.pageY)},t.prototype._touchStart=function(t,e,n){this._isLastTouchPositionOverScrollingContainer=!0;var i=this._startDragHandler(t,e,n),o=this,a=function(){o._touchCancel(i)};t.addEventListener("touchcancel",a);var r=function(){o._touchEnd(i)};t.addEventListener("touchend",r);var s=function(t){o._touchMove(t,i)};t.addEventListener("touchmove",s),this._unregisterTouchEventsDelegate=function(){t.removeEventListener("touchcancel",a),t.removeEventListener("touchend",r),t.removeEventListener("touchmove",s)}},t.prototype._windowResize=function(){var t=this._scrollingContainer.getBoundingClientRect();this._bottomBoundary=this._topBoundary+this._scrollingContainer.offsetHeight,this._bottomTouchScrollBoundary=this._bottomBoundary-this._touchScrollOffset,this._leftBoundary=t.left,this._rightBoundary=this._leftBoundary+this._scrollingContainer.offsetWidth},t}();t.DashboardTabDragEventsCoordinator=e}(AutotaskDashboardSystem||(AutotaskDashboardSystem={})),function(t){var e=function(){function t(t,e,n,i,o){var a=this;if(this._tabButtonContainer=t,this._tabButtons=e,this._startDragHandler=n,this._dragMoveHandler=i,this._stopDragHandler=o,this._mouseDownHandler=function(t){a._mouseDown(t)},this._mouseMoveHandler=function(t){a._mouseMove(t)},this._mouseUpHandler=function(){a._mouseUp()},this._touchStartHandler=function(t){a._touchStart(t)},this._touchMoveHandler=function(t){a._touchMove(t)},this._touchEndHandler=function(t){a._touchEnd(t)},this._touchCancelHandler=function(t){a._touchCancel(t)},this._tabButtons.length>1)for(var r=0,s=this._tabButtons;r<s.length;r++){var l=s[r];l.addEventListener("mousedown",this._mouseDownHandler),l.addEventListener("touchstart",this._touchStartHandler,{passive:!0})}}return t.prototype.dispose=function(){for(var t=0,e=this._tabButtons;t<e.length;t++){var n=e[t];n.removeEventListener("mousedown",this._mouseDownHandler),n.removeEventListener("touchstart",this._touchStartHandler)}},t.prototype._mouseDown=function(t){this._registerMouseEvents();var e=t.target;this._startDragHandler(e)},t.prototype._mouseMove=function(t){t.preventDefault(),this._dragMoveHandler(t.clientX,t.pageX)},t.prototype._mouseUp=function(){this._unregisterMouseEvents(),this._stopDragHandler()},t.prototype._touchCancel=function(t){var e=t.target;this._unregisterTouchEvents(e),this._stopDragHandler()},t.prototype._touchEnd=function(t){var e=t.target;this._unregisterTouchEvents(e),this._stopDragHandler()},t.prototype._touchMove=function(t){t.preventDefault();var e=t.targetTouches[0];this._dragMoveHandler(e.clientX,e.pageX)},t.prototype._touchStart=function(t){var e=t.target;this._registerTouchEvents(e),this._startDragHandler(e)},t.prototype._registerMouseEvents=function(){this._tabButtonContainer.addEventListener("mousemove",this._mouseMoveHandler),document.addEventListener("mouseup",this._mouseUpHandler)},t.prototype._registerTouchEvents=function(t){t.addEventListener("touchmove",this._touchMoveHandler),t.addEventListener("touchend",this._touchEndHandler),t.addEventListener("touchcancel",this._touchCancelHandler)},t.prototype._unregisterMouseEvents=function(){this._tabButtonContainer.removeEventListener("mousemove",this._mouseMoveHandler),document.removeEventListener("mouseup",this._mouseUpHandler)},t.prototype._unregisterTouchEvents=function(t){t.removeEventListener("touchmove",this._touchMoveHandler),t.removeEventListener("touchend",this._touchEndHandler),t.removeEventListener("touchcancel",this._touchCancelHandler)},t}();t.TitleBarDragEventsCoordinator=e}(AutotaskDashboardSystem||(AutotaskDashboardSystem={})),function(t){var e=function(e){function n(t,n,i){var o=e.call(this,t)||this;o._dashboardId=n,o._trackerKey=i;var a=AutotaskDomSystem.Document.getElementById(t);return o._transitionContainer=AutotaskDomSystem.Document.getChildElementByClassName(a,"TransitionContainer"),o._loadingIndicator=AutotaskDomSystem.Document.getChildElementByClassName(a,"LoadingIndicator"),o._activeCssClass="Active",o._fadeCssClass="Fade",o._dashboard=null,o._instanceTracker=null,o._replaceCanceler=null,o._transitionCoordinator=null,o}return __extends(n,e),n.prototype.__initialize=function(){this._instanceTracker=autotask.instanceTrackerManagement.__findInstanceTracker(this._trackerKey),this._dashboard=autotask.find(this._dashboardId)},n.prototype.__refresh=function(){this._getDashboard().refresh()},n.prototype.__refreshWidgets=function(){this._getDashboard().refreshWidgets()},n.prototype.__replace=function(e,n,i){var o=this;this._cancel(),this._transitionContainer.classList.add(this._activeCssClass),this._loadingIndicator.classList.add(this._activeCssClass);var a=this._getDashboard(),r=new t.DashboardShellReplacingEventArgs(a.tabId);n(r);this._replaceCanceler=e.__replaceDashboard(r.data,(function(t){o._replaceSuccess(t,i)}))},n.prototype._cancel=function(){null!==this._replaceCanceler&&(this._replaceCanceler.__cancelRequest(),this._replaceCanceler=null),null!==this._transitionCoordinator&&this._transitionCoordinator.cancel(),this._getDashboard().__cancel()},n.prototype._getDashboard=function(){return null===this._dashboard?autotask.throwException("The dashboard is not set."):this._dashboard},n.prototype._getInstanceTracker=function(){return null===this._instanceTracker?autotask.throwException("The instance tracker is not set."):this._instanceTracker},n.prototype._replaceSuccess=function(t,e){var n=this;this._replaceCanceler=null;this._transitionCoordinator=new Autotask.TransitionCoordinator(100,(function(){n._transitionStarting()}),100,(function(){n._transitionContainer.classList.add(n._fadeCssClass),n._dashboard=autotask.find(t.dashboardId),e()}),(function(){n._transitionReset()})),this._transitionCoordinator.configureEndingEvent((function(){n._transitionEnding()}),500);var i=this._getInstanceTracker();this._transitionCoordinator.executeTransition([i.__createLoadContentDelegate(t.html,t.javaScript)])},n.prototype._transitionEnding=function(){this._transitionContainer.classList.remove(this._activeCssClass),this._transitionContainer.classList.remove(this._fadeCssClass)},n.prototype._transitionReset=function(){this._loadingIndicator.classList.remove(this._activeCssClass),this._transitionContainer.classList.remove(this._activeCssClass),this._transitionContainer.classList.remove(this._fadeCssClass)},n.prototype._transitionStarting=function(){this._loadingIndicator.classList.remove(this._activeCssClass)},n}(Autotask.LifecycleObject);t.PreviewDashboardShell=e}(AutotaskDashboardSystem||(AutotaskDashboardSystem={})),function(t){var e=function(e){function n(t,n,i){var o=e.call(this,t)||this;o._dashboardId=n,o._trackerKey=i;var a=AutotaskDomSystem.Document.getElementById(t);return o._transitionContainer=AutotaskDomSystem.Document.getChildElementByClassName(a,"TransitionContainer"),o._loadingIndicator=AutotaskDomSystem.Document.getChildElementByClassName(a,"LoadingIndicator"),o._activeCssClass="Active",o._fadeCssClass="Fade",o._instanceTracker=null,o._presentationDashboard=null,o._standardDashboard=null,o._standardDashboardRefreshedHandler=null,o._replaceCanceler=null,o._transitionCoordinator=null,o._userInteractionEventEndedHandler=null,o._userInteractionEventStartedHandler=null,o}return __extends(n,e),n.prototype.__initialize=function(){var t=this;this._instanceTracker=autotask.instanceTrackerManagement.__findInstanceTracker(this._trackerKey),this._standardDashboard=autotask.find(this._dashboardId),this._standardDashboard.__registerUserInteractionEventHandlers((function(){t._onUserInteractionEventStarted()}),(function(){t._onUserInteractionEventEnded()})),this._standardDashboard.__registerRefreshedHandler((function(){t._onStandardDashboardRefreshed()}))},n.prototype.__preventDashboardWidgetShellsFromRefreshing=function(){this._getStandardDashboard().__preventWidgetShellsFromRefreshing()},n.prototype.__refresh=function(){this._getStandardDashboard().refresh()},n.prototype.__refreshWidgets=function(){this._getStandardDashboard().refreshWidgets()},n.prototype.__registerStandardDashboardRefreshedHandler=function(t){this._standardDashboardRefreshedHandler=t},n.prototype.__registerUserInteractionEventHandlers=function(t,e){this._userInteractionEventStartedHandler=t,this._userInteractionEventEndedHandler=e},n.prototype.__replaceWithPresentationDashboard=function(e,n){var i=this;this._cancel(),this._transitionContainer.classList.add(this._activeCssClass),this._loadingIndicator.classList.add(this._activeCssClass);var o=this._getStandardDashboard(),a=new t.DashboardShellReplacingEventArgs(o.tabId);n(a);this._replaceCanceler=e.__replaceDashboard(a.data,(function(t){i._replaceWithPresentationDashboardSuccess(t)}))},n.prototype.__replaceWithStandardDashboard=function(e,n,i){var o=this;this._cancel(),this._transitionContainer.classList.add(this._activeCssClass),this._loadingIndicator.classList.add(this._activeCssClass);var a=this._getPresentationDashboard(),r=new t.DashboardShellReplacingEventArgs(a.tabId);n(r);this._replaceCanceler=e.__replaceDashboard(r.data,(function(t){o._replaceWithStandardDashboardSuccess(t,i)}))},n.prototype.__selectTab=function(t){this._getStandardDashboard().selectTab(t)},n.prototype._cancel=function(){null!==this._replaceCanceler&&(this._replaceCanceler.__cancelRequest(),this._replaceCanceler=null),null!==this._transitionCoordinator&&this._transitionCoordinator.cancel(),null!==this._standardDashboard?this._standardDashboard.__cancel():null!==this._presentationDashboard&&this._presentationDashboard.__cancel()},n.prototype._getPresentationDashboard=function(){return null===this._presentationDashboard?autotask.throwException("The presentation dashboard is not set."):this._presentationDashboard},n.prototype._getStandardDashboard=function(){return null===this._standardDashboard?autotask.throwException("The standard dashboard is not set."):this._standardDashboard},n.prototype._getInstanceTracker=function(){return null===this._instanceTracker?autotask.throwException("The instance tracker is not set."):this._instanceTracker},n.prototype._onStandardDashboardRefreshed=function(){null!==this._standardDashboardRefreshedHandler&&this._standardDashboardRefreshedHandler()},n.prototype._onUserInteractionEventEnded=function(){null!==this._userInteractionEventEndedHandler&&this._userInteractionEventEndedHandler()},n.prototype._onUserInteractionEventStarted=function(){null!==this._userInteractionEventStartedHandler&&this._userInteractionEventStartedHandler()},n.prototype._replaceWithPresentationDashboardSuccess=function(t){var e=this;this._replaceCanceler=null;this._transitionCoordinator=new Autotask.TransitionCoordinator(100,(function(){e._transitionStarting()}),100,(function(){e._transitionContainer.classList.add(e._fadeCssClass),e._standardDashboard=null,e._presentationDashboard=autotask.find(t.dashboardId)}),(function(){e._transitionReset()})),this._transitionCoordinator.configureEndingEvent((function(){e._transitionEnding()}),500);var n=this._getInstanceTracker();this._transitionCoordinator.executeTransition([n.__createLoadContentDelegate(t.html,t.javaScript)])},n.prototype._replaceWithStandardDashboardSuccess=function(t,e){var n=this;this._replaceCanceler=null;this._transitionCoordinator=new Autotask.TransitionCoordinator(100,(function(){n._transitionStarting()}),100,(function(){n._transitionContainer.classList.add(n._fadeCssClass),n._presentationDashboard=null,n._standardDashboard=autotask.find(t.dashboardId),n._standardDashboard.__registerUserInteractionEventHandlers((function(){n._onUserInteractionEventStarted()}),(function(){n._onUserInteractionEventEnded()})),n._standardDashboard.__registerRefreshedHandler((function(){n._onStandardDashboardRefreshed()})),e()}),(function(){n._transitionReset()})),this._transitionCoordinator.configureEndingEvent((function(){n._transitionEnding()}),500);var i=this._getInstanceTracker();this._transitionCoordinator.executeTransition([i.__createLoadContentDelegate(t.html,t.javaScript)])},n.prototype._transitionEnding=function(){this._transitionContainer.classList.remove(this._activeCssClass),this._transitionContainer.classList.remove(this._fadeCssClass)},n.prototype._transitionReset=function(){this._loadingIndicator.classList.remove(this._activeCssClass),this._transitionContainer.classList.remove(this._activeCssClass),this._transitionContainer.classList.remove(this._fadeCssClass)},n.prototype._transitionStarting=function(){this._loadingIndicator.classList.remove(this._activeCssClass)},n}(Autotask.LifecycleObject);t.PrimaryDashboardShell=e}(AutotaskDashboardSystem||(AutotaskDashboardSystem={})),function(t){var e=function(e){function n(t,n,i){var o=e.call(this,t)||this;o._dashboardId=n,o._trackerKey=i;var a=AutotaskDomSystem.Document.getElementById(t);return o._transitionContainer=AutotaskDomSystem.Document.getChildElementByClassName(a,"TransitionContainer"),o._loadingIndicator=AutotaskDomSystem.Document.getChildElementByClassName(a,"LoadingIndicator"),o._activeCssClass="Active",o._fadeCssClass="Fade",o._dashboard=null,o._instanceTracker=null,o._replaceCanceler=null,o._transitionCoordinator=null,o._userInteractionEventEndedHandler=null,o._userInteractionEventStartedHandler=null,o}return __extends(n,e),n.prototype.__initialize=function(){var t=this;this._instanceTracker=autotask.instanceTrackerManagement.__findInstanceTracker(this._trackerKey),this._dashboard=autotask.find(this._dashboardId),this._dashboard.__registerUserInteractionEventHandlers((function(){t._dashboardUserInteractionEventStartedHandler()}),(function(){t._dashboardUserInteractionEventEndedHandler()}))},n.prototype.__refresh=function(){this._getDashboard().refresh()},n.prototype.__refreshWidgets=function(){this._getDashboard().refreshWidgets()},n.prototype.__registerUserInteractionEventHandlers=function(t,e){this._userInteractionEventStartedHandler=t,this._userInteractionEventEndedHandler=e},n.prototype.__replace=function(e,n,i){var o=this;this._cancel(),this._transitionContainer.classList.add(this._activeCssClass),this._loadingIndicator.classList.add(this._activeCssClass);var a=this._getDashboard(),r=new t.DashboardShellReplacingEventArgs(a.tabId);n(r);this._replaceCanceler=e.__replaceDashboard(r.data,(function(t){o._replaceSuccess(t,i)}))},n.prototype._cancel=function(){null!==this._replaceCanceler&&(this._replaceCanceler.__cancelRequest(),this._replaceCanceler=null),null!==this._transitionCoordinator&&this._transitionCoordinator.cancel(),this._getDashboard().__cancel()},n.prototype._dashboardUserInteractionEventEndedHandler=function(){null!==this._userInteractionEventEndedHandler&&this._userInteractionEventEndedHandler()},n.prototype._dashboardUserInteractionEventStartedHandler=function(){null!==this._userInteractionEventStartedHandler&&this._userInteractionEventStartedHandler()},n.prototype._getDashboard=function(){return null===this._dashboard?autotask.throwException("The dashboard is not set."):this._dashboard},n.prototype._getInstanceTracker=function(){return null===this._instanceTracker?autotask.throwException("The instance tracker is not set."):this._instanceTracker},n.prototype._replaceSuccess=function(t,e){var n=this;this._replaceCanceler=null;this._transitionCoordinator=new Autotask.TransitionCoordinator(100,(function(){n._transitionStarting()}),100,(function(){n._transitionContainer.classList.add(n._fadeCssClass),n._dashboard=autotask.find(t.dashboardId),n._dashboard.__registerUserInteractionEventHandlers((function(){n._dashboardUserInteractionEventStartedHandler()}),(function(){n._dashboardUserInteractionEventEndedHandler()})),n._loadingIndicator.classList.remove(n._activeCssClass),e()}),(function(){n._transitionReset()})),this._transitionCoordinator.configureEndingEvent((function(){n._transitionEnding()}),500);var i=this._getInstanceTracker();this._transitionCoordinator.executeTransition([i.__createLoadContentDelegate(t.html,t.javaScript)])},n.prototype._transitionEnding=function(){this._transitionContainer.classList.remove(this._activeCssClass),this._transitionContainer.classList.remove(this._fadeCssClass)},n.prototype._transitionReset=function(){this._loadingIndicator.classList.remove(this._activeCssClass),this._transitionContainer.classList.remove(this._activeCssClass),this._transitionContainer.classList.remove(this._fadeCssClass)},n.prototype._transitionStarting=function(){this._loadingIndicator.classList.remove(this._activeCssClass)},n}(Autotask.LifecycleObject);t.StandardDashboardShell=e}(AutotaskDashboardSystem||(AutotaskDashboardSystem={})),function(t){var e=function(t){function e(e,n,i){var o=t.call(this,e)||this;return o._tabId=n,o._shellIds=i,o._widgetShells=[],o._isWidgetShellCollectionInitialized=!1,o._userInteractionEventEndedHandler=null,o._userInteractionEventStartedHandler=null,o}return __extends(e,t),Object.defineProperty(e.prototype,"tabId",{get:function(){return this._tabId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"widgetShells",{get:function(){return this._isWidgetShellCollectionInitialized||autotask.throwException("Tab.widgetShells have not been initialized."),this._widgetShells},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_widgetShellIds",{get:function(){return this._shellIds},enumerable:!1,configurable:!0}),e.prototype.refreshWidgets=function(){for(var t=0,e=this._widgetShells;t<e.length;t++){e[t].subtleRefresh()}},e.prototype.__cancel=function(){for(var t=0,e=this._widgetShells;t<e.length;t++){e[t].cancel()}},e.prototype.__dispose=function(){this.__cancel()},e.prototype.__initialize=function(){for(var t,e=this,n=0,i=this._shellIds;n<i.length;n++){var o=i[n];(t=autotask.find(o)).registerUserInteractionEventHandlers((function(){e._userInteractionEventStarted()}),(function(){e._userInteractionEventEnded()})),this._widgetShells.push(t)}this._isWidgetShellCollectionInitialized=!0},e.prototype.__preventWidgetShellsFromRefreshing=function(){for(var t=0,e=this._widgetShells;t<e.length;t++){e[t].__preventRefreshing()}},e.prototype.__registerUserInteractionEventHandlers=function(t,e){this._userInteractionEventStartedHandler=t,this._userInteractionEventEndedHandler=e},e.prototype._moveWidgetShellIdBeforeNextWidgetShellId=function(t,e){var n=this._shellIds.indexOf(t,0),i=this._shellIds.length;null!==e&&(i=this._widgetShellIds.indexOf(e,0)),this._shellIds.splice(i,0,this._shellIds.splice(n,1)[0])},e.prototype._onUserInteractionEventEnded=function(){null!==this._userInteractionEventEndedHandler&&this._userInteractionEventEndedHandler()},e.prototype._onUserInteractionEventStarted=function(){null!==this._userInteractionEventStartedHandler&&this._userInteractionEventStartedHandler()},e.prototype._userInteractionEventEnded=function(){this._onUserInteractionEventEnded()},e.prototype._userInteractionEventStarted=function(){this._onUserInteractionEventStarted()},e}(Autotask.LifecycleObject);t.Tab=e}(AutotaskDashboardSystem||(AutotaskDashboardSystem={})),function(t){var e=function(e){function n(t,n,i,o,a){var r=e.call(this,t,n,i)||this,s=AutotaskDomSystem.Document.getElementById(t);return r._widgetShellContainer=AutotaskDomSystem.Document.getFirstElementChild(s),r._scrollingContainer=AutotaskDomSystem.Document.getParentElement(r._widgetShellContainer),r._moveWidgetRoute=o,r._createWidgetButtonElement=null!==a?AutotaskDomSystem.Document.getElementById(a):null,r._draggingCssClass="Dragging",r._dragEventsCoordinator=null,r._moveWidgetCanceler=null,r._widgetShellDroppingHandlers=[],r}return __extends(n,e),n.prototype.addWidgetShellDropping=function(t){this._widgetShellDroppingHandlers.push(t)},n.prototype.__cancel=function(){e.prototype.__cancel.call(this),null!==this._moveWidgetCanceler&&(this._moveWidgetCanceler.__cancelRequest(),this._moveWidgetCanceler=null)},n.prototype.__dispose=function(){e.prototype.__dispose.call(this),null!==this._dragEventsCoordinator&&this._dragEventsCoordinator.dispose()},n.prototype.__initialize=function(){var n=this;if(e.prototype.__initialize.call(this),null!==this._moveWidgetRoute){for(var i=[],o=0,a=this._widgetShellIds;o<a.length;o++){var r=a[o];i.push(autotask.find(r))}this._dragEventsCoordinator=new t.DashboardTabDragEventsCoordinator(this._scrollingContainer,i,(function(t,e,i){return n._widgetShellDragStarted(t,e,i)}),(function(t,e,i,o,a){n._widgetShellDragged(t,e,i,o,a)}),(function(t){n._widgetShellDragStopped(t)}),(function(t){n._widgetShellDragSuspended(t)}),(function(t){n._widgetShellDragResumed(t)}))}},n.prototype._determineDragEventNextWidgetShell=function(t,e){var n,i=null,o=t.nextElement;return null!==o&&o.id!==(null===(n=this._createWidgetButtonElement)||void 0===n?void 0:n.id)&&o!==e&&(i=autotask.find(o.id)),i},n.prototype._dragEventTornOffHandler=function(e){this._widgetShellContainer.classList.add(this._draggingCssClass);var n=new t.WidgetShellDropIndicator(this._widgetShellContainer,e.widgetShellElement.offsetWidth);n.addBefore(e.widgetShellElement),this._widgetShellContainer.insertBefore(e.widgetShellElement,null),e.widgetShell.applyDraggingPosition(n.leftPosition,n.topPosition);var i=new t.WidgetShellDragCalculator(n.leftPosition,n.topPosition,e.originalXCoordinate,e.originalYCoordinate,this._scrollingContainer.scrollTop,e.widgetShellElement.offsetWidth,e.widgetShellElement.offsetHeight,this._scrollingContainer.offsetWidth),o=this._determineDragEventNextWidgetShell(n,e.widgetShellElement);e.beginMovement(i,n,o)},n.prototype._dropWidgetShell=function(t,e){var n=this._determineDragEventNextWidgetShell(t.dropIndicator,t.widgetShellElement),i=null,o=null;null!==n&&(i=n.widgetId,o=n.id);var a=null;if(null!==t.originalNextWidgetShell&&(a=t.originalNextWidgetShell.widgetId),i!==a)this._widgetShellDropped(t.widgetShellElement,t.widgetShell.widgetId,i,o,e);else{var r=t.dropIndicator.nextElement;this._widgetShellContainer.insertBefore(t.widgetShellElement,r),e()}},n.prototype._endDragEvent=function(t){null!==t.movementTracker&&(t.widgetShell.clearDraggingPosition(),this._widgetShellContainer.classList.remove(this._draggingCssClass)),t.dispose(),this._onUserInteractionEventEnded()},n.prototype._moveDropIndicator=function(t,e,n){for(var i,o=0,a=this._widgetShellIds;o<a.length;o++){var r=a[o];if(r!==t.widgetShell.id){if((i=autotask.find(r)).arePageCoordinatesOverLeftHalf(e,n)){var s=AutotaskDomSystem.Document.getElementById(r);t.dropIndicator.moveBefore(s);break}if(i.arePageCoordinatesOverRightHalf(e,n)){var l=AutotaskDomSystem.Document.getElementById(r);t.dropIndicator.moveAfter(l);break}}}},n.prototype._moveWidgetShellSuccess=function(t,e,n,i){if(this._moveWidgetCanceler=null,t.isSuccessful){var o=null;null!==n?o=AutotaskDomSystem.Document.getElementById(n):null!==this._createWidgetButtonElement&&(o=this._createWidgetButtonElement),this._widgetShellContainer.insertBefore(e,o),this._moveWidgetShellIdBeforeNextWidgetShellId(e.id,n)}i()},n.prototype._onWidgetShellDropping=function(t){this._widgetShellDroppingHandlers.forEach((function(e){e(t)}))},n.prototype._widgetShellDragged=function(t,e,n,i,o){if(t.adjustPosition(e,n),null!==t.movementTracker){var a=t.movementTracker.calculator.calculateDragPosition(i,o,this._scrollingContainer.scrollTop);t.widgetShell.applyDraggingPosition(a.leftPosition,a.topPosition),t.isSuspended||this._moveDropIndicator(t.movementTracker,i,o)}},n.prototype._widgetShellDragResumed=function(t){t.resume()},n.prototype._widgetShellDragStarted=function(e,n,i){var o=this;return this._onUserInteractionEventStarted(),new t.WidgetShellDragEvent(e,this._createWidgetButtonElement,n,i,(function(t){o._dragEventTornOffHandler(t)}))},n.prototype._widgetShellDragStopped=function(t){var e=this;null!==t.movementTracker?this._dropWidgetShell(t.movementTracker,(function(){e._endDragEvent(t)})):this._endDragEvent(t)},n.prototype._widgetShellDragSuspended=function(t){t.suspend()},n.prototype._widgetShellDropped=function(e,n,i,o,a){var r=this;this.__cancel();var s=new t.WidgetShellDroppingEventArgs(n,i);this._onWidgetShellDropping(s);this._moveWidgetCanceler=this._moveWidgetRoute.__moveWidgetShell(s.data,(function(t){r._moveWidgetShellSuccess(t,e,o,a)}))},n}(t.Tab);t.ConstrainedOrderTab=e}(AutotaskDashboardSystem||(AutotaskDashboardSystem={})),function(t){var e=function(t){function e(e,n,i,o,a,r){var s=t.call(this,e,n,i,o,a)||this;return s._checksum=r,s}return __extends(e,t),Object.defineProperty(e.prototype,"checksum",{get:function(){return this._checksum},enumerable:!1,configurable:!0}),e}(t.ConstrainedOrderTab);t.PersonalTab=e}(AutotaskDashboardSystem||(AutotaskDashboardSystem={})),function(t){var e=function(t){function e(e,n,i){return t.call(this,e,n,i)||this}return __extends(e,t),e}(t.Tab);t.PresentationTab=e}(AutotaskDashboardSystem||(AutotaskDashboardSystem={})),function(t){var e=function(t){function e(e,n,i,o,a,r){var s=t.call(this,e,n,i,o,a)||this;return s._checksum=r,s}return __extends(e,t),Object.defineProperty(e.prototype,"checksum",{get:function(){return this._checksum},enumerable:!1,configurable:!0}),e}(t.ConstrainedOrderTab);t.PreviewTab=e}(AutotaskDashboardSystem||(AutotaskDashboardSystem={})),function(t){var e=function(t){function e(e,n,i,o){var a=t.call(this,e,n,i)||this;return a._checksum=o,a}return __extends(e,t),Object.defineProperty(e.prototype,"checksum",{get:function(){return this._checksum},enumerable:!1,configurable:!0}),e}(t.Tab);t.SharedTab=e}(AutotaskDashboardSystem||(AutotaskDashboardSystem={})),function(t){var e=function(e){function n(t,n,i,o,a,r){var s=e.call(this,t)||this;s._titleBarTrackerKey=n,s._widgetDataFilterTrackerKey=i,s._tabId=o,s._tabTrackerKey=a,s._advanceRoute=r;var l=AutotaskDomSystem.Document.getElementById(t);return s._transitionContainer=AutotaskDomSystem.Document.getChildElementByClassName(l,"TransitionContainer"),s._loadingIndicator=AutotaskDomSystem.Document.getChildElementByClassName(l,"LoadingIndicator"),s._activeCssClass="Active",s._fadeCssClass="Fade",s._advanceCanceler=null,s._advancingHandlers=[],s._intervalId=null,s._tab=null,s._tabInstanceTracker=null,s._titleBarInstanceTracker=null,s._transitionCoordinator=null,s._widgetDataFilterInstanceTracker=null,s}return __extends(n,e),Object.defineProperty(n.prototype,"tabId",{get:function(){return this._getTab().tabId},enumerable:!1,configurable:!0}),n.prototype.addAdvancing=function(t){this._advancingHandlers.push(t)},n.prototype.refreshWidgets=function(){this._getTab().refreshWidgets()},n.prototype.__cancel=function(){null!==this._advanceCanceler&&(this._advanceCanceler.__cancelRequest(),this._advanceCanceler=null),null!==this._transitionCoordinator&&this._transitionCoordinator.cancel(),this._getTab().__cancel()},n.prototype.__dispose=function(){this.__cancel(),null!==this._intervalId&&window.clearInterval(this._intervalId),this._getTitleBarTracker().__dispose(),this._getWidgetDataFilterTracker().__dispose(),this._getTabTracker().__dispose()},n.prototype.__initialize=function(){var t=this;this._titleBarInstanceTracker=autotask.instanceTrackerManagement.__findInstanceTracker(this._titleBarTrackerKey),this._widgetDataFilterInstanceTracker=autotask.instanceTrackerManagement.__findInstanceTracker(this._widgetDataFilterTrackerKey),this._tabInstanceTracker=autotask.instanceTrackerManagement.__findInstanceTracker(this._tabTrackerKey),this._tab=autotask.find(this._tabId),this._intervalId=window.setInterval((function(){t._advance()}),6e4)},n.prototype._advance=function(){var e=this;this.__cancel(),this._transitionContainer.classList.add(this._activeCssClass),this._loadingIndicator.classList.add(this._activeCssClass);var n=this._getTab(),i=new t.PresentationDashboardAdvancingEventArgs(n.tabId);this._onAdvancing(i);this._advanceCanceler=this._advanceRoute.__advanceDashboard(i.data,(function(t){e._advanceSuccess(t)}))},n.prototype._advanceSuccess=function(t){var e=this;this._advanceCanceler=null;this._transitionCoordinator=new Autotask.TransitionCoordinator(100,(function(){e._transitionStarting()}),100,(function(){e._transitionContainer.classList.add(e._fadeCssClass),t.isAdvancingTab&&(e._tab=autotask.find(t.tabId))}),(function(){e._transitionReset()}));this._transitionCoordinator.configureEndingEvent((function(){e._transitionContainer.classList.remove(e._activeCssClass),e._transitionContainer.classList.remove(e._fadeCssClass),t.isAdvancingTab||e.refreshWidgets()}),500);var n=[],i=this._getTitleBarTracker();n.push(i.__createLoadContentDelegate(t.titleBarHtml,t.titleBarJavaScript));var o=this._getWidgetDataFilterTracker();if(n.push((function(){o.__clearInstancesAndLoadScript(t.widgetDataFilterJavaScript)})),t.isAdvancingTab){var a=this._getTabTracker();n.push(a.__createLoadContentDelegate(t.tabHtml,t.tabJavaScript))}this._transitionCoordinator.executeTransition(n)},n.prototype._getTab=function(){return null===this._tab?autotask.throwException("The dashboard tab is not set."):this._tab},n.prototype._getTabTracker=function(){return null===this._tabInstanceTracker?autotask.throwException("The tab instance tracker is not set."):this._tabInstanceTracker},n.prototype._getTitleBarTracker=function(){return null===this._titleBarInstanceTracker?autotask.throwException("The title bar instance tracker is not set."):this._titleBarInstanceTracker},n.prototype._getWidgetDataFilterTracker=function(){return null===this._widgetDataFilterInstanceTracker?autotask.throwException("The widget data filter instance tracker is not set."):this._widgetDataFilterInstanceTracker},n.prototype._onAdvancing=function(t){this._advancingHandlers.forEach((function(e){e(t)}))},n.prototype._transitionReset=function(){this._loadingIndicator.classList.remove(this._activeCssClass),this._transitionContainer.classList.remove(this._activeCssClass),this._transitionContainer.classList.remove(this._fadeCssClass)},n.prototype._transitionStarting=function(){this._loadingIndicator.classList.remove(this._activeCssClass)},n}(Autotask.LifecycleObject);t.PresentationDashboard=e}(AutotaskDashboardSystem||(AutotaskDashboardSystem={})),function(t){var e=function(e){function n(t,n,i,o){var a=e.call(this,t)||this;a._tabId=n,a._tabTrackerKey=i,a._refreshRoute=o;var r=AutotaskDomSystem.Document.getElementById(t);return a._transitionContainer=AutotaskDomSystem.Document.getChildElementByClassName(r,"TransitionContainer"),a._loadingIndicator=AutotaskDomSystem.Document.getChildElementByClassName(r,"LoadingIndicator"),a._activeCssClass="Active",a._fadeCssClass="Fade",a._refreshCanceler=null,a._refreshingHandlers=[],a._tab=null,a._tabInstanceTracker=null,a._transitionCoordinator=null,a}return __extends(n,e),Object.defineProperty(n.prototype,"tabId",{get:function(){return this._getTab().tabId},enumerable:!1,configurable:!0}),n.prototype.addRefreshing=function(t){this._refreshingHandlers.push(t)},n.prototype.refresh=function(){var e=this;this.__cancel();var n=this._getTab(),i=new t.PreviewDashboardRefreshingEventArgs(n.checksum);this._onRefreshing(i);this._refreshCanceler=this._refreshRoute.__refreshDashboard(i.data,(function(t){e._dashboardRefreshSuccess(t)}))},n.prototype.refreshAllContent=function(){var e=this;this.__cancel();var n=new t.PreviewDashboardRefreshingEventArgs(null);this._onRefreshing(n);this._refreshCanceler=this._refreshRoute.__refreshDashboard(n.data,(function(t){e._dashboardRefreshSuccess(t)}))},n.prototype.refreshWidgets=function(){this._getTab().refreshWidgets()},n.prototype.__cancel=function(){null!==this._refreshCanceler&&(this._refreshCanceler.__cancelRequest(),this._refreshCanceler=null),null!==this._transitionCoordinator&&this._transitionCoordinator.cancel(),this._getTab().__cancel()},n.prototype.__dispose=function(){this.__cancel(),this._getTabInstanceTracker().__dispose()},n.prototype.__initialize=function(){this._tabInstanceTracker=autotask.instanceTrackerManagement.__findInstanceTracker(this._tabTrackerKey),this._tab=autotask.find(this._tabId)},n.prototype._dashboardRefreshSuccess=function(t){var e=this;this._refreshCanceler=null;this._transitionCoordinator=new Autotask.TransitionCoordinator(100,(function(){e._transitionStarting()}),100,(function(){(e._transitionContainer.classList.add(e._fadeCssClass),t.isRefreshingTab)?e._tab=autotask.find(t.tabId):e._getTab().refreshWidgets()}),(function(){e._transitionReset()})),t.isRefreshingTab&&(this._transitionCoordinator.preparingHandler=function(){e._preparingHandler()}),this._transitionCoordinator.configureEndingEvent((function(){e._transitionEnding()}),500);var n=[],i=this._getTabInstanceTracker();t.isRefreshingTab?n.push(i.__createLoadContentDelegate(t.tabHtml,t.tabJavaScript)):n.push((function(){})),this._transitionCoordinator.executeTransition(n)},n.prototype._getTab=function(){return null===this._tab?autotask.throwException("The dashboard tab is not set."):this._tab},n.prototype._getTabInstanceTracker=function(){return null===this._tabInstanceTracker?autotask.throwException("The tab instance tracker is not set."):this._tabInstanceTracker},n.prototype._onRefreshing=function(t){this._refreshingHandlers.forEach((function(e){e(t)}))},n.prototype._transitionEnding=function(){this._transitionContainer.classList.remove(this._activeCssClass),this._transitionContainer.classList.remove(this._fadeCssClass)},n.prototype._preparingHandler=function(){this._transitionContainer.classList.add(this._activeCssClass),this._loadingIndicator.classList.add(this._activeCssClass)},n.prototype._transitionReset=function(){this._loadingIndicator.classList.remove(this._activeCssClass),this._transitionContainer.classList.remove(this._activeCssClass),this._transitionContainer.classList.remove(this._fadeCssClass)},n.prototype._transitionStarting=function(){this._loadingIndicator.classList.remove(this._activeCssClass)},n}(Autotask.LifecycleObject);t.PreviewDashboard=e}(AutotaskDashboardSystem||(AutotaskDashboardSystem={})),function(t){var e=function(e){function n(t,n,i,o,a,r,s){var l=e.call(this,t)||this;l._titleBarId=n,l._titleBarTrackerKey=i,l._tabId=o,l._tabTrackerKey=a,l._refreshRoute=r,l._selectTabRoute=s;var u=AutotaskDomSystem.Document.getElementById(t);return l._transitionContainer=AutotaskDomSystem.Document.getChildElementByClassName(u,"TransitionContainer"),l._loadingIndicator=AutotaskDomSystem.Document.getChildElementByClassName(u,"LoadingIndicator"),l._activeCssClass="Active",l._fadeCssClass="Fade",l._refreshCanceler=null,l._refreshingHandlers=[],l._tab=null,l._tabInstanceTracker=null,l._titleBar=null,l._titleBarInstanceTracker=null,l._transitionCoordinator=null,l._refreshedHandler=null,l._userInteractionEventEndedHandler=null,l._userInteractionEventStartedHandler=null,l}return __extends(n,e),Object.defineProperty(n.prototype,"tabId",{get:function(){return this._getTab().tabId},enumerable:!1,configurable:!0}),n.prototype.addRefreshing=function(t){this._refreshingHandlers.push(t)},n.prototype.refresh=function(){var e=this;this.__cancel();var n=this._getTab(),i=this._getTitleBar(),o=new t.SimplifiedDashboardRefreshingEventArgs(n.tabId,null,n.checksum,i.checksum);this._onRefreshing(o);this._refreshCanceler=this._refreshRoute.__refreshDashboard(o.requestData,(function(t){e._dashboardRefreshSuccess(t)}))},n.prototype.refreshAllContent=function(){var e=this;this.__cancel();var n=this._getTab(),i=new t.SimplifiedDashboardRefreshingEventArgs(n.tabId,null,null,null);this._onRefreshing(i);this._refreshCanceler=this._refreshRoute.__refreshDashboard(i.requestData,(function(t){e._dashboardRefreshSuccess(t)}))},n.prototype.refreshWidgets=function(){this._getTab().refreshWidgets()},n.prototype.selectTab=function(t){this._changeSelectedTab(t)},n.prototype.__cancel=function(){null!==this._refreshCanceler&&(this._refreshCanceler.__cancelRequest(),this._refreshCanceler=null),null!==this._transitionCoordinator&&(this._transitionCoordinator.cancel(),this._transitionCoordinator=null),this._getTab().__cancel()},n.prototype.__dispose=function(){this.__cancel(),this._getTitleBarInstanceTracker().__dispose(),this._getTabInstanceTracker().__dispose()},n.prototype.__initialize=function(){var t=this;this._titleBarInstanceTracker=autotask.instanceTrackerManagement.__findInstanceTracker(this._titleBarTrackerKey),this._tabInstanceTracker=autotask.instanceTrackerManagement.__findInstanceTracker(this._tabTrackerKey),this._titleBar=autotask.find(this._titleBarId),this._registerTitleBarHandlers(),this._tab=autotask.find(this._tabId),this._tab.__registerUserInteractionEventHandlers((function(){t._onUserInteractionEventStarted()}),(function(){t._onUserInteractionEventEnded()}))},n.prototype.__preventWidgetShellsFromRefreshing=function(){this._getTab().__preventWidgetShellsFromRefreshing()},n.prototype.__registerRefreshedHandler=function(t){this._refreshedHandler=t},n.prototype.__registerUserInteractionEventHandlers=function(t,e){this._userInteractionEventStartedHandler=t,this._userInteractionEventEndedHandler=e},n.prototype._changeSelectedTab=function(e){var n=this;this.__cancel(),this._transitionContainer.classList.add(this._activeCssClass),this._loadingIndicator.classList.add(this._activeCssClass);var i=this._getTab(),o=new t.SimplifiedDashboardRefreshingEventArgs(i.tabId,e,i.checksum,null);this._onRefreshing(o);this._refreshCanceler=this._selectTabRoute.__refreshDashboard(o.requestData,(function(t){n._dashboardRefreshSuccess(t)}))},n.prototype._dashboardRefreshSuccess=function(t){var e=this;this._refreshCanceler=null;this._transitionCoordinator=new Autotask.TransitionCoordinator(100,(function(){e._transitionStarting()}),100,(function(){(e._transitionContainer.classList.add(e._fadeCssClass),t.isRefreshingTitleBar&&(e._titleBar=autotask.find(t.titleBarId),e._registerTitleBarHandlers()),t.isRefreshingTab)?(e._tab=autotask.find(t.tabId),e._tab.__registerUserInteractionEventHandlers((function(){e._onUserInteractionEventStarted()}),(function(){e._onUserInteractionEventEnded()}))):e._getTab().refreshWidgets()}),(function(){e._transitionReset()})),t.isRefreshingTab&&(this._transitionCoordinator.preparingHandler=function(){e._transitionPreparing()}),this._transitionCoordinator.configureEndingEvent((function(){e._transitionEnding()}),500);var n=[];if(t.isRefreshingTitleBar){var i=this._getTitleBarInstanceTracker();n.push(i.__createLoadContentDelegate(t.titleBarHtml,t.titleBarJavaScript))}if(t.isRefreshingTab){var o=this._getTabInstanceTracker();n.push(o.__createLoadContentDelegate(t.tabHtml,t.tabJavaScript))}t.isRefreshingTitleBar||t.isRefreshingTab||n.push((function(){})),this._transitionCoordinator.executeTransition(n),this._onRefreshed()},n.prototype._getTab=function(){return null===this._tab?autotask.throwException("The dashboard tab is not set."):this._tab},n.prototype._getTabInstanceTracker=function(){return null===this._tabInstanceTracker?autotask.throwException("The tab instance tracker is not set."):this._tabInstanceTracker},n.prototype._getTitleBar=function(){return null===this._titleBar?autotask.throwException("The title bar is not set."):this._titleBar},n.prototype._getTitleBarInstanceTracker=function(){return null===this._titleBarInstanceTracker?autotask.throwException("The title bar instance tracker is not set."):this._titleBarInstanceTracker},n.prototype._onRefreshed=function(){null!==this._refreshedHandler&&this._refreshedHandler()},n.prototype._onRefreshing=function(t){this._refreshingHandlers.forEach((function(e){e(t)}))},n.prototype._onUserInteractionEventEnded=function(){null!==this._userInteractionEventEndedHandler&&this._userInteractionEventEndedHandler()},n.prototype._onUserInteractionEventStarted=function(){null!==this._userInteractionEventStartedHandler&&this._userInteractionEventStartedHandler()},n.prototype._registerTitleBarHandlers=function(){var t=this;this._getTitleBar().__setSelectedTabChangedHandler((function(e){t._selectedTabChanged(e)}))},n.prototype._selectedTabChanged=function(t){this._changeSelectedTab(t.tabId)},n.prototype._transitionEnding=function(){this._transitionContainer.classList.remove(this._activeCssClass),this._transitionContainer.classList.remove(this._fadeCssClass)},n.prototype._transitionPreparing=function(){this._transitionContainer.classList.add(this._activeCssClass),this._loadingIndicator.classList.add(this._activeCssClass)},n.prototype._transitionReset=function(){this._loadingIndicator.classList.remove(this._activeCssClass),this._transitionContainer.classList.remove(this._activeCssClass),this._transitionContainer.classList.remove(this._fadeCssClass)},n.prototype._transitionStarting=function(){this._loadingIndicator.classList.remove(this._activeCssClass)},n}(Autotask.LifecycleObject);t.SimplifiedDashboard=e}(AutotaskDashboardSystem||(AutotaskDashboardSystem={})),function(t){var e=function(e){function n(t,n,i,o,a,r,s,l,u,c,d){var h=e.call(this,t)||this;h._titleBarId=n,h._titleBarTrackerKey=i,h._contextMenuId=o,h._contextMenuTrackerKey=a,h._tabId=s,h._tabTrackerKey=l,h._refreshRoute=u,h._closeTabRoute=c,h._selectTabRoute=d;var _=AutotaskDomSystem.Document.getElementById(t);return h._transitionContainer=AutotaskDomSystem.Document.getChildElementByClassName(_,"TransitionContainer"),h._loadingIndicator=AutotaskDomSystem.Document.getChildElementByClassName(_,"LoadingIndicator"),h._contextMenuButton=AutotaskDomSystem.Document.getElementById(r),h._contextMenuInteractionEventsCoordinator=new AutotaskOverlaySystem.InteractionEventsCoordinator(h._contextMenuButton,(function(){h._showContextMenu()}),(function(){h._hideContextMenu()})),h._activeCssClass="Active",h._fadeCssClass="Fade",h._contextMenu=null,h._contextMenuInstanceTracker=null,h._refreshCanceler=null,h._refreshingHandlers=[],h._tab=null,h._tabInstanceTracker=null,h._tabsChangedHandlers=[],h._titleBar=null,h._titleBarInstanceTracker=null,h._transitionCoordinator=null,h._refreshedHandler=null,h._userInteractionEventEndedHandler=null,h._userInteractionEventStartedHandler=null,h}return __extends(n,e),Object.defineProperty(n.prototype,"tabId",{get:function(){return this._getTab().tabId},enumerable:!1,configurable:!0}),n.prototype.addRefreshing=function(t){this._refreshingHandlers.push(t)},n.prototype.addTabsChanged=function(t){this._tabsChangedHandlers.push(t)},n.prototype.closeTab=function(){var e=this;if(null===this._closeTabRoute)autotask.throwException("The dashboard is not configured to close dashboard tabs.");else{this.__cancel(),this._transitionContainer.classList.add(this._activeCssClass),this._loadingIndicator.classList.add(this._activeCssClass);var n=this._getTab(),i=new t.StandardDashboardRefreshingEventArgs(n.tabId,null,n.checksum,null);this._onRefreshing(i);this._refreshCanceler=this._closeTabRoute.__refreshDashboard(i.data,(function(t){e._dashboardRefreshSuccess(t)}))}},n.prototype.refresh=function(){var e=this;this.__cancel();var n=this._getTab(),i=this._getTitleBar(),o=new t.StandardDashboardRefreshingEventArgs(n.tabId,null,n.checksum,i.checksum);this._onRefreshing(o);this._refreshCanceler=this._refreshRoute.__refreshDashboard(o.data,(function(t){e._dashboardRefreshSuccess(t)}))},n.prototype.refreshAllContent=function(){var e=this;this.__cancel();var n=this._getTab(),i=new t.StandardDashboardRefreshingEventArgs(n.tabId,null,null,null);this._onRefreshing(i);this._refreshCanceler=this._refreshRoute.__refreshDashboard(i.data,(function(t){e._dashboardRefreshSuccess(t)}))},n.prototype.refreshWidgets=function(){this._getTab().refreshWidgets()},n.prototype.selectTab=function(t){this._changeSelectedTab(t)},n.prototype.__cancel=function(){null!==this._refreshCanceler&&(this._refreshCanceler.__cancelRequest(),this._refreshCanceler=null),null!==this._transitionCoordinator&&(this._transitionCoordinator.cancel(),this._transitionCoordinator=null),this._getTitleBar().__cancel(),this._getTab().__cancel()},n.prototype.__dispose=function(){this.__cancel(),this._contextMenuInteractionEventsCoordinator.__dispose(),this._getTitleBarInstanceTracker().__dispose(),this._getContextMenuInstanceTracker().__dispose(),this._getTabInstanceTracker().__dispose()},n.prototype.__initialize=function(){var t=this;this._titleBarInstanceTracker=autotask.instanceTrackerManagement.__findInstanceTracker(this._titleBarTrackerKey),this._contextMenuInstanceTracker=autotask.instanceTrackerManagement.__findInstanceTracker(this._contextMenuTrackerKey),this._tabInstanceTracker=autotask.instanceTrackerManagement.__findInstanceTracker(this._tabTrackerKey),this._titleBar=autotask.find(this._titleBarId),this._registerTitleBarHandlers(),this._contextMenu=autotask.find(this._contextMenuId),this._tab=autotask.find(this._tabId),this._tab.__registerUserInteractionEventHandlers((function(){t._onUserInteractionEventStarted()}),(function(){t._onUserInteractionEventEnded()}))},n.prototype.__preventWidgetShellsFromRefreshing=function(){this._getTab().__preventWidgetShellsFromRefreshing()},n.prototype.__registerRefreshedHandler=function(t){this._refreshedHandler=t},n.prototype.__registerUserInteractionEventHandlers=function(t,e){this._userInteractionEventStartedHandler=t,this._userInteractionEventEndedHandler=e},n.prototype._changeSelectedTab=function(e){var n=this;this.__cancel(),this._transitionContainer.classList.add(this._activeCssClass),this._loadingIndicator.classList.add(this._activeCssClass);var i=this._getTab(),o=new t.StandardDashboardRefreshingEventArgs(i.tabId,e,i.checksum,null);this._onRefreshing(o);this._refreshCanceler=this._selectTabRoute.__refreshDashboard(o.data,(function(t){n._dashboardRefreshSuccess(t)}))},n.prototype._dashboardRefreshSuccess=function(t){var e=this;this._refreshCanceler=null;this._transitionCoordinator=new Autotask.TransitionCoordinator(100,(function(){e._transitionStarting()}),100,(function(){(e._transitionContainer.classList.add(e._fadeCssClass),t.isRefreshingTitleBar&&(e._titleBar=autotask.find(t.titleBarId),e._registerTitleBarHandlers()),t.isRefreshingTab)?(e._tab=autotask.find(t.tabId),e._tab.__registerUserInteractionEventHandlers((function(){e._onUserInteractionEventStarted()}),(function(){e._onUserInteractionEventEnded()}))):e._getTab().refreshWidgets();e._onTabsChanged()}),(function(){e._transitionReset()})),t.isRefreshingTab&&(this._transitionCoordinator.preparingHandler=function(){e._transitionPreparing()}),this._transitionCoordinator.configureEndingEvent((function(){e._transitionEnding()}),500);var n=[];if(t.isRefreshingTitleBar){var i=this._getTitleBarInstanceTracker();n.push(i.__createLoadContentDelegate(t.titleBarHtml,t.titleBarJavaScript))}if(t.isRefreshingTab){var o=this._getContextMenuInstanceTracker();n.push(o.__createLoadContentDelegate(t.contextMenuHtml,t.contextMenuJavaScript));var a=this._getTabInstanceTracker();n.push(a.__createLoadContentDelegate(t.tabHtml,t.tabJavaScript))}t.isRefreshingTitleBar||t.isRefreshingTab||n.push((function(){})),this._transitionCoordinator.executeTransition(n),this._onRefreshed()},n.prototype._getContextMenu=function(){return null===this._contextMenu?autotask.throwException("The context menu is not set."):this._contextMenu},n.prototype._getContextMenuInstanceTracker=function(){return null===this._contextMenuInstanceTracker?autotask.throwException("The context menu instance tracker is not set."):this._contextMenuInstanceTracker},n.prototype._getTab=function(){return null===this._tab?autotask.throwException("The dashboard tab is not set."):this._tab},n.prototype._getTabInstanceTracker=function(){return null===this._tabInstanceTracker?autotask.throwException("The tab instance tracker is not set."):this._tabInstanceTracker},n.prototype._getTitleBar=function(){return null===this._titleBar?autotask.throwException("The title bar is not set."):this._titleBar},n.prototype._getTitleBarInstanceTracker=function(){return null===this._titleBarInstanceTracker?autotask.throwException("The title bar instance tracker is not set."):this._titleBarInstanceTracker},n.prototype._hideContextMenu=function(){this._getContextMenu().hide(),this._onUserInteractionEventEnded()},n.prototype._onRefreshed=function(){null!==this._refreshedHandler&&this._refreshedHandler()},n.prototype._onRefreshing=function(t){this._refreshingHandlers.forEach((function(e){e(t)}))},n.prototype._onTabsChanged=function(){this._tabsChangedHandlers.forEach((function(t){t()}))},n.prototype._onUserInteractionEventEnded=function(){null!==this._userInteractionEventEndedHandler&&this._userInteractionEventEndedHandler()},n.prototype._onUserInteractionEventStarted=function(){null!==this._userInteractionEventStartedHandler&&this._userInteractionEventStartedHandler()},n.prototype._registerTitleBarHandlers=function(){var t=this,e=this._getTitleBar();e.__setSelectedTabChangedHandler((function(e){t._selectedTabChanged(e)})),e.__registerUserInteractionEventHandlers((function(){t._onUserInteractionEventStarted()}),(function(){t._onUserInteractionEventEnded()}))},n.prototype._selectedTabChanged=function(t){this._changeSelectedTab(t.tabId)},n.prototype._showContextMenu=function(){this._onUserInteractionEventStarted(),this._getContextMenu().show(this._contextMenuButton)},n.prototype._transitionEnding=function(){this._transitionContainer.classList.remove(this._activeCssClass),this._transitionContainer.classList.remove(this._fadeCssClass)},n.prototype._transitionPreparing=function(){this._transitionContainer.classList.add(this._activeCssClass),this._loadingIndicator.classList.add(this._activeCssClass)},n.prototype._transitionReset=function(){this._loadingIndicator.classList.remove(this._activeCssClass),this._transitionContainer.classList.remove(this._activeCssClass),this._transitionContainer.classList.remove(this._fadeCssClass)},n.prototype._transitionStarting=function(){this._loadingIndicator.classList.remove(this._activeCssClass)},n}(Autotask.LifecycleObject);t.StandardDashboard=e}(AutotaskDashboardSystem||(AutotaskDashboardSystem={})),function(t){var e=function(){function t(t){this._tabId=t,this._data={}}return Object.defineProperty(t.prototype,"data",{get:function(){return this._data},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tabConfigurationId",{get:function(){return this._tabId},enumerable:!1,configurable:!0}),t.prototype.add=function(t,e){this._data[t]=e},t}();t.DashboardShellReplacingEventArgs=e}(AutotaskDashboardSystem||(AutotaskDashboardSystem={})),function(t){var e=function(){function t(t){this._tabId=t,this._data={}}return Object.defineProperty(t.prototype,"data",{get:function(){return this._data},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tabConfigurationId",{get:function(){return this._tabId},enumerable:!1,configurable:!0}),t.prototype.add=function(t,e){this._data[t]=e},t}();t.PresentationDashboardAdvancingEventArgs=e}(AutotaskDashboardSystem||(AutotaskDashboardSystem={})),function(t){var e=function(){function t(t){this._tabChecksum=t,this._data={}}return Object.defineProperty(t.prototype,"data",{get:function(){return this._data},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tabChecksum",{get:function(){return this._tabChecksum},enumerable:!1,configurable:!0}),t.prototype.add=function(t,e){this._data[t]=e},t}();t.PreviewDashboardRefreshingEventArgs=e}(AutotaskDashboardSystem||(AutotaskDashboardSystem={})),function(t){var e=function(){function t(t){this._tabId=t}return Object.defineProperty(t.prototype,"tabId",{get:function(){return this._tabId},enumerable:!1,configurable:!0}),t}();t.SelectedTabChangedEventArgs=e}(AutotaskDashboardSystem||(AutotaskDashboardSystem={})),function(t){var e=function(){function t(t,e,n,i){this._tabId=t,this._targetTabId=e,this._titleBarChecksum=i,this._tabChecksum=n,this._requestData=new AutotaskRequestDataSystem.RequestData}return Object.defineProperty(t.prototype,"requestData",{get:function(){return this._requestData},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tabChecksum",{get:function(){return this._tabChecksum},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tabConfigurationId",{get:function(){return this._tabId},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"targetTabConfigurationId",{get:function(){return this._targetTabId},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"titleBarChecksum",{get:function(){return this._titleBarChecksum},enumerable:!1,configurable:!0}),t.prototype.add=function(t,e){this._requestData.addDataDictionary(t,e)},t}();t.SimplifiedDashboardRefreshingEventArgs=e}(AutotaskDashboardSystem||(AutotaskDashboardSystem={})),function(t){var e=function(){function t(t,e,n,i){this._tabId=t,this._targetTabId=e,this._titleBarChecksum=i,this._tabChecksum=n,this._data={}}return Object.defineProperty(t.prototype,"data",{get:function(){return this._data},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tabChecksum",{get:function(){return this._tabChecksum},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tabConfigurationId",{get:function(){return this._tabId},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"targetTabConfigurationId",{get:function(){return this._targetTabId},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"titleBarChecksum",{get:function(){return this._titleBarChecksum},enumerable:!1,configurable:!0}),t.prototype.add=function(t,e){this._data[t]=e},t}();t.StandardDashboardRefreshingEventArgs=e}(AutotaskDashboardSystem||(AutotaskDashboardSystem={})),function(t){var e=function(){function t(t,e){this._tabId=t,this._nextTabId=e,this._data={}}return Object.defineProperty(t.prototype,"data",{get:function(){return this._data},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"nextTabConfigurationId",{get:function(){return this._nextTabId},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tabConfigurationId",{get:function(){return this._tabId},enumerable:!1,configurable:!0}),t.prototype.add=function(t,e){this._data[t]=e},t}();t.TabButtonDroppingEventArgs=e}(AutotaskDashboardSystem||(AutotaskDashboardSystem={})),function(t){var e=function(){function t(t){this._tabId=t}return Object.defineProperty(t.prototype,"tabId",{get:function(){return this._tabId},enumerable:!1,configurable:!0}),t}();t.TabButtonSelectedEventArgs=e}(AutotaskDashboardSystem||(AutotaskDashboardSystem={})),function(t){var e=function(){function t(t,e){this._widgetId=t,this._nextWidgetId=e,this._data={}}return Object.defineProperty(t.prototype,"data",{get:function(){return this._data},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"nextWidgetConfigurationId",{get:function(){return this._nextWidgetId},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"widgetConfigurationId",{get:function(){return this._widgetId},enumerable:!1,configurable:!0}),t.prototype.add=function(t,e){this._data[t]=e},t}();t.WidgetShellDroppingEventArgs=e}(AutotaskDashboardSystem||(AutotaskDashboardSystem={})),function(t){var e=function(){function t(t){this._widgetId=t,this._data=new AutotaskRequestDataSystem.RequestData}return Object.defineProperty(t.prototype,"requestData",{get:function(){return this._data},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"widgetConfigurationId",{get:function(){return this._widgetId},enumerable:!1,configurable:!0}),t.prototype.add=function(t,e){this._data.addDataDictionary(t,e)},t}();t.WidgetShellRefreshingEventArgs=e}(AutotaskDashboardSystem||(AutotaskDashboardSystem={})),function(t){var e=function(e){function n(t,n,i){var o=e.call(this,t)||this;return o._element=AutotaskDomSystem.Document.getElementById(t),o._tabId=n,o._isSelected=i,o._clickHandler=function(){o._click()},o._isSelected||o._element.addEventListener("click",o._clickHandler),o._draggingCssClass="Dragging",o._selectedCssClass="Selected",o._selectedHandler=null,o}return __extends(n,e),Object.defineProperty(n.prototype,"tabId",{get:function(){return this._tabId},enumerable:!1,configurable:!0}),n.prototype.applyDraggingPosition=function(t){this._element.style.left=t.toString()+"px",this._element.classList.add(this._draggingCssClass)},n.prototype.applyDraggingWidth=function(){var t=this._element.clientWidth,e=window.getComputedStyle(this._element,null);if(e.paddingLeft.endsWith("px")){var n=parseInt(e.paddingLeft,10);isNaN(n)||(t-=n)}if(e.paddingRight.endsWith("px")){var i=parseInt(e.paddingRight,10);isNaN(i)||(t-=i)}this._element.style.width=t.toString(10)+"px"},n.prototype.clearDraggingPosition=function(){this._element.style.left="",this._element.classList.remove(this._draggingCssClass)},n.prototype.clearDraggingWidth=function(){this._element.style.width=""},n.prototype.clearSelection=function(){this._element.classList.remove(this._selectedCssClass)},n.prototype.isDraggingTabButtonOverLeftHalf=function(t){var e=this._element.offsetLeft;return t>=e&&t<=e+this._element.offsetWidth/2},n.prototype.isDraggingTabButtonOverRightHalf=function(t){var e=this._element.offsetLeft,n=this._element.offsetWidth;return t>=e+n/2&&t<=e+n},n.prototype.__dispose=function(){this._isSelected||this._element.removeEventListener("click",this._clickHandler),this._selectedHandler=null},n.prototype.__setSelectedHandler=function(t){this._selectedHandler=t},n.prototype._click=function(){this._element.classList.add(this._selectedCssClass),this._onSelect()},n.prototype._onSelect=function(){if(null!==this._selectedHandler){var e=new t.TabButtonSelectedEventArgs(this._tabId);this._selectedHandler(e)}},n}(Autotask.LifecycleObject);t.TabButton=e}(AutotaskDashboardSystem||(AutotaskDashboardSystem={})),function(t){var e=function(){function e(t,e,n,i){this._leftPositionOffset=t-e,this._maximumLeftPosition=i-n/2}return e.prototype.calculateDragPosition=function(e){var n=this._leftPositionOffset+e;return n>this._maximumLeftPosition&&(n=this._maximumLeftPosition),new t.TabButtonDragResult(n)},e}();t.TabButtonDragCalculator=e}(AutotaskDashboardSystem||(AutotaskDashboardSystem={})),function(t){var e=function(){function t(t){this._tabButton=autotask.find(t.id),this._tabButtonElement=t,this._tabButtonId=t.id,this._calculator=null,this._dropIndicator=null,this._originalNextTabId=null}return Object.defineProperty(t.prototype,"calculator",{get:function(){return null===this._calculator?autotask.throwException("The calculator is not set."):this._calculator},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dropIndicator",{get:function(){return null===this._dropIndicator?autotask.throwException("The drop indicator is not set."):this._dropIndicator},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"originalNextTabId",{get:function(){return this._originalNextTabId},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tabButton",{get:function(){return this._tabButton},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tabButtonElement",{get:function(){return this._tabButtonElement},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tabButtonId",{get:function(){return this._tabButtonId},enumerable:!1,configurable:!0}),t.prototype.beginMovement=function(t,e,n){this._calculator=t,this._dropIndicator=e,this._originalNextTabId=n},t.prototype.dispose=function(){null!==this._dropIndicator&&this._dropIndicator.dispose()},t}();t.TabButtonDragEvent=e}(AutotaskDashboardSystem||(AutotaskDashboardSystem={})),function(t){var e=function(){function t(t){this._leftPosition=t}return Object.defineProperty(t.prototype,"leftPosition",{get:function(){return this._leftPosition},enumerable:!1,configurable:!0}),t}();t.TabButtonDragResult=e}(AutotaskDashboardSystem||(AutotaskDashboardSystem={})),function(t){var e=function(){function t(t){this._tearHandler=t,this._tearThreshold=20,this._isStarting=!1,this._isTearing=!1,this._isTornOff=!1,this._originalCoordinate=0}return Object.defineProperty(t.prototype,"isTornOff",{get:function(){return this._isTornOff},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"originalCoordinate",{get:function(){return this._originalCoordinate},enumerable:!1,configurable:!0}),t.prototype.adjustPosition=function(t){this._isStarting||this._isTearing||this._isTornOff||autotask.throwException("Invalid operation: The position cannot be adjusted in the current state."),this._isStarting?(this._originalCoordinate=t,this._tear()):this._isTearing&&Math.abs(t-this._originalCoordinate)>this._tearThreshold&&this._tearOff()},t.prototype.reset=function(){this._isStarting=!1,this._isTearing=!1,this._isTornOff=!1,this._originalCoordinate=0},t.prototype.start=function(){this._isTearing=!1,this._isTornOff=!1,this._isStarting=!0,this._originalCoordinate=0},t.prototype._tearOff=function(){this._isStarting=!1,this._isTearing=!1,this._isTornOff=!0,this._tearHandler()},t.prototype._tear=function(){this._isStarting=!1,this._isTornOff=!1,this._isTearing=!0},t}();t.TabButtonDragState=e}(AutotaskDashboardSystem||(AutotaskDashboardSystem={})),function(t){var e=function(){function t(t,e,n){this._container=t;var i=document.createElement("div");i.classList.add("TabButtonDropIndicator1"),i.style.flexBasis="auto",i.style.flexShrink=n,i.textContent=e,this._element=i}return Object.defineProperty(t.prototype,"leftPosition",{get:function(){return this._element.offsetLeft},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"nextElement",{get:function(){return this._element.nextElementSibling},enumerable:!1,configurable:!0}),t.prototype.addAfter=function(t){this._container.insertBefore(this._element,t.nextElementSibling)},t.prototype.addBefore=function(t){this._container.insertBefore(this._element,t)},t.prototype.dispose=function(){this._container.removeChild(this._element)},t}();t.TabButtonDropIndicator=e}(AutotaskDashboardSystem||(AutotaskDashboardSystem={})),function(t){var e=function(t){function e(e,n){var i=t.call(this,e)||this;return i._closeButton=AutotaskDomSystem.Document.getElementById(n),i._clickHandler=function(){i._click()},i._closeButton.addEventListener("click",i._clickHandler),i._closeHandler=null,i}return __extends(e,t),e.prototype.setCloseHandler=function(t){this._closeHandler=t},e.prototype.__dispose=function(){this._closeButton.removeEventListener("click",this._clickHandler)},e.prototype._click=function(){this._onClose()},e.prototype._onClose=function(){null!==this._closeHandler&&this._closeHandler()},e}(Autotask.LifecycleObject);t.PresentationDashboardTitleBar=e}(AutotaskDashboardSystem||(AutotaskDashboardSystem={})),function(t){var e=function(t){function e(e,n,i){var o=t.call(this,e)||this;return o._contextMenuId=n,o._contextMenuButton=AutotaskDomSystem.Document.getElementById(i),o._contextMenuInteractionEventsCoordinator=new AutotaskOverlaySystem.InteractionEventsCoordinator(o._contextMenuButton,(function(){o._showContextMenu()}),(function(){o._hideContextMenu()})),o._contextMenu=null,o}return __extends(e,t),e.prototype.__dispose=function(){this._contextMenuInteractionEventsCoordinator.__dispose()},e.prototype.__initialize=function(){this._contextMenu=autotask.find(this._contextMenuId)},e.prototype._getContextMenu=function(){return null===this._contextMenu?autotask.throwException("The context menu is not set."):this._contextMenu},e.prototype._hideContextMenu=function(){this._getContextMenu().hide()},e.prototype._showContextMenu=function(){this._getContextMenu().show(this._contextMenuButton)},e}(Autotask.LifecycleObject);t.PreviewDashboardPageTitleBar=e}(AutotaskDashboardSystem||(AutotaskDashboardSystem={})),function(t){var e=function(e){function n(t,n,i){var o=e.call(this,t)||this;o._tabButtonIds=n,o._checksum=i;for(var a=[],r=0,s=n;r<s.length;r++){var l=s[r];a.push(AutotaskDomSystem.Document.getElementById(l))}return o._selectedTabChangedHandler=null,o._tabButtons=[],o}return __extends(n,e),Object.defineProperty(n.prototype,"checksum",{get:function(){return this._checksum},enumerable:!1,configurable:!0}),n.prototype.__initialize=function(){for(var t,e=this,n=0,i=this._tabButtonIds;n<i.length;n++){var o=i[n];(t=autotask.find(o)).__setSelectedHandler((function(t){e._tabButtonSelected(t)})),this._tabButtons.push(t)}},n.prototype.__setSelectedTabChangedHandler=function(t){this._selectedTabChangedHandler=t},n.prototype._onTabSelected=function(e){if(null!==this._selectedTabChangedHandler){var n=new t.SelectedTabChangedEventArgs(e);this._selectedTabChangedHandler(n)}},n.prototype._tabButtonSelected=function(t){this._tabButtons.forEach((function(e){e.tabId!==t.tabId&&e.clearSelection()})),this._onTabSelected(t.tabId)},n}(Autotask.LifecycleObject);t.SimplifiedDashboardTitleBar=e}(AutotaskDashboardSystem||(AutotaskDashboardSystem={})),function(t){var e=function(e){function n(n,i,o,a,r,s){var l=e.call(this,n)||this;l._tabButtonIds=i,l._tabGroupContextMenuId=o,l._moveTabButtonRoute=r,l._checksum=s;var u=AutotaskDomSystem.Document.getElementById(n),c=AutotaskDomSystem.Document.getChildElementByClassName(u,"TabButtonContainer1");l._tabButtonContainer=c;for(var d=[],h=0,_=i;h<_.length;h++){var p=_[h];d.push(AutotaskDomSystem.Document.getElementById(p))}return l._dragEventsCoordinator=new t.TitleBarDragEventsCoordinator(c,d,(function(t){l._tabButtonDragStarted(t)}),(function(t,e){l._tabButtonDragged(t,e)}),(function(){l._tabButtonDragStopped()})),l._dragEventState=new t.TabButtonDragState((function(){l._dragEventStateTorn()})),null!==a?(l._tabGroupContextMenuButton=AutotaskDomSystem.Document.getElementById(a),l._tabGroupContextMenuInteractionEventsCoordinator=new AutotaskOverlaySystem.InteractionEventsCoordinator(l._tabGroupContextMenuButton,(function(){l._showTabGroupContextMenu()}),(function(){l._hideTabGroupContextMenu()}))):(l._tabGroupContextMenuButton=null,l._tabGroupContextMenuInteractionEventsCoordinator=null),l._dragEventInformation=null,l._moveTabButtonCanceler=null,l._selectedTabChangedHandler=null,l._tabButtonDroppingHandlers=[],l._tabButtons=[],l._tabButtonsChangedHandlers=[],l._tabGroupContextMenu=null,l._userInteractionEventEndedHandler=null,l._userInteractionEventStartedHandler=null,l}return __extends(n,e),Object.defineProperty(n.prototype,"checksum",{get:function(){return this._checksum},enumerable:!1,configurable:!0}),n.prototype.addTabButtonDropping=function(t){this._tabButtonDroppingHandlers.push(t)},n.prototype.addTabButtonsChanged=function(t){this._tabButtonsChangedHandlers.push(t)},n.prototype.__cancel=function(){null!==this._moveTabButtonCanceler&&(this._moveTabButtonCanceler.__cancelRequest(),this._moveTabButtonCanceler=null)},n.prototype.__dispose=function(){this._dragEventsCoordinator.dispose(),null!==this._dragEventInformation&&this._dragEventInformation.dispose(),null!==this._tabGroupContextMenuInteractionEventsCoordinator&&this._tabGroupContextMenuInteractionEventsCoordinator.__dispose(),this.__cancel()},n.prototype.__initialize=function(){for(var t,e=this,n=0,i=this._tabButtonIds;n<i.length;n++){var o=i[n];(t=autotask.find(o)).__setSelectedHandler((function(t){e._tabButtonSelected(t)})),this._tabButtons.push(t)}null!==this._tabGroupContextMenuId&&(this._tabGroupContextMenu=autotask.find(this._tabGroupContextMenuId))},n.prototype.__registerUserInteractionEventHandlers=function(t,e){this._userInteractionEventStartedHandler=t,this._userInteractionEventEndedHandler=e},n.prototype.__setSelectedTabChangedHandler=function(t){this._selectedTabChangedHandler=t},n.prototype._determineDragEventNextTabId=function(t){var e=this._getDragEventInformation(),n=null,i=t.nextElement;null!==i&&(i!==e.tabButtonElement&&(n=autotask.find(i.id).tabId));return n},n.prototype._dragEventStateTorn=function(){this._initializeDragEvent()},n.prototype._dragTabButton=function(t,e){if(this._dragEventState.adjustPosition(t),this._dragEventState.isTornOff){var n=this._getDragEventInformation(),i=n.calculator.calculateDragPosition(e).leftPosition;n.tabButton.applyDraggingPosition(i),this._moveDropIndicator(i)}},n.prototype._dropTabButton=function(){var t=this._getDragEventInformation(),e=this._determineDragEventNextTabId(t.dropIndicator);if(e!==t.originalNextTabId)this._tabButtonDropped(t.tabButton.tabId,e);else{var n=t.dropIndicator.nextElement;this._tabButtonContainer.insertBefore(t.tabButtonElement,n),this._endDragEvent()}},n.prototype._endDragEvent=function(){var t=this._getDragEventInformation();this._dragEventState.isTornOff&&(t.tabButton.clearDraggingWidth(),t.tabButton.clearDraggingPosition()),null!==this._dragEventInformation&&(this._dragEventInformation.dispose(),this._dragEventInformation=null),this._dragEventState.reset(),this._onUserInteractionEventEnded()},n.prototype._getDragEventInformation=function(){return null===this._dragEventInformation?autotask.throwException("The drag event information is not set."):this._dragEventInformation},n.prototype._getTabGroupContextMenu=function(){return null===this._tabGroupContextMenu?autotask.throwException("The tab group context menu is not set."):this._tabGroupContextMenu},n.prototype._getTabGroupContextMenuButton=function(){return null===this._tabGroupContextMenuButton?autotask.throwException("The tab group context menu button is not set."):this._tabGroupContextMenuButton},n.prototype._hideTabGroupContextMenu=function(){this._getTabGroupContextMenu().hide(),this._onUserInteractionEventEnded()},n.prototype._initializeDragEvent=function(){var e=this._getDragEventInformation();e.tabButton.applyDraggingWidth();var n=new t.TabButtonDropIndicator(this._tabButtonContainer,e.tabButtonElement.textContent,e.tabButtonElement.style.flexShrink);n.addBefore(e.tabButtonElement),this._tabButtonContainer.insertBefore(e.tabButtonElement,null),e.tabButton.applyDraggingPosition(n.leftPosition);var i=new t.TabButtonDragCalculator(n.leftPosition,this._dragEventState.originalCoordinate,e.tabButtonElement.offsetWidth,this._tabButtonContainer.clientWidth),o=this._determineDragEventNextTabId(n);e.beginMovement(i,n,o)},n.prototype._moveDropIndicator=function(t){for(var e,n=this._getDragEventInformation(),i=t+n.tabButtonElement.offsetWidth/2,o=0,a=this._tabButtonIds;o<a.length;o++){var r=a[o];if(r!==n.tabButtonId){if((e=autotask.find(r)).isDraggingTabButtonOverLeftHalf(i)){var s=AutotaskDomSystem.Document.getElementById(r);n.dropIndicator.addBefore(s);break}if(e.isDraggingTabButtonOverRightHalf(i)){var l=AutotaskDomSystem.Document.getElementById(r);n.dropIndicator.addAfter(l);break}}}},n.prototype._moveTabButtonSuccess=function(t,e){if(t.isSuccessful){var n=null;if(null!==e){n=AutotaskDomSystem.Document.getChildElementByAttributeValue(this._tabButtonContainer,"data-tab-id",e)}var i=this._getDragEventInformation();this._tabButtonContainer.insertBefore(i.tabButtonElement,n),this._onTabButtonsChanged()}this._endDragEvent()},n.prototype._onTabButtonDropping=function(t){this._tabButtonDroppingHandlers.forEach((function(e){e(t)}))},n.prototype._onTabButtonsChanged=function(){this._tabButtonsChangedHandlers.forEach((function(t){t()}))},n.prototype._onTabSelected=function(e){if(!this._dragEventState.isTornOff&&null!==this._selectedTabChangedHandler){var n=new t.SelectedTabChangedEventArgs(e);this._selectedTabChangedHandler(n)}},n.prototype._onUserInteractionEventEnded=function(){null!==this._userInteractionEventEndedHandler&&this._userInteractionEventEndedHandler()},n.prototype._onUserInteractionEventStarted=function(){null!==this._userInteractionEventStartedHandler&&this._userInteractionEventStartedHandler()},n.prototype._showTabGroupContextMenu=function(){this._onUserInteractionEventStarted(),this._getTabGroupContextMenu().show(this._getTabGroupContextMenuButton())},n.prototype._startDragEvent=function(e){this._onUserInteractionEventStarted(),this._dragEventState.start(),null!==this._dragEventInformation&&(this._dragEventInformation.dispose(),this._dragEventInformation=null),this._dragEventInformation=new t.TabButtonDragEvent(e)},n.prototype._tabButtonDragged=function(t,e){this._dragTabButton(t,e)},n.prototype._tabButtonDragStarted=function(t){this._startDragEvent(t)},n.prototype._tabButtonDragStopped=function(){this._dragEventState.isTornOff&&this._dropTabButton()},n.prototype._tabButtonDropped=function(e,n){var i=this;this.__cancel();var o=new t.TabButtonDroppingEventArgs(e,n);this._onTabButtonDropping(o);this._moveTabButtonCanceler=this._moveTabButtonRoute.__moveTabButton(o.data,(function(t){i._moveTabButtonSuccess(t,n)}))},n.prototype._tabButtonSelected=function(t){this._tabButtons.forEach((function(e){e.tabId!==t.tabId&&e.clearSelection()})),this._onTabSelected(t.tabId)},n}(Autotask.LifecycleObject);t.StandardDashboardTitleBar=e}(AutotaskDashboardSystem||(AutotaskDashboardSystem={})),function(t){var e=function(t){function e(e,n){var i=t.call(this,e)||this;return i._container=AutotaskDomSystem.Document.getElementById(n),i._immutableData=[],i}return __extends(e,t),e.prototype.generateFieldData=function(){for(var t=new AutotaskRequestDataSystem.SerializedRequestData([this._container]),e=0,n=this._immutableData;e<n.length;e++){var i=n[e];t.__addImmutableData(i)}return t},e.prototype.__addImmutableData=function(t){this._immutableData.push(t)},e}(Autotask.LifecycleObject);t.InteractiveWidgetDataFilter=e}(AutotaskDashboardSystem||(AutotaskDashboardSystem={})),function(t){var e=function(t){function e(e){var n=t.call(this,e)||this;return n._immutableData=[],n}return __extends(e,t),e.prototype.generateFieldData=function(){for(var t=new AutotaskRequestDataSystem.SerializedRequestData([]),e=0,n=this._immutableData;e<n.length;e++){var i=n[e];t.__addImmutableData(i)}return t},e.prototype.__addImmutableData=function(t){this._immutableData.push(t)},e}(Autotask.LifecycleObject);t.PresentationWidgetDataFilter=e}(AutotaskDashboardSystem||(AutotaskDashboardSystem={})),function(t){var e=function(e){function n(t,n,i,o,a){var r=e.call(this,t)||this;r._isRefreshingConditionMet=!1;r._intersectionObserver=new IntersectionObserver((function(t){r._intersectionObserverCallbackHandler(t)}),{threshold:0}),r._widgetId=n,r._refreshRoute=a,r._widgetShell=AutotaskDomSystem.Document.getElementById(t);var s=AutotaskDomSystem.Document.firstElementChild(r._widgetShell);return r._loadingIndicator=AutotaskDomSystem.Document.getChildElementByClassName(s,"LoadingIndicator"),r._transitionContainer=AutotaskDomSystem.Document.getChildElementByClassName(s,"TransitionContainer"),r._instanceTracker=new Autotask.InstanceTracker(o,i),r._refreshDelegate=function(){r._hardRefresh()},r._activeCssClass="Active",r._draggingCssClass="Dragging",r._fadeInCssClass="FadeIn",r._fadeOutCssClass="FadeOut",r._isDraggingEnabled=!1,r._refreshingHandlers=[],r._hardTransitionStartingDelay=100,r._hardTransitionContentLoadingDelay=100,r._hardTransitionEndingDelay=500,r._subtleTransitionStartingDelay=0,r._subtleTransitionContentLoadingDelay=300,r._subtleTransitionEndingDelay=800,r._generateWidgetFilterDataDelegate=null,r._mouseDownDragEventHandler=null,r._refreshCanceler=null,r._touchStartDragEventHandler=null,r._transitionCoordinator=null,r._userInteractionEventEndedHandler=null,r._userInteractionEventStartedHandler=null,r._widget=null,r}return __extends(n,e),Object.defineProperty(n.prototype,"widgetId",{get:function(){return this._widgetId},enumerable:!1,configurable:!0}),n.prototype.addRefreshing=function(t){this._refreshingHandlers.push(t)},n.prototype.applyDraggingPosition=function(t,e){this._widgetShell.classList.add(this._draggingCssClass),this._widgetShell.style.left=t.toString()+"px",this._widgetShell.style.top=e.toString()+"px"},n.prototype.arePageCoordinatesOverLeftHalf=function(t,e){var n=this._widgetShell.getBoundingClientRect(),i=n.top,o=n.left;return e>=i&&e<=i+this._widgetShell.offsetHeight&&t>=o&&t<=o+this._widgetShell.offsetWidth/2},n.prototype.arePageCoordinatesOverRightHalf=function(t,e){var n=this._widgetShell.getBoundingClientRect(),i=n.top,o=n.left,a=this._widgetShell.offsetWidth;return e>=i&&e<=i+this._widgetShell.offsetHeight&&t>=o+a/2&&t<=o+a},n.prototype.cancel=function(){null!==this._refreshCanceler&&(this._refreshCanceler.__cancelRequest(),this._refreshCanceler=null,this._transitionContainer.classList.remove(this._activeCssClass),this._loadingIndicator.classList.remove(this._activeCssClass)),null!==this._transitionCoordinator&&(this._transitionCoordinator.cancel(),this._transitionCoordinator=null)},n.prototype.clearDraggingPosition=function(){this._widgetShell.classList.remove(this._draggingCssClass),this._widgetShell.style.left="",this._widgetShell.style.top=""},n.prototype.enableDragging=function(t,e){this._mouseDownDragEventHandler=t,this._touchStartDragEventHandler=e,this._isDraggingEnabled=!0},n.prototype.hardRefresh=function(){var t=this;this._allowRefreshing((function(){t._hardRefresh()}))},n.prototype.registerUserInteractionEventHandlers=function(t,e){this._userInteractionEventStartedHandler=t,this._userInteractionEventEndedHandler=e},n.prototype.setWidgetFilterDataDelegate=function(t){this._generateWidgetFilterDataDelegate=t},n.prototype.subtleRefresh=function(){var t=this;this._allowRefreshing((function(){t._subtleRefresh()}))},n.prototype.__complete=function(){var t=this;this._allowRefreshing((function(){t._hardRefresh()}))},n.prototype.__dispose=function(){this.cancel(),this._instanceTracker.__dispose(),this._intersectionObserver.unobserve(this._widgetShell)},n.prototype.__preventRefreshing=function(){this._intersectionObserver.unobserve(this._widgetShell)},n.prototype._allowRefreshing=function(t){this._intersectionObserver.unobserve(this._widgetShell),this._refreshDelegate=t,this._intersectionObserver.observe(this._widgetShell)},n.prototype._getWidget=function(){return null===this._widget?autotask.throwException("The widget is not set."):this._widget},n.prototype._hardRefresh=function(){var t=this;this.cancel(),this._transitionContainer.classList.add(this._activeCssClass),this._loadingIndicator.classList.add(this._activeCssClass);this._refresh((function(e){t._hardRefreshSuccess(e)}),(function(e){t._hardRefreshError(e)}))},n.prototype._hardRefreshError=function(t){var e=this;this._refreshCanceler=null;var n=new Autotask.TransitionCoordinator(this._hardTransitionStartingDelay,(function(){e._hardTransitionStarting()}),this._hardTransitionContentLoadingDelay,(function(){e._hardTransitionErrorContentLoaded()}),(function(){e._hardTransitionReset()}));n.configureEndingEvent((function(){e._hardTransitionEnding()}),this._hardTransitionEndingDelay),n.executeTransition([this._instanceTracker.__createLoadContentDelegateForError(t.errorMessage)]),this._transitionCoordinator=n},n.prototype._hardRefreshSuccess=function(t){var e=this;this._refreshCanceler=null;var n=new Autotask.TransitionCoordinator(this._hardTransitionStartingDelay,(function(){e._hardTransitionStarting()}),this._hardTransitionContentLoadingDelay,(function(){e._hardTransitionWidgetContentLoaded(t.widgetId)}),(function(){e._hardTransitionReset()}));n.contentLoadingHandler=function(){e._transitionContentLoading(t.widgetWidth,t.widgetHeight)},n.configureEndingEvent((function(){e._hardTransitionEnding()}),this._hardTransitionEndingDelay),n.executeTransition([this._instanceTracker.__createLoadContentDelegate(t.html,t.javaScript)]),this._transitionCoordinator=n},n.prototype._hardTransitionEnding=function(){this._transitionContainer.classList.remove(this._activeCssClass),this._transitionContainer.classList.remove(this._fadeInCssClass)},n.prototype._hardTransitionErrorContentLoaded=function(){this._transitionContainer.classList.add(this._fadeInCssClass),this._widget=null},n.prototype._hardTransitionWidgetContentLoaded=function(t){this._transitionContainer.classList.add(this._fadeInCssClass),this._widget=autotask.find(t),this._registerWidgetHandlers()},n.prototype._hardTransitionReset=function(){this._loadingIndicator.classList.remove(this._activeCssClass),this._transitionContainer.classList.remove(this._activeCssClass),this._transitionContainer.classList.remove(this._fadeInCssClass)},n.prototype._hardTransitionStarting=function(){this._loadingIndicator.classList.remove(this._activeCssClass)},n.prototype._intersectionObserverCallbackHandler=function(t){t[0].isIntersecting&&(this._isRefreshingConditionMet=!0,this._refreshDelegate(),this._intersectionObserver.unobserve(this._widgetShell))},n.prototype._onMouseDownDragEvent=function(t,e){null!==this._mouseDownDragEventHandler&&this._mouseDownDragEventHandler(this._widgetShell,t,e)},n.prototype._onRefreshing=function(t){this._refreshingHandlers.forEach((function(e){e(t)}))},n.prototype._onTouchStartDragEvent=function(t,e){null!==this._touchStartDragEventHandler&&this._touchStartDragEventHandler(this._widgetShell,t,e)},n.prototype._onUserInteractionEventEnded=function(){null!==this._userInteractionEventEndedHandler&&this._userInteractionEventEndedHandler()},n.prototype._onUserInteractionEventStarted=function(){null!==this._userInteractionEventStartedHandler&&this._userInteractionEventStartedHandler()},n.prototype._refresh=function(e,n){if(!0===this._isRefreshingConditionMet){var i=new t.WidgetShellRefreshingEventArgs(this._widgetId);this._onRefreshing(i),this._refreshCanceler=this._refreshRoute.__refreshWidget(i.requestData,e,n)}},n.prototype._registerWidgetHandlers=function(){var t=this,e=this._getWidget();this._isDraggingEnabled&&e.__enableDragging((function(e,n){t._widgetMouseDown(e,n)}),(function(e,n){t._widgetTouchStart(e,n)})),e.__setRefreshDelegate((function(){t.hardRefresh()})),e.__registerUserInteractionEventHandlers((function(){t._userInteractionEventStarted()}),(function(){t._userInteractionEventEnded()})),null!==this._generateWidgetFilterDataDelegate&&(e.widgetFilterData=this._generateWidgetFilterDataDelegate())},n.prototype._subtleRefresh=function(){var t=this;this.cancel();this._refresh((function(e){t._subtleRefreshSuccess(e)}),(function(e){t._subtleRefreshError(e)}))},n.prototype._subtleRefreshError=function(t){var e=this;this._refreshCanceler=null;var n=new Autotask.TransitionCoordinator(this._subtleTransitionStartingDelay,(function(){e._subtleTransitionStarting()}),this._subtleTransitionContentLoadingDelay,(function(){e._subtleTransitionErrorContentLoaded()}),(function(){e._subtleTransitionReset()}));n.configureEndingEvent((function(){e._subtleTransitionEnding()}),this._subtleTransitionEndingDelay),n.executeTransition([this._instanceTracker.__createLoadContentDelegateForError(t.errorMessage)]),this._transitionCoordinator=n},n.prototype._subtleRefreshSuccess=function(t){var e=this;this._refreshCanceler=null;var n=new Autotask.TransitionCoordinator(this._subtleTransitionStartingDelay,(function(){e._subtleTransitionStarting()}),this._subtleTransitionContentLoadingDelay,(function(){e._subtleTransitionWidgetContentLoaded(t.widgetId)}),(function(){e._subtleTransitionReset()}));n.configureEndingEvent((function(){e._subtleTransitionEnding()}),this._subtleTransitionEndingDelay),n.contentLoadingHandler=function(){e._transitionContentLoading(t.widgetWidth,t.widgetHeight)},n.executeTransition([this._instanceTracker.__createLoadContentDelegate(t.html,t.javaScript)]),this._transitionCoordinator=n},n.prototype._subtleTransitionEnding=function(){this._transitionContainer.classList.remove(this._activeCssClass),this._transitionContainer.classList.remove(this._fadeInCssClass)},n.prototype._subtleTransitionErrorContentLoaded=function(){this._transitionContainer.classList.remove(this._fadeOutCssClass),this._transitionContainer.classList.add(this._fadeInCssClass),this._widget=null},n.prototype._subtleTransitionReset=function(){this._loadingIndicator.classList.remove(this._activeCssClass),this._transitionContainer.classList.remove(this._activeCssClass),this._transitionContainer.classList.remove(this._fadeOutCssClass),this._transitionContainer.classList.remove(this._fadeInCssClass)},n.prototype._subtleTransitionStarting=function(){this._loadingIndicator.classList.remove(this._activeCssClass),this._transitionContainer.classList.add(this._fadeOutCssClass)},n.prototype._subtleTransitionWidgetContentLoaded=function(t){this._transitionContainer.classList.remove(this._fadeOutCssClass),this._transitionContainer.classList.add(this._fadeInCssClass),this._widget=autotask.find(t),this._registerWidgetHandlers()},n.prototype._transitionContentLoading=function(t,e){this._widgetShell.setAttribute("data-horizontal-size",t),this._widgetShell.setAttribute("data-vertical-size",e)},n.prototype._userInteractionEventEnded=function(){this._onUserInteractionEventEnded()},n.prototype._userInteractionEventStarted=function(){this._onUserInteractionEventStarted()},n.prototype._widgetMouseDown=function(t,e){this._onMouseDownDragEvent(t,e)},n.prototype._widgetTouchStart=function(t,e){this._onTouchStartDragEvent(t,e)},n}(Autotask.LifecycleObject);t.WidgetShell=e}(AutotaskDashboardSystem||(AutotaskDashboardSystem={})),function(t){var e=function(){function e(t,e,n,i,o,a,r,s){this._leftPositionOffset=t-n,this._topPositionOffset=e-i-o,this._minimumLeftPosition=0-a/2,this._maximumLeftPosition=s-a/2,this._minimumTopPosition=0-r/2}return e.prototype.calculateDragPosition=function(e,n,i){var o=this._leftPositionOffset+e;o<this._minimumLeftPosition?o=this._minimumLeftPosition:o>this._maximumLeftPosition&&(o=this._maximumLeftPosition);var a=this._topPositionOffset+n+i;return a<this._minimumTopPosition&&(a=this._minimumTopPosition),new t.WidgetShellDragResult(o,a)},e}();t.WidgetShellDragCalculator=e}(AutotaskDashboardSystem||(AutotaskDashboardSystem={})),function(t){var e=function(){function e(t,e,n,i,o){this._widgetShell=autotask.find(t.id),this._widgetShellElement=t,this._createWidgetButtonElement=e,this._originalXCoordinate=n,this._originalYCoordinate=i,this._tornOffHandler=o,this._horizontalTearThreshold=20,this._verticalTearThreshold=5,this._isSuspended=!1,this._movementTracker=null}return Object.defineProperty(e.prototype,"isSuspended",{get:function(){return this._isSuspended},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"movementTracker",{get:function(){return this._movementTracker},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"widgetShell",{get:function(){return this._widgetShell},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"widgetShellElement",{get:function(){return this._widgetShellElement},enumerable:!1,configurable:!0}),e.prototype.adjustPosition=function(t,e){if(null===this._movementTracker){var n=Math.abs(t-this._originalXCoordinate)>this._horizontalTearThreshold,i=Math.abs(e-this._originalYCoordinate)>this._verticalTearThreshold;(n||i)&&this._tearOff()}},e.prototype.dispose=function(){null!==this._movementTracker&&this._movementTracker.dispose()},e.prototype.resume=function(){this._isSuspended=!1},e.prototype.suspend=function(){if(null!==this._movementTracker){var t=void 0;t=null!==this._movementTracker.originalNextWidgetShell?AutotaskDomSystem.Document.getElementById(this._movementTracker.originalNextWidgetShell.id):null!==this._createWidgetButtonElement?this._createWidgetButtonElement:this._widgetShellElement,this._movementTracker.dropIndicator.moveBefore(t)}this._isSuspended=!0},e.prototype._beginMovementHandler=function(e,n,i){this._movementTracker=new t.WidgetShellMovementTracker(e,n,this._widgetShell,this._widgetShellElement,i)},e.prototype._tearOff=function(){var e=this,n=new t.WidgetShellTornOffEventArgs(this._widgetShell,this._widgetShellElement,this._originalXCoordinate,this._originalYCoordinate,(function(t,n,i){e._beginMovementHandler(t,n,i)}));this._tornOffHandler(n)},e}();t.WidgetShellDragEvent=e}(AutotaskDashboardSystem||(AutotaskDashboardSystem={})),function(t){var e=function(){function t(t,e){this._leftPosition=t,this._topPosition=e}return Object.defineProperty(t.prototype,"leftPosition",{get:function(){return this._leftPosition},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"topPosition",{get:function(){return this._topPosition},enumerable:!1,configurable:!0}),t}();t.WidgetShellDragResult=e}(AutotaskDashboardSystem||(AutotaskDashboardSystem={})),function(t){var e=function(){function t(t,e){this._container=t;var n=document.createElement("div");n.classList.add("WidgetShellDropIndicator1"),n.style.width=e.toString()+"px",this._element=n}return Object.defineProperty(t.prototype,"leftPosition",{get:function(){return this._element.offsetLeft},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"nextElement",{get:function(){return this._element.nextElementSibling},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"topPosition",{get:function(){return this._element.offsetTop},enumerable:!1,configurable:!0}),t.prototype.addBefore=function(t){this._container.insertBefore(this._element,t)},t.prototype.dispose=function(){this._container.removeChild(this._element)},t.prototype.moveAfter=function(t){this._container.insertBefore(this._element,t.nextElementSibling)},t.prototype.moveBefore=function(t){this._container.insertBefore(this._element,t)},t}();t.WidgetShellDropIndicator=e}(AutotaskDashboardSystem||(AutotaskDashboardSystem={})),function(t){var e=function(){function t(t,e,n,i,o){this._calculator=t,this._dropIndicator=e,this._widgetShell=n,this._widgetShellElement=i,this._originalNextWidgetShell=o}return Object.defineProperty(t.prototype,"calculator",{get:function(){return this._calculator},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dropIndicator",{get:function(){return this._dropIndicator},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"originalNextWidgetShell",{get:function(){return this._originalNextWidgetShell},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"widgetShell",{get:function(){return this._widgetShell},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"widgetShellElement",{get:function(){return this._widgetShellElement},enumerable:!1,configurable:!0}),t.prototype.dispose=function(){this._dropIndicator.dispose()},t}();t.WidgetShellMovementTracker=e}(AutotaskDashboardSystem||(AutotaskDashboardSystem={})),function(t){var e=function(){function t(t,e,n,i,o){this._widgetShell=t,this._widgetShellElement=e,this._originalXCoordinate=n,this._originalYCoordinate=i,this._beginMovementDelegate=o}return Object.defineProperty(t.prototype,"widgetShell",{get:function(){return this._widgetShell},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"widgetShellElement",{get:function(){return this._widgetShellElement},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"originalXCoordinate",{get:function(){return this._originalXCoordinate},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"originalYCoordinate",{get:function(){return this._originalYCoordinate},enumerable:!1,configurable:!0}),t.prototype.beginMovement=function(t,e,n){this._beginMovementDelegate(t,e,n)},t}();t.WidgetShellTornOffEventArgs=e}(AutotaskDashboardSystem||(AutotaskDashboardSystem={})),function(t){var e=function(t){function e(e,n,i,o,a){var r=t.call(this,e)||this;r._overlayManager=n,r._minifyManager=i,r._closeButtonClickHandler=o,r._closedHandlers=[],null!==a&&r._closedHandlers.push(a),r._bookmarkButtonClickedHandler=null,r._cssClassActive="Active",r._dialogElement=AutotaskDomSystem.Document.getElementById(e),r._helpButtonClickedHandler=null,r._isMinimized=!1,r._maximizedHandlers=[],r._minimizedHandlers=[],r._openedHandlers=[],r._poppingOutHandlers=[],r._resetValidationHandler=null,r._validateEditorHandler=null;var s=r._dialogElement.firstElementChild,l=s.firstElementChild.firstElementChild;r._setupTitleBarEventListeners(l),s.children[1].addEventListener("scroll",(function(){r._scrollListener()})),r._titleText=null;var u=AutotaskDomSystem.Document.getElementsByClassName(l,"Title");return 0!==u.length&&(r._titleText=u[0].textContent),r._tabbingSystem=new AutotaskTabbingSystem.TabbingSystem(r._dialogElement,null),r._tabbingSystem.isEnabled=!0,r}return __extends(e,t),e.prototype.addClosedHandler=function(t){this._closedHandlers.push(t)},e.prototype.addMaximizedHandler=function(t){this._maximizedHandlers.push(t)},e.prototype.addMinimizedHandler=function(t){this._minimizedHandlers.push(t)},e.prototype.addOpenedHandler=function(t){this._openedHandlers.push(t)},e.prototype.addPoppingOutHandler=function(t){this._poppingOutHandlers.push(t)},e.prototype.close=function(){var t,e=this;autotask.globalValidationOverlay.hide(null),this._managePrintCapabilities(!1),this._isMinimized?null===(t=this._minifyManager)||void 0===t||t.removeMinimizedBar(this):this._overlayManager.pullDialogOffStack((function(){e._deactivate()})),this._dialogElement.remove();for(var n=0;n<this._closedHandlers.length;n++)this._closedHandlers[n]()},e.prototype.closeEmulatingCloseButtonClick=function(){null!==this._closeButtonClickHandler&&this._closeButtonClickHandler(),this.close()},e.prototype.getTitleText=function(){return this._titleText},e.prototype.minimize=function(){var t,e=this;if(!this._isMinimized){this._managePrintCapabilities(!1),this._overlayManager.pullDialogOffStack((function(){e._deactivate()})),null===(t=this._minifyManager)||void 0===t||t.addMinimizedBar(this,this._poppingOutHandlers.length>0),this._isMinimized=!0;for(var n=0;n<this._minimizedHandlers.length;n++)this._minimizedHandlers[n]()}},e.prototype.maximize=function(){var t,e=this;if(this._isMinimized){this._managePrintCapabilities(!0),this._overlayManager.pushDialogOnStack((function(t){e._activate(t)})),null===(t=this._minifyManager)||void 0===t||t.removeMinimizedBar(this),this._isMinimized=!1;for(var n=0;n<this._maximizedHandlers.length;n++)this._maximizedHandlers[n]()}},e.prototype.open=function(){var t=this;autotask.globalValidationOverlay.hide(null),this._managePrintCapabilities(!0),this._overlayManager.pushDialogOnStack((function(e){t._activate(e)})),this._tabbingSystem.reset(),this._tabbingSystem.focusFirstParticipant();for(var e=0;e<this._openedHandlers.length;e++)this._openedHandlers[e]()},e.prototype.popOut=function(){for(var t=0;t<this._poppingOutHandlers.length;t++)this._poppingOutHandlers[t]();this.close()},e.prototype.removeOpenedHandler=function(t){for(var e=0;e<this._openedHandlers.length;e++)if(this._openedHandlers[e]===t){this._openedHandlers.splice(e,1);break}},e.prototype.set_helpButtonClickedHandler=function(t){this._helpButtonClickedHandler=t},e.prototype.set_bookmarkButtonClickedHandler=function(t){this._bookmarkButtonClickedHandler=t},e.prototype.__resetValidation=function(){null!==this._resetValidationHandler&&this._resetValidationHandler()},e.prototype._activate=function(t){this._dialogElement.style.zIndex=t.toString(),this._dialogElement.classList.add(this._cssClassActive)},e.prototype._deactivate=function(){this._dialogElement.classList.remove(this._cssClassActive)},e.prototype._managePrintCapabilities=function(t){if(null!==this._dialogElement.parentElement)for(var e=this._dialogElement.parentElement.children,n=0;n<e.length;n++)e[n]!==this._dialogElement&&"SCRIPT"!==e[n].nodeName&&(t?e[n].classList.add("Print"):e[n].classList.remove("Print"))},e.prototype._scrollListener=function(){this._overlayManager.hideVisibleContextOverlays()},e.prototype._closeButtonClickListener=function(){this.closeEmulatingCloseButtonClick()},e.prototype._minimizeButtonClickListener=function(){this.minimize()},e.prototype._popOutButtonClickListener=function(){this.popOut()},e.prototype._bookmarkButtonClickListener=function(t){var e=t.currentTarget.firstElementChild,n=e.classList.contains("Star");this._bookmarkButtonClickedHandler&&this._bookmarkButtonClickedHandler(n,(function(){n?(e.classList.remove("Star"),e.classList.add("BookmarkedStar")):(e.classList.remove("BookmarkedStar"),e.classList.add("Star"))}))},e.prototype._helpButtonClickListener=function(){this._helpButtonClickedHandler&&this._helpButtonClickedHandler()},e.prototype._addResetValidationHandler=function(t){this._resetValidationHandler=t},e.prototype.validateEditor=function(t){null!==this._validateEditorHandler&&this._validateEditorHandler(t)},e.prototype._addValidateEditorHandler=function(t){this._validateEditorHandler=t},e.prototype._setupTitleBarEventListeners=function(t){var e=this;t.lastElementChild.addEventListener("click",(function(){e._closeButtonClickListener()}));for(var n=0;n<t.children.length;n++){var i=t.children[n];if(i.classList.contains("DialogTitleBarButton")&&null!==i.firstElementChild){var o=i.firstElementChild;o.classList.contains("Minimize")?i.addEventListener("click",(function(){e._minimizeButtonClickListener()})):o.classList.contains("PopOut")?i.addEventListener("click",(function(){e._popOutButtonClickListener()})):(null==o?void 0:o.classList.contains("Star"))||o.classList.contains("BookmarkedStar")?i.addEventListener("click",(function(t){e._bookmarkButtonClickListener(t)})):o.classList.contains("Help")&&i.addEventListener("click",(function(){e._helpButtonClickListener()}))}}},e}(Autotask.LifecycleObject);t.TitledDialog=e}(AutotaskDialogSystem||(AutotaskDialogSystem={})),function(t){var e=function(t){function e(e,n,i,o,a,r){var s=t.call(this,e)||this;s._titleBarId=n,s._overlayManager=i,s._minifyManager=o,s._closeButtonClickHandler=a,s._closedHandlers=[],null!==r&&s._closedHandlers.push(r),s._cssClassActive="Active",s._dialogElement=AutotaskDomSystem.Document.getElementById(e),s._isMinimized=!1,s._maximizedHandlers=[],s._minimizedHandlers=[],s._openedHandlers=[],s._poppingOutHandlers=[],s._resetValidationHandler=null,s._titleBar=null,s._validateEditorHandler=null;var l=AutotaskDomSystem.Document.getChildElementByClassName(s._dialogElement,"VerticalContainer");return AutotaskDomSystem.Document.getChildElementByClassName(l,"Header").addEventListener("scroll",(function(){s._scrollListener()})),s._tabbingSystem=new AutotaskTabbingSystem.TabbingSystem(s._dialogElement,null),s._tabbingSystem.isEnabled=!0,s}return __extends(e,t),e.prototype.addClosedHandler=function(t){this._closedHandlers.push(t)},e.prototype.addMaximizedHandler=function(t){this._maximizedHandlers.push(t)},e.prototype.addMinimizedHandler=function(t){this._minimizedHandlers.push(t)},e.prototype.addOpenedHandler=function(t){this._openedHandlers.push(t)},e.prototype.addPoppingOutHandler=function(t){this._poppingOutHandlers.push(t)},e.prototype.close=function(){var t,e=this;autotask.globalValidationOverlay.hide(null),this._managePrintCapabilities(!1),this._isMinimized?null===(t=this._minifyManager)||void 0===t||t.removeMinimizedBar(this):this._overlayManager.pullDialogOffStack((function(){e._deactivate()})),this._dialogElement.remove();for(var n=0;n<this._closedHandlers.length;n++)this._closedHandlers[n]()},e.prototype.closeEmulatingCloseButtonClick=function(){null!==this._closeButtonClickHandler&&this._closeButtonClickHandler(),this.close()},e.prototype.getTitleText=function(){return this._titleBar.text},e.prototype.minimize=function(){var t,e=this;if(!this._isMinimized){this._managePrintCapabilities(!1),this._overlayManager.pullDialogOffStack((function(){e._deactivate()})),null===(t=this._minifyManager)||void 0===t||t.addMinimizedBar(this,this._poppingOutHandlers.length>0),this._isMinimized=!0;for(var n=0;n<this._minimizedHandlers.length;n++)this._minimizedHandlers[n]()}},e.prototype.maximize=function(){var t,e=this;if(this._isMinimized){this._managePrintCapabilities(!0),this._overlayManager.pushDialogOnStack((function(t){e._activate(t)})),null===(t=this._minifyManager)||void 0===t||t.removeMinimizedBar(this),this._isMinimized=!1;for(var n=0;n<this._maximizedHandlers.length;n++)this._maximizedHandlers[n]()}},e.prototype.open=function(){var t=this;autotask.globalValidationOverlay.hide(null),this._managePrintCapabilities(!0),this._overlayManager.pushDialogOnStack((function(e){t._activate(e)})),this._tabbingSystem.reset(),this._tabbingSystem.focusFirstParticipant();for(var e=0;e<this._openedHandlers.length;e++)this._openedHandlers[e]()},e.prototype.popOut=function(){for(var t=0;t<this._poppingOutHandlers.length;t++)this._poppingOutHandlers[t]();this.close()},e.prototype.removeOpenedHandler=function(t){for(var e=0;e<this._openedHandlers.length;e++)if(this._openedHandlers[e]===t){this._openedHandlers.splice(e,1);break}},e.prototype.__initialize=function(){var t=this;this._titleBar=autotask.find(this._titleBarId),this._titleBar.setCloseButtonClickHandler((function(){t.closeEmulatingCloseButtonClick()})),this._titleBar.setMinimizeButtonClickHandler((function(){t.minimize()})),this._titleBar.setPopOutButtonClickHandler((function(){t.popOut()}))},e.prototype.__resetValidation=function(){null!==this._resetValidationHandler&&this._resetValidationHandler()},e.prototype._activate=function(t){this._dialogElement.style.zIndex=t.toString(),this._dialogElement.classList.add(this._cssClassActive)},e.prototype._deactivate=function(){this._dialogElement.classList.remove(this._cssClassActive)},e.prototype._managePrintCapabilities=function(t){if(null!==this._dialogElement.parentElement)for(var e=this._dialogElement.parentElement.children,n=0;n<e.length;n++)e[n]!==this._dialogElement&&"SCRIPT"!==e[n].nodeName&&(t?e[n].classList.add("Print"):e[n].classList.remove("Print"))},e.prototype._scrollListener=function(){this._overlayManager.hideVisibleContextOverlays()},e.prototype._addResetValidationHandler=function(t){this._resetValidationHandler=t},e.prototype.validateEditor=function(t){null!==this._validateEditorHandler&&this._validateEditorHandler(t)},e.prototype._addValidateEditorHandler=function(t){this._validateEditorHandler=t},e}(Autotask.LifecycleObject);t.TitledDialog2=e}(AutotaskDialogSystem||(AutotaskDialogSystem={})),function(t){var e=function(){function t(t){this._isDirty=t}return Object.defineProperty(t.prototype,"isDirty",{get:function(){return this._isDirty},enumerable:!1,configurable:!0}),t}();t.DirtyStateChangeEventArgs=e}(AutotaskDirtyStateSystem||(AutotaskDirtyStateSystem={})),function(t){var e=function(){function t(t){this._tokenValue=t,this._dirtyCount=0,this._becomeCleanHandlers=new Array,this._becomeDirtyHandlers=new Array}return Object.defineProperty(t.prototype,"isDirty",{get:function(){return this._dirtyCount>0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tokenValue",{get:function(){return this._tokenValue},enumerable:!1,configurable:!0}),t.prototype.addBecomeCleanHandler=function(t){this._becomeCleanHandlers.push(t)},t.prototype.addBecomeDirtyHandler=function(t){this._becomeDirtyHandlers.push(t)},t.prototype.decrementDirtyCount=function(){0===this._dirtyCount&&autotask.throwException("Dirty count is already zero."),this._dirtyCount--,0===this._dirtyCount&&this._raiseBecomeCleanEvent()},t.prototype.incrementDirtyCount=function(){this._dirtyCount++,1===this._dirtyCount&&this._raiseBecomeDirtyEvent()},t.prototype._raiseBecomeCleanEvent=function(){for(var t=0,e=this._becomeCleanHandlers;t<e.length;t++){(0,e[t])()}},t.prototype._raiseBecomeDirtyEvent=function(){for(var t=0,e=this._becomeDirtyHandlers;t<e.length;t++){(0,e[t])()}},t}();t.DirtyStateGroup=e}(AutotaskDirtyStateSystem||(AutotaskDirtyStateSystem={})),function(t){var e=function(){function e(){this._groups=[]}return e.prototype.addBecomeClean=function(t,e){this._retrieveGroup(t).addBecomeCleanHandler(e)},e.prototype.addBecomeDirty=function(t,e){this._retrieveGroup(t).addBecomeDirtyHandler(e)},e.prototype.addLegacyParticipant=function(e,n){var i=this;this._groupExists(e)||this._groups.push(new t.DirtyStateGroup(e)),n.__addIsDirtyChange((function(t){i._dirtyStateChangeHandler(t,e)}))},e.prototype.addParticipant=function(e,n){var i=this;this._groupExists(e)||this._groups.push(new t.DirtyStateGroup(e)),n.addDirtyStateChangeHandler((function(t){i._dirtyStateChangeHandler(t,e)}))},e.prototype.isGroupDirty=function(t){return this._retrieveGroup(t).isDirty},e.prototype.removeParticipant=function(t,e){e.isDirty&&this._retrieveGroup(t).decrementDirtyCount()},e.prototype.removeLegacyParticipant=function(t,e){e.get_isDirty()&&this._retrieveGroup(t).decrementDirtyCount()},e.prototype._dirtyStateChangeHandler=function(t,e){var n=this._retrieveGroup(e);t.isDirty?n.incrementDirtyCount():n.decrementDirtyCount()},e.prototype._groupExists=function(t){for(var e=!1,n=0,i=this._groups;n<i.length;n++){if(i[n].tokenValue===t){e=!0;break}}return e},e.prototype._retrieveGroup=function(t){for(var e=null,n=0,i=this._groups;n<i.length;n++){var o=i[n];if(o.tokenValue===t){e=o;break}}return null===e?autotask.throwException("Cannot find dirty state group with token value == "+t):e},e}();t.DirtyStateManagement=e}(AutotaskDirtyStateSystem||(AutotaskDirtyStateSystem={})),function(t){!function(t){var e=function(){function t(t,e){this._height=t,this._width=e}return Object.defineProperty(t.prototype,"height",{get:function(){return this._height},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){return this._width},enumerable:!1,configurable:!0}),t}();t.ComputedStyle=e}(t.Other||(t.Other={}))}(AutotaskDomSystem||(AutotaskDomSystem={})),function(t){!function(t){t.firstElementChild=function(t){var e=t.firstElementChild;return null===e?autotask.throwException("firstElementChild returned null."):e},t.getChildElementByAttributeValue=function(t,e,n){var i="["+e+"='"+n+"']",o=t.querySelector(i);return null===o?autotask.throwException('element.querySelector("'+i+'") returned null.'):o},t.getChildElementByClassName=function(t,e){for(var n=t.children,i=0;i<n.length;i++){var o=n[i];if(o.classList.contains(e))return o}return autotask.throwException('No child element with a class name of "'+e+'" was found.')},t.getChildElementByClassNames=function(t,e){for(var n=t.children,i=0;i<n.length;i++){for(var o=n[i],a=!0,r=0,s=e;r<s.length;r++){var l=s[r];if(!o.classList.contains(l)){a=!1;break}}if(a)return o}return autotask.throwException('No child element with a class name of "'+e.toString()+'" was found.')},t.getChildElementsByClassName=function(t,e){for(var n=[],i=t.children,o=0;o<i.length;o++){var a=i[o];a.classList.contains(e)&&n.push(a)}return n},t.getElementByAttributeValue=function(t,e){var n="["+t+"='"+e+"']",i=document.querySelector(n);return null===i?autotask.throwException('document.querySelector("'+n+'") returned null.'):i},t.getElementByClassName=function(t){var e=document.querySelector("."+t);return null===e?autotask.throwException("document.querySelector(."+t+") returned null."):e},t.getElementById=function(t){var e=document.getElementById(t);return null===e?autotask.throwException("document.getElementById("+t+") returned null."):e},t.getElementsByAttributeName=function(t,e){var n="["+e+"]";return t.querySelectorAll(n)},t.getElementsByAttributeValue=function(t,e,n){var i="["+e+"='"+n+"']";return t.querySelectorAll(i)},t.getElementsByClassName=function(t,e){var n="."+e;return t.querySelectorAll(n)},t.getFirstElementChild=function(t){var e=t.firstElementChild;return null===e?autotask.throwException("firstElementChild returned null."):e},t.getIntegerAttributeValue=function(t,e){var n=null,i=t.getAttribute(e);return null!==i&&(n=parseInt(i,10)),n},t.getLastElementChild=function(t){var e=t.lastElementChild;return null===e?autotask.throwException("lastElementChild returned null."):e},t.getParentElement=function(t){return null===t.parentElement?autotask.throwException("No parent element was found."):t.parentElement},t.getParentElementByAttributeName=function(t,e){for(var n=t.parentElement;null!==n&&!n.hasAttribute(e);)n=n.parentElement;return null===n?autotask.throwException('No parent element with an attribute name of "'+e+'" was found.'):n},t.getPreviousElementSibling=function(t){return null===t.previousElementSibling?autotask.throwException("No previous sibling was found."):t.previousElementSibling}}(t.Document||(t.Document={}))}(AutotaskDomSystem||(AutotaskDomSystem={})),function(t){!function(t){t.isAlt=function(t){return 18===t},t.isB=function(t){return 66===t},t.isBackspace=function(t){return 8===t},t.isCapsLock=function(t){return 20===t},t.isComma=function(t){return 188===t},t.isCommand=function(t){return 91===t},t.isCommandLeft=function(t){return 91===t},t.isCommandRight=function(t){return 93===t},t.isControl=function(t){return 17===t},t.isDelete=function(t){return 46===t},t.isDown=function(t){return 40===t},t.isEnd=function(t){return 35===t},t.isEnter=function(t){return 13===t},t.isEscape=function(t){return 27===t},t.isHome=function(t){return 36===t},t.isI=function(t){return 73===t},t.isInsert=function(t){return 45===t},t.isLeft=function(t){return 37===t},t.isMenu=function(t){return 93===t},t.isNumberPadAdd=function(t){return 107===t},t.isNumberPadDecimal=function(t){return 110===t},t.isNumberPadDivide=function(t){return 111===t},t.isNumberPadEnter=function(t){return 108===t},t.isNumberPadMultiply=function(t){return 106===t},t.isNumberPadSubtract=function(t){return 109===t},t.isPageDown=function(t){return 34===t},t.isPageUp=function(t){return 33===t},t.isPeriod=function(t){return 190===t},t.isRight=function(t){return 39===t},t.isShift=function(t){return 16===t},t.isSpace=function(t){return 32===t},t.isTab=function(t){return 9===t},t.isU=function(t){return 85===t},t.isUp=function(t){return 38===t},t.isWindows=function(t){return 91===t}}(t.KeyCode||(t.KeyCode={}))}(AutotaskDomSystem||(AutotaskDomSystem={})),function(t){!function(t){t.positionOffset=function(e){var n=e.getBoundingClientRect();return new t.Position(n.top+window.scrollY,n.left+window.scrollX)},t.getComputedStyle=function(e){var n=window.getComputedStyle(e);return new t.ComputedStyle(parseFloat(n.height.replace("px","")),parseFloat(n.width.replace("px","")))}}(t.Other||(t.Other={}))}(AutotaskDomSystem||(AutotaskDomSystem={})),function(t){!function(t){var e=function(){function t(t,e){this._top=t,this._left=e}return Object.defineProperty(t.prototype,"top",{get:function(){return this._top},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"left",{get:function(){return this._left},enumerable:!1,configurable:!0}),t}();t.Position=e}(t.Other||(t.Other={}))}(AutotaskDomSystem||(AutotaskDomSystem={})),function(t){var e=function(){function t(t){this._droppedData=t}return Object.defineProperty(t.prototype,"droppedData",{get:function(){return this._droppedData},enumerable:!1,configurable:!0}),t}();t.DragAreaDroppedEventArgs=e}(AutotaskDragAndDropSystem||(AutotaskDragAndDropSystem={})),function(t){var e=function(){function t(t){this.droppingData=t,this._dropTargetData=null}return Object.defineProperty(t.prototype,"dropTargetData",{get:function(){return this._dropTargetData},enumerable:!1,configurable:!0}),t.prototype.approve=function(t){this._dropTargetData=t},t}();t.DragAreaDroppingEventArgs=e}(AutotaskDragAndDropSystem||(AutotaskDragAndDropSystem={})),function(t){var e=function(){function t(t,e,n){this._dragData=t,this._xCoordinate=e,this._yCoordinate=n}return Object.defineProperty(t.prototype,"dragData",{get:function(){return this._dragData},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"xCoordinate",{get:function(){return this._xCoordinate},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"yCoordinate",{get:function(){return this._yCoordinate},enumerable:!1,configurable:!0}),t}();t.DragAreaMovedEventArgs=e}(AutotaskDragAndDropSystem||(AutotaskDragAndDropSystem={})),function(t){var e=function(){function t(){this._dropAreas=[],this._dragAreas=[],this._eventEndedHandlers=[],this._eventStartedHandlers=[],this._scrollArea=null}return Object.defineProperty(t.prototype,"scrollArea",{set:function(t){null!==this._scrollArea&&this._scrollArea.deactivate(),this._scrollArea=t},enumerable:!1,configurable:!0}),t.prototype.addDragArea=function(t){var e=this;t.addDragCanceledHandler((function(){e._dragAreaDragCanceledHandler()})),t.addDragMovedHandler((function(t){e._dragAreaDragMovedHandler(t)})),t.addDragStartedHandler((function(t){e._dragAreaDragStartedHandler(t)})),t.addDroppedHandler((function(t){e._dragAreaDroppedHandler(t)})),t.addDroppingHandler((function(t){e._dragAreaDroppingHandler(t)})),this._dragAreas.push(t)},t.prototype.addDropArea=function(t){this._dropAreas.push(t)},t.prototype.addEventEndedHandler=function(t){this._eventEndedHandlers.push(t)},t.prototype.addEventStartedHandler=function(t){this._eventStartedHandlers.push(t)},t.prototype.dispose=function(){null!==this._scrollArea&&(this._scrollArea.deactivate(),this._scrollArea=null);for(var t=0,e=this._dragAreas;t<e.length;t++){e[t].clearHandlers()}this._dragAreas.length=0,this._dropAreas.length=0},t.prototype._dragAreaDragCanceledHandler=function(){null!==this._scrollArea&&this._scrollArea.deactivate();for(var t=0,e=this._dropAreas;t<e.length;t++){e[t].dragCanceled()}this._resume(),this._raiseEventEndedEvent()},t.prototype._dragAreaDragMovedHandler=function(t){for(var e=0,n=this._dropAreas;e<n.length;e++){n[e].dragAreaMoved(t.dragData)}},t.prototype._dragAreaDragStartedHandler=function(t){this._raiseEventStartedEvent(),this._suspend(),null!==this._scrollArea&&this._scrollArea.activate(t)},t.prototype._dragAreaDroppedHandler=function(t){for(var e=0,n=this._dropAreas;e<n.length;e++){n[e].dragAreaDropped(t.droppedData)}this._resume(),this._raiseEventEndedEvent()},t.prototype._dragAreaDroppingHandler=function(t){null!==this._scrollArea&&this._scrollArea.deactivate();for(var e=0,n=this._dropAreas;e<n.length;e++){n[e].dragAreaDropping(t.droppingData,(function(e){t.approve(e)}))}},t.prototype._raiseEventEndedEvent=function(){for(var t=0,e=this._eventEndedHandlers;t<e.length;t++){(0,e[t])()}},t.prototype._raiseEventStartedEvent=function(){for(var t=0,e=this._eventStartedHandlers;t<e.length;t++){(0,e[t])()}},t.prototype._resume=function(){for(var t=0,e=this._dragAreas;t<e.length;t++){e[t].resume()}},t.prototype._suspend=function(){for(var t=0,e=this._dragAreas;t<e.length;t++){e[t].suspend()}},t}();t.EventCoordinator=e}(AutotaskDragAndDropSystem||(AutotaskDragAndDropSystem={})),function(t){var e=function(){function t(t,e){var n=this;this._itemEqualsDelegate=null!==t?t:function(t,e){return n._defaultItemEquals(t,e)},this._itemSortDelegate=null!==e?e:void 0}return t.prototype.equals=function(t,e,n){var i;if(null===t&&null===e)i=!0;else if(null===t||null===e)i=!1;else if(t.length!==e.length)i=!1;else if(n)i=this._equalItems(t,e);else{var o=t.slice().sort(this._itemSortDelegate),a=e.slice().sort(this._itemSortDelegate);i=this._equalItems(o,a)}return i},t.prototype._defaultItemEquals=function(t,e){return t===e},t.prototype._equalItems=function(t,e){for(var n=!0,i=0;i<t.length;i++)if(!this._itemEqualsDelegate(t[i],e[i])){n=!1;break}return n},t}();t.ArrayComparer=e}(AutotaskEditorSystem||(AutotaskEditorSystem={})),function(t){!function(t){t.copy=function(t,e){for(var n=[],i=0,o=t;i<o.length;i++){var a=o[i];e?n.push(e(a)):n.push(a)}return n}}(t.ArrayCopier||(t.ArrayCopier={}))}(AutotaskEditorSystem||(AutotaskEditorSystem={})),function(t){var e=function(){function t(t,e){this._broadcasterId=t,this._keyCode=e}return Object.defineProperty(t.prototype,"broadcasterId",{get:function(){return this._broadcasterId},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isEnter",{get:function(){return AutotaskDomSystem.KeyCode.isEnter(this._keyCode)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isEscape",{get:function(){return AutotaskDomSystem.KeyCode.isEscape(this._keyCode)},enumerable:!1,configurable:!0}),t}();t.BroadcastKeyUpEventArgs=e}(AutotaskEditorSystem||(AutotaskEditorSystem={})),function(t){var e=function(t){function e(e,n,i,o){var a=t.call(this,e)||this;return a._targetCoordinatorId=n,a._dateBoxId=i,a._labelText=o,a}return __extends(e,t),Object.defineProperty(e.prototype,"labelText",{get:function(){return this._labelText},enumerable:!1,configurable:!0}),e.prototype.__initialize=function(){var t=autotask.find(this._dateBoxId),e=autotask.find(this._targetCoordinatorId);void 0!==e&&t.participantValidation.applyComparisonTargetLabelText(e.labelText)},e}(Autotask.LifecycleObject);t.DateComparisonValidationCoordinator=e}(AutotaskEditorSystem||(AutotaskEditorSystem={})),function(t){var e=function(t){function e(e){var n=t.call(this,e)||this;return n._disposingHandlers=[],n}return __extends(e,t),e.prototype.addDisposingHandler=function(t){this._disposingHandlers.push(t)},e.prototype.__dispose=function(){this._raiseDisposingEvent()},e.prototype._raiseDisposingEvent=function(){if(this._disposingHandlers.length>0)for(var t=new Autotask.DisposingEventArgs(this.id),e=0,n=this._disposingHandlers;e<n.length;e++){(0,n[e])(t)}},e}(Autotask.LifecycleObject);t.Editor=e}(AutotaskEditorSystem||(AutotaskEditorSystem={})),function(t){var e=function(){function e(e){this._editorId=e,this._requiredStateChangedHandlers=[],this._validationCorrectedHandlers=[],this._validationFailedHandlers=[],this._validationStateChangedHandlers=[],this._validationResult=new t.ValidResult}return Object.defineProperty(e.prototype,"validationResult",{get:function(){return this._validationResult},enumerable:!1,configurable:!0}),e.prototype.addRequiredStateChangedHandler=function(t){this._requiredStateChangedHandlers.push(t)},e.prototype.addValidationCorrectedHandler=function(t){this._validationCorrectedHandlers.push(t)},e.prototype.addValidationFailedHandler=function(t){this._validationFailedHandlers.push(t)},e.prototype.addValidationStateChangedHandler=function(t){this._validationStateChangedHandlers.push(t)},e.prototype._raiseRequiredStateChanged=function(){if(this._requiredStateChangedHandlers.length>0)for(var e=new t.RequiredStateChangedEventArgs(this._isRequired),n=0,i=this._requiredStateChangedHandlers;n<i.length;n++){(0,i[n])(e)}},e.prototype._raiseValidationCorrectedEvent=function(){if(this._validationCorrectedHandlers.length>0)for(var t=new AutotaskValidationSystem.ValidationCorrectedEventArgs(this._editorId),e=0,n=this._validationCorrectedHandlers;e<n.length;e++){(0,n[e])(t)}},e.prototype._raiseValidationFailedEvent=function(t,e,n,i,o){if(this._validationFailedHandlers.length>0)for(var a=new AutotaskValidationSystem.ValidationFailedEventArgs(this._editorId,t,e,n,i?1:0,o),r=0,s=this._validationFailedHandlers;r<s.length;r++){(0,s[r])(a)}},e.prototype._raiseValidationStateChangedEvent=function(){if(this._validationStateChangedHandlers.length>0)for(var e=new t.ValidationStateChangedEventArgs(this._validationResult.isValid),n=0,i=this._validationStateChangedHandlers;n<i.length;n++){(0,i[n])(e)}},e.prototype._updateValidationResult=function(t,e,n,i){var o=!this._validationResult.isValid&&t.isValid,a=o||this._validationResult.isValid&&!t.isValid;this._validationResult=t,o?this._raiseValidationCorrectedEvent():t.isValid||this._raiseValidationFailedEvent(t.detailedMessage,e,n,i,t.message),a&&this._raiseValidationStateChangedEvent()},e}();t.EditorValidation=e}(AutotaskEditorSystem||(AutotaskEditorSystem={})),function(t){var e=function(t){function e(e,n,i){var o=t.call(this,e)||this;return o._externalId=n,o._bindingPropertyName=i,o}return __extends(e,t),e.prototype._createRequestData=function(t,e,n){var i=null;return n&&(i=t.createRequestData()),null===i&&((i={})[this._bindingPropertyName]=""),i[this._bindingPropertyName+"_Id"]=this._externalId,i[this._bindingPropertyName+"_Type"]=e,i[this._bindingPropertyName+"_IsProtected"]=AutotaskRequestDataSystem.ValueSerializer.serializeBoolean(!n),i},e}(Autotask.LifecycleObject);t.MaskedUserDefinedField=e}(AutotaskEditorSystem||(AutotaskEditorSystem={})),function(t){var e=function(e){function n(t,n,i,o,a,r,s){var l=e.call(this,t)||this;return l._isEnabled=o,l._bindingPropertyName=a,l._isRequestDataProvidedWhenDisabled=r,l._numberBoxValidation=s,l._numberBoxValidation.addRequiredStateChangedHandler((function(){l._validationRequiredStateChanged()})),l._numberBoxValidation.addValidationCorrectedHandler((function(){l._validationCorrected()})),l._numberBoxValidation.addValidationFailedHandler((function(){l._validationFailed()})),l._blurHandlers=[],l._broadcastKeyUpHandlers=[],l._dirtyStateChangeHandlers=[],l._focusHandlers=[],l._tabbedAwayHandlers=[],l._tabbingAwayHandlers=[],l._inputElement=n,l._originalValue=i,l._value=l._originalValue,l._inputElement.addEventListener("blur",(function(){l._blurListener()})),l._inputElement.addEventListener("change",(function(){l._changeListener()})),l._inputElement.addEventListener("focus",(function(){l._focusListener()})),l._inputElement.addEventListener("input",(function(){l._inputListener()})),l._inputElement.addEventListener("keyup",(function(t){l._keyUpListener(t)})),l._invalidCssClass="Invalid",l._isChangeEventPending=!1,l._isDirty=!1,l._isFormatValid=!0,l._isTabKeyDownHandled=!1,l._isValidationFrequencyElevated=!1,l._isValidationOverdue=!0,l._isValidationOverlayDismissed=!1,l}return __extends(n,e),Object.defineProperty(n.prototype,"participantValidation",{get:function(){return this._numberBoxValidation},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isEnabled",{get:function(){return this._isEnabled},set:function(t){t!==this._isEnabled&&(this._setIsEnabled(t),t||this._isRequestDataProvidedWhenDisabled?this._isValidationFrequencyElevated&&this._validate(!1):(this._isValidationOverdue=!this._numberBoxValidation.validationResult.isValid,this._numberBoxValidation.resetValidationResult(this._inputElement)))},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isDirty",{get:function(){return this._isDirty},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"value",{get:function(){return this._value},set:function(t){if(t!==this._value){this._value=t;var e=this._convertNumberToDisplayString(this._value);this._inputElement.value=null===e?"":e,this._manageDirtyState(this._value)&&this._raiseDirtyStateChangeEvent(this._isDirty),this._isFormatValid=null===t||this._isANumber(t),this._isValidationOverdue=!0,this._isValidationFrequencyElevated&&this._validate(!1)}},enumerable:!1,configurable:!0}),n.prototype.addBlurHandler=function(t){this._blurHandlers.push(t)},n.prototype.addBroadcastKeyUpHandler=function(t){this._broadcastKeyUpHandlers.push(t)},n.prototype.addDirtyStateChangeHandler=function(t){this._dirtyStateChangeHandlers.push(t)},n.prototype.addFocusHandler=function(t){this._focusHandlers.push(t)},n.prototype.addTabbedAwayHandler=function(t){this._tabbedAwayHandlers.push(t)},n.prototype.addTabbingAwayHandler=function(t){var e=this;this._tabbingAwayHandlers.push(t),1===this._tabbingAwayHandlers.length&&this._inputElement.addEventListener("keydown",(function(t){e._keyDownListener(t)}))},n.prototype.clearValue=function(){this.value=null},n.prototype.createRequestData=function(){var t=null;if(null!==this._bindingPropertyName){var e=null;(this._isEnabled||this._isRequestDataProvidedWhenDisabled)&&(e=this._convertNumberToSerializedString(this._value)),(t={})[this._bindingPropertyName]=e}return t},n.prototype.focus=function(){this._inputElement.focus()},n.prototype.focusEnd=function(){this.focus()},n.prototype.focusStart=function(){this.focus()},n.prototype.removeFocus=function(){this._inputElement.blur()},n.prototype.resetValidation=function(){this._isValidationOverdue=!0},n.prototype.resetValue=function(){this.value=this._originalValue},n.prototype.validate=function(){return this._validate(!1)},n.prototype._changeListener=function(){if(this._raiseChangeEvent(),this._validate(!0),this._isFormatValid&&this._numberBoxValidation.validationResult.isValid){var t=this._convertNumberToDisplayString(this._value);this._inputElement.value=null===t?"":t}},n.prototype._isANumber=function(t){return!isNaN(t)},n.prototype._isInputElementTriggeringTabbedAway=function(t){return!0},n.prototype._isInputElementTriggeringTabbingAway=function(t){return!0},n.prototype._raiseBlurEvent=function(){for(var t=0,e=this._blurHandlers;t<e.length;t++){(0,e[t])()}},n.prototype._raiseBroadcastKeyUpEvent=function(e){if(this._broadcastKeyUpHandlers.length>0)for(var n=new t.BroadcastKeyUpEventArgs(this.id,e),i=0,o=this._broadcastKeyUpHandlers;i<o.length;i++){(0,o[i])(n)}},n.prototype._raiseFocusEvent=function(){for(var t=0,e=this._focusHandlers;t<e.length;t++){(0,e[t])()}},n.prototype._raiseTabbedAwayEvent=function(e,n){if(this._tabbedAwayHandlers.length>0)for(var i=new t.TabbedAwayEventArgs(this.id,e,n),o=0,a=this._tabbedAwayHandlers;o<a.length;o++){(0,a[o])(i)}},n.prototype._raiseTabbingAwayEvent=function(e,n){if(this._tabbingAwayHandlers.length>0)for(var i=new t.TabbingAwayEventArgs(this.id,e,n),o=0,a=this._tabbingAwayHandlers;o<a.length;o++){(0,a[o])(i)}},n.prototype._setIsEnabled=function(t){this._isEnabled=t,this._inputElement.disabled=!t},n.prototype._blurListener=function(){this._isTabKeyDownHandled=!1,this._isChangeEventPending&&(this._raiseChangeEvent(),this._isChangeEventPending=!1),this._raiseBlurEvent()},n.prototype._focusListener=function(){this._isValidationOverlayDismissed||!this._isValidationFrequencyElevated||this._isFormatValid&&this._numberBoxValidation.validationResult.isValid||this._showValidationOverlay(),this._raiseFocusEvent()},n.prototype._incrementOrDecrementValue=function(t,e){if(null!==this._value){var n=this._value,i=null,o=!1;t?(i=this._value+1,o=!0):e&&(i=this._value-1,o=!0),o&&(this._isChangeEventPending=!0,this._updateValue(i,n),this._isValidationOverdue=!0,this._validate(!0))}},n.prototype._inputListener=function(){this._isChangeEventPending=!1;var t=this._inputElement.value,e=this.value,n=this._isFormatValid,i=this._convertDisplayStringToNumber(t);if(this._isFormatValid=0===t.length||this._isANumber(i),this._value=this._isANumber(i)?i:null,this._value!==e){var o=this._manageDirtyState(this._value);this._raiseImmediateChangeEvent(e,this._value),o&&this._raiseDirtyStateChangeEvent(this._isDirty),this._isValidationOverdue=!0,this._isValidationFrequencyElevated&&this._validate(!0)}else this._isFormatValid!==n&&(this._isValidationOverdue=!0)},n.prototype._keyDownListener=function(t){AutotaskDomSystem.KeyCode.isTab(t.which)&&(this._isTabKeyDownHandled=!0,this._isInputElementTriggeringTabbingAway(t.shiftKey)&&this._raiseTabbingAwayEvent(t.shiftKey,(function(){t.preventDefault()})))},n.prototype._keyUpListener=function(t){var e=AutotaskDomSystem.KeyCode.isUp(t.which),n=AutotaskDomSystem.KeyCode.isDown(t.which);(e||n)&&t.preventDefault(),this._incrementOrDecrementValue(e,n),AutotaskDomSystem.KeyCode.isEnter(t.which)||AutotaskDomSystem.KeyCode.isEscape(t.which)?this._raiseBroadcastKeyUpEvent(t.which):AutotaskDomSystem.KeyCode.isTab(t.which)&&this._isTabKeyDownHandled&&this._isInputElementTriggeringTabbedAway(t.shiftKey)&&this._raiseTabbedAwayEvent(t.shiftKey,!0)},n.prototype._manageDirtyState=function(t){var e=!1;return this._isDirty&&t!==this._originalValue||(this._isDirty=!this._isDirty,e=!0),e},n.prototype._raiseDirtyStateChangeEvent=function(t){if(this._dirtyStateChangeHandlers.length>0)for(var e=new AutotaskDirtyStateSystem.DirtyStateChangeEventArgs(t),n=0,i=this._dirtyStateChangeHandlers;n<i.length;n++){(0,i[n])(e)}},n.prototype._showValidationOverlay=function(){var t=this;this._isValidationOverlayDismissed=!1,autotask.globalValidationOverlay.show(this._inputElement,this.id,this._numberBoxValidation.validationResult.message,!0,(function(){t._validationOverlayClosed()}),null)},n.prototype._updateValue=function(t,e){var n=this._inputElement.selectionStart,i=this._inputElement.selectionStart;this._value=t;var o=this._convertNumberToDisplayString(this._value);this._inputElement.value=null===o?"":o,null!==n&&null!==i&&this._inputElement.setSelectionRange(n,i);var a=this._manageDirtyState(this._value);this._raiseImmediateChangeEvent(e,this._value),a&&this._raiseDirtyStateChangeEvent(this._isDirty)},n.prototype._validate=function(t){var e=this._numberBoxValidation.validationResult.isValid;return this._isValidationOverdue&&(this._isRequestDataProvidedWhenDisabled||this._isEnabled)&&(e=this._numberBoxValidation.validate(this._value,this._isFormatValid,t,this._inputElement),this._isValidationOverdue=!1),e?autotask.globalValidationOverlay.hide(this.id):this._showValidationOverlay(),e},n.prototype._validationCorrected=function(){this._inputElement.classList.remove(this._invalidCssClass)},n.prototype._validationFailed=function(){this._inputElement.classList.add(this._invalidCssClass),this._isValidationFrequencyElevated=!0},n.prototype._validationOverlayClosed=function(){this._isValidationOverlayDismissed=!0},n.prototype._validationRequiredStateChanged=function(){this.resetValidation(),this._isValidationFrequencyElevated&&this._validate(!0)},n}(t.Editor);t.NumberBox=e}(AutotaskEditorSystem||(AutotaskEditorSystem={})),function(t){var e=function(){function t(t){this._isRequired=t}return Object.defineProperty(t.prototype,"isRequired",{get:function(){return this._isRequired},enumerable:!1,configurable:!0}),t}();t.RequiredStateChangedEventArgs=e}(AutotaskEditorSystem||(AutotaskEditorSystem={})),function(t){var e=function(){function t(t,e,n){this._instanceId=t,this._isShiftKeyPressed=e,this._isChangeEventPending=n}return Object.defineProperty(t.prototype,"instanceId",{get:function(){return this._instanceId},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isChangeEventPending",{get:function(){return this._isChangeEventPending},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isShiftKeyPressed",{get:function(){return this._isShiftKeyPressed},enumerable:!1,configurable:!0}),t}();t.TabbedAwayEventArgs=e}(AutotaskEditorSystem||(AutotaskEditorSystem={})),function(t){var e=function(){function t(t,e,n){this._instanceId=t,this._isShiftKeyPressed=e,this._cancelDelegate=n}return Object.defineProperty(t.prototype,"instanceId",{get:function(){return this._instanceId},enumerable:!1,configurable:!0}),t.prototype.cancel=function(){this._cancelDelegate()},Object.defineProperty(t.prototype,"isShiftKeyPressed",{get:function(){return this._isShiftKeyPressed},enumerable:!1,configurable:!0}),t}();t.TabbingAwayEventArgs=e}(AutotaskEditorSystem||(AutotaskEditorSystem={})),function(t){var e=function(t){function e(e,n,i){var o=t.call(this,e)||this;return o._externalId=n,o._bindingPropertyName=i,o}return __extends(e,t),e.prototype._createRequestData=function(t,e,n){var i=t.createRequestData();return null===i&&(i={}),i[this._bindingPropertyName+"_Id"]=this._externalId,i[this._bindingPropertyName+"_Type"]=e,i[this._bindingPropertyName+"_IsProtected"]=AutotaskRequestDataSystem.ValueSerializer.serializeBoolean(n),i},e}(Autotask.LifecycleObject);t.UserDefinedField=e}(AutotaskEditorSystem||(AutotaskEditorSystem={})),function(t){var e=function(){function t(t){this._isValid=t}return Object.defineProperty(t.prototype,"isValid",{get:function(){return this._isValid},enumerable:!1,configurable:!0}),t}();t.ValidationStateChangedEventArgs=e}(AutotaskEditorSystem||(AutotaskEditorSystem={})),function(t){var e=function(){function t(){}return t.prototype.attemptAdditiveSearchForElement=function(t,e,n,i){var o=!1,a=i.length;if(t<=a){var r=i.substring(0,t),s=i.charAt(t-1);e.toLowerCase()===s.toLowerCase()&&(this.highlightText(n,i,r,a,t),o=!0)}return o},t.prototype.attemptNewSearchForElement=function(t,e,n,i){var o=!1,a=i.substring(0,e);return a.toLowerCase()===t.toLowerCase()&&(this.highlightText(n,i,a,i.length,e),o=!0),o},t.prototype.clearHighlighting=function(t,e){for(var n=document.createTextNode(e);null!==t.firstChild;)t.removeChild(t.firstChild);t.appendChild(n)},t.prototype.highlightSubtractiveSearchForElement=function(t,e,n){var i=n.substring(0,t);this.highlightText(e,n,i,n.length,t)},t.prototype.highlightText=function(t,e,n,i,o){var a=e.substring(o,i),r=document.createElement("mark");r.textContent=n;for(var s=document.createTextNode(a);null!==t.firstChild;)t.removeChild(t.firstChild);t.appendChild(r),t.appendChild(s)},t}();t.ItemSearchServices=e}(AutotaskEditorSystem||(AutotaskEditorSystem={})),function(t){var e=function(e){function n(n,i){var o=e.call(this,n)||this;o._isVisible=!1,o._launchingElement=null,o._launchingElementStyleApplicator=null,o._hideTimer=new t.Timer((function(){o._onHiding()})),o._showTimer=new t.Timer((function(){o._onShowing()})),o._hidingHandlers=new Array,o._hideCompletedHandlers=new Array,o._positioningHandlers=new Array,o._showingHandlers=new Array,o._showCompletedHandlers=new Array;var a=AutotaskDomSystem.Document.getElementById(n),r=AutotaskDomSystem.Document.getChildElementByClassName(a,"ContextOverlay");if(o._overlayElement=r,o._overlayElementAnalyzer=new t.ElementAnalyzer(r),o._overlayStyleApplicator=new t.ElementStyleApplicator(r),i){r.addEventListener("mouseenter",(function(){null!==o._launchingElement&&o._show(o._launchingElement)}));r.addEventListener("mouseleave",(function(){o.hide()}))}return o}return __extends(n,e),Object.defineProperty(n.prototype,"isVisible",{get:function(){return this._isVisible},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"_overlayElementStyleApplicator",{get:function(){return this._overlayStyleApplicator},enumerable:!1,configurable:!0}),n.prototype.addHidingHandler=function(t){this._hidingHandlers.push(t)},n.prototype.addHideCompletedHandler=function(t){this._hideCompletedHandlers.push(t)},n.prototype.addPositioningHandler=function(t){this._positioningHandlers.push(t)},n.prototype.addShowingHandler=function(t){this._showingHandlers.push(t)},n.prototype.addShowCompletedHandler=function(t){this._showCompletedHandlers.push(t)},n.prototype.clearHideCompletedHandlers=function(){this._hideCompletedHandlers=[]},n.prototype.clearShowingHandlers=function(){this._showingHandlers=[]},n.prototype.hide=function(){this._showTimer.isRunning&&this._showTimer.cancel(),this._isVisible&&!this._hideTimer.isRunning&&this._hideTimer.start(this._delayBeforeHiding,this._launchingElement)},n.prototype.isElementAssociated=function(e){var n=this._overlayElementAnalyzer.isSameElement(e)||this._overlayElementAnalyzer.isDescendant(e);if(!n&&null!==this._launchingElement){var i=new t.ElementAnalyzer(this._launchingElement);n=i.isSameElement(e)||i.isDescendant(e)}return n},n.prototype.__dispose=function(){this._showTimer.isRunning?this._showTimer.cancel():this._hideTimer.isRunning&&this._hideTimer.cancel()},n.prototype.__hideWithoutDelay=function(){this._showTimer.isRunning?this._showTimer.cancel():this._hideTimer.isRunning&&this._hideTimer.cancel(),this._onHiding()},n.prototype.__reposition=function(){this._isVisible&&this._onPositioning(!0)},n.prototype._getChildElementByClassName=function(t){return AutotaskDomSystem.Document.getChildElementByClassName(this._overlayElement,t)},n.prototype._show=function(t){this._showTimer.isRunning?this._showTimer.associatedElement!==t&&(this._showTimer.cancel(),this._isVisible&&this._launchingElement===t||this._startShowTimer(t)):this._hideTimer.isRunning?this._hideTimer.associatedElement===t?this._hideTimer.cancel():(this._hideTimer.cancel(),this._makeInvisible(),this._startShowTimer(t)):this._isVisible&&this._launchingElement===t||this._startShowTimer(t)},n.prototype._makeInvisible=function(){this._styleCoordinator.hide(),this._isVisible=!1,window.autotask.contextOverlayManagement.__unregisterVisibleContextOverlay(this)},n.prototype._onHiding=function(){for(var t=0,e=this._hidingHandlers;t<e.length;t++){(0,e[t])()}this._makeInvisible(),this._onHideCompleted()},n.prototype._onHideCompleted=function(){for(var t=0,e=this._hideCompletedHandlers;t<e.length;t++){(0,e[t])()}this._launchingElement=null,this._launchingElementStyleApplicator=null},n.prototype._onPositioning=function(e){for(var n=0,i=this._positioningHandlers;n<i.length;n++){(0,i[n])()}var o=this._launchingElement,a=new t.ElementAnalyzer(o),r=this._launchingElementStyleApplicator;r.reset(),this._createPositionCoordinator(r).applyPosition(a,this._overlayElementAnalyzer),e||this._onShowCompleted()},n.prototype._onShowing=function(){for(var e=new t.ShowingEventArgs,n=0,i=this._showingHandlers;n<i.length;n++){(0,i[n])(e)}this._makeVisible(e.allowedConcurrentOverlays),this._onPositioning(!1)},n.prototype._onShowCompleted=function(){for(var t=0,e=this._showCompletedHandlers;t<e.length;t++){(0,e[t])()}},n.prototype._makeVisible=function(t){this._styleCoordinator.show(),this._isVisible=!0,window.autotask.contextOverlayManagement.__registerVisibleContextOverlay(this,t)},n.prototype._startShowTimer=function(e){this._showTimer.start(this._delayBeforeShowing,e),this._launchingElement=e,this._launchingElementStyleApplicator=new t.ElementStyleApplicator(e)},n}(Autotask.LifecycleObject);t.ContextOverlay=e}(AutotaskOverlaySystem||(AutotaskOverlaySystem={})),function(t){var e=function(t){function e(e){var n=t.call(this,e,!0)||this;n._defaultStyleCoordinator=new AutotaskOverlaySystem.DefaultStyleCoordinator(n._overlayElementStyleApplicator);var i=AutotaskDomSystem.Document.getElementById(e);return n._contentElement=i.querySelector(".Content"),n._loadingIndicatorElement=AutotaskDomSystem.Document.firstElementChild(n._contentElement),n}return __extends(e,t),Object.defineProperty(e.prototype,"_delayBeforeHiding",{get:function(){return 300},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_delayBeforeShowing",{get:function(){return 750},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_styleCoordinator",{get:function(){return this._defaultStyleCoordinator},enumerable:!1,configurable:!0}),e.prototype.applyContent=function(t){this._contentElement.insertAdjacentHTML("beforeend",t),this._hideLoadingIndicator()},e.prototype.hideLoadingIndicator=function(){this._hideLoadingIndicator()},e.prototype.removeContent=function(){this._removeContent()},e.prototype.show=function(t){this._show(t)},e.prototype.showLoadingIndicator=function(){this._showLoadingIndicator()},e.prototype._createPositionCoordinator=function(t){var e=new AutotaskOverlaySystem.PositionCoordinator,n=new AutotaskPositionSystem.BottomAlignedLeft(0,2),i=new AutotaskPositionApplicatorSystem.Default(this._defaultStyleCoordinator,t,null,null);e.addPositionAndApplicator(n,i);var o=new AutotaskPositionSystem.TopAlignedLeft(0,-10),a=new AutotaskPositionApplicatorSystem.Default(this._defaultStyleCoordinator,t,"Top",null);return e.addPositionAndApplicator(o,a),e},e.prototype._hideLoadingIndicator=function(){this._loadingIndicatorElement.classList.remove("Active")},e.prototype._removeContent=function(){this._contentElement.children.length>1&&null!==this._contentElement.lastElementChild&&this._contentElement.removeChild(this._contentElement.lastElementChild)},e.prototype._showLoadingIndicator=function(){this._loadingIndicatorElement.classList.add("Active")},e}(AutotaskOverlaySystem.ContextOverlay);t.ChipContextOverlay=e}(AutotaskEditorSystem||(AutotaskEditorSystem={})),function(t){var e=function(){function t(t){var e=this;this._overlay=t,this._allowedConcurrentlyVisibleOverlays=[],this._route=null,this._selectionValue=null,this._overlay.addShowingHandler((function(t){e._overlayShowingHandler(t)})),this._overlay.addHideCompletedHandler((function(){e._overlayHideCompletedHandler()}))}return Object.defineProperty(t.prototype,"isOverlayVisible",{get:function(){return this._overlay.isVisible},enumerable:!1,configurable:!0}),t.prototype.addAllowedConcurrentlyVisibleOverlay=function(t){this._allowedConcurrentlyVisibleOverlays.push(t)},t.prototype.hideOverlay=function(){this._overlay.hide()},t.prototype.showOverlay=function(t,e,n){this._route=t,this._selectionValue=n,this._overlay.show(e)},t.prototype._overlayHideCompletedHandler=function(){this._overlay.removeContent(),this._overlay.hideLoadingIndicator()},t.prototype._overlayShowingHandler=function(t){var e=this;if(this._overlay.showLoadingIndicator(),null!==this._selectionValue&&null!==this._route){for(var n=0,i=this._allowedConcurrentlyVisibleOverlays;n<i.length;n++){var o=i[n];t.allowConcurrentOverlay(o)}this._route.requestContent(this._selectionValue,(function(t){e._successHandler(t)})),this._route=null,this._selectionValue=null}},t.prototype._successHandler=function(t){this._overlay.applyContent(t)},t}();t.ChipContextOverlayCoordinator=e}(AutotaskEditorSystem||(AutotaskEditorSystem={})),function(t){var e=function(){function t(t,e){this._text=t,this._iconGenerator=e}return t.prototype.generateChipElement=function(e){for(var n=document.createElement("div"),i=0,o=this._createChipCssClasses();i<o.length;i++){var a=o[i];n.classList.add(a)}null!==this._iconGenerator&&n.appendChild(this._iconGenerator.generateIconElement()),e&&n.setAttribute("data-is-overlay-enabled",t._trueAttributeValue);var r=document.createElement("div");r.classList.add(t._textCssClass),r.appendChild(document.createTextNode(this._text)),n.appendChild(r);var s=document.createElement("div");s.classList.add(t._removeButtonCssClass);var l=document.createElement("div");return l.classList.add(t._removeButtonIconCssClass),s.appendChild(l),n.appendChild(s),n},t.prototype._createChipCssClasses=function(){return[t._chipCssClass]},t.clearSelection=function(e){e.classList.remove(t._selectedCssClass)},t.getChipElements=function(e){return AutotaskDomSystem.Document.getChildElementsByClassName(e,t._chipCssClass)},t.getContextOverlayElement=function(e,n){for(var i=e,o=null;null!==i&&i.className!==n;){if(i.classList.contains(t._chipCssClass)){"True"===i.dataset.isOverlayEnabled&&(o=i);break}i=i.parentElement}return o},t.getText=function(e){var n=AutotaskDomSystem.Document.getChildElementByClassName(e,t._textCssClass);return null===n.textContent?autotask.throwException("Unexpected chip text."):n.textContent},t.isContextOverlayEnabled=function(e){return e.dataset.isOverlayEnabled===t._trueAttributeValue},t.isSelected=function(e){return e.classList.contains(t._selectedCssClass)},t.isTargetingRemoveButton=function(e){return e.classList.contains(t._removeButtonCssClass)||e.classList.contains(t._removeButtonIconCssClass)},t.select=function(e){e.classList.add(t._selectedCssClass)},t._chipCssClass="Chip",t._removeButtonCssClass="RemoveButton",t._removeButtonIconCssClass="RemoveIcon",t._selectedCssClass="Selected",t._textCssClass="Text",t._trueAttributeValue="True",t}();t.ChipGenerator=e}(AutotaskEditorSystem||(AutotaskEditorSystem={})),function(t){var e=function(){function e(e,n,i,o){var a=this;this._chipListElement=AutotaskDomSystem.Document.getElementById(e),this._originalChipElements=t.ChipGenerator.getChipElements(this._chipListElement),i.length!==this._originalChipElements.length&&autotask.throwException("Unexpected chip list construction."),this._chipListElement.addEventListener("click",(function(){a._chipListClickListener()})),this._chipListElement.addEventListener("mousedown",(function(t){a._chipListMouseDownListener(t)})),this._chipClickListener=function(t){a._chipClick(t)},this._chipMouseOutListener=function(){a._chipMouseOut()},this._chipMouseOverListener=function(t){a._chipMouseOver(t)},this._values=[];for(var r=0;r<i.length;r++)this._values.push(i[r].value),this._addChipEventListeners(this._originalChipElements[r],i[r].isOverlayEnabled);this._isEnabled=n,this._originalChipInformation=t.ArrayCopier.copy(i,(function(t){return t.copy()})),this._contextOverlay=o,this._chipRemovedHandlers=[],this._chipRemovingHandlers=[],this._contextOverlayCoordinator=null,this._focusHandlers=[],this._isSelectionEnabled=!1,this._mouseDownHandler=null,this._selectedChipValue=null,this._selectionChangedHandlers=[]}return Object.defineProperty(e.prototype,"height",{get:function(){return this._chipListElement.clientHeight},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isEnabled",{get:function(){return this._isEnabled},set:function(t){t!==this._isEnabled&&(this._isEnabled=t,this._isEnabled?this._chipListElement.classList.remove("Disabled"):this._chipListElement.classList.add("Disabled"))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isSelectionEnabled",{set:function(t){this._isSelectionEnabled=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"selectedChipValue",{get:function(){return this._selectedChipValue},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"values",{get:function(){return this._values},enumerable:!1,configurable:!0}),e.prototype.addAllowedConcurrentlyVisibleOverlay=function(t){null!==this._contextOverlayCoordinator&&this._contextOverlayCoordinator.addAllowedConcurrentlyVisibleOverlay(t)},e.prototype.addChipRemovedHandler=function(t){this._chipRemovedHandlers.push(t)},e.prototype.addChipRemovingHandler=function(t){this._chipRemovingHandlers.push(t)},e.prototype.addFocusHandler=function(t){this._focusHandlers.push(t)},e.prototype.addSelectionChangedHandler=function(t){this._selectionChangedHandlers.push(t)},e.prototype.clear=function(){this._clear()},e.prototype.contains=function(t){return null!==this._findIndexByValue(t)},e.prototype.getTextByValue=function(e){var n=null;if(this._values.length>0){var i=this._findIndexByValue(e);if(null===i)return autotask.throwException("The item value was not found.");var o=t.ChipGenerator.getChipElements(this._chipListElement);n=t.ChipGenerator.getText(o[i])}return n},e.prototype.removeByValue=function(t){if(this._values.length>0){var e=this._findIndexByValue(t);if(null===e)return autotask.throwException("The item value was not found.");this._hideOverlay(),this._removeByIndex(e)}},e.prototype.setMouseDownHandler=function(t){this._mouseDownHandler=t},e.prototype._blur=function(){this._chipListElement.classList.remove("Focused")},e.prototype._enableContextOverlay=function(){this._contextOverlayCoordinator=new t.ChipContextOverlayCoordinator(this._contextOverlay)},e.prototype._focus=function(){this._chipListElement.classList.add("Focused")},e.prototype._insert=function(e){var n=this._findIndexByValue(e.value),i=e.chipGenerator.generateChipElement(e.isOverlayEnabled);if(this._addChipEventListeners(i,e.isOverlayEnabled),null===n)this._values.push(e.value),this._chipListElement.appendChild(i);else{var o=t.ChipGenerator.getChipElements(this._chipListElement);this._removeChipEventListeners(o[n]),this._chipListElement.insertBefore(i,o[n]),this._chipListElement.removeChild(o[n])}return n},e.prototype._clear=function(){this._hideOverlay(),this._values=[],this._removeChips()},e.prototype._findIndexByValue=function(t){for(var e=null,n=0,i=0,o=this._values;i<o.length;i++){var a=o[i];AutotaskItemSelectionSystem.ItemValueComparer.equals(t,a)&&(e=n),n++}return e},e.prototype._removeByIndex=function(e){this._values.splice(e,1);var n=t.ChipGenerator.getChipElements(this._chipListElement);this._removeChipEventListeners(n[e]),this._chipListElement.removeChild(n[e])},e.prototype._reset=function(){this._removeChips(),this._values.splice(0);for(var t=0;t<this._originalChipInformation.length;t++)this._values.push(this._originalChipInformation[t].value),this._addChipEventListeners(this._originalChipElements[t],this._originalChipInformation[t].isOverlayEnabled)},e.prototype._addChipEventListeners=function(t,e){t.addEventListener("click",this._chipClickListener),e&&(t.addEventListener("mouseout",this._chipMouseOutListener),t.addEventListener("mouseover",this._chipMouseOverListener))},e.prototype._chipClick=function(e){if(this._isEnabled){var n=e.target,i=e.currentTarget,o=this._findIndexByChip(i),a=this._values[o];if(t.ChipGenerator.isTargetingRemoveButton(n)){this._hideOverlay(),e.stopPropagation();var r=this._isSelectionEnabled&&t.ChipGenerator.isSelected(i);this._hideOverlay(),this._raiseChipRemovingEvent(a),this._removeByIndex(o),this._raiseChipRemovedEvent(a),r&&(this._selectedChipValue=null,this._raiseSelectionChangedEvent(null))}else{if(this._isSelectionEnabled){var s=null!==this._selectedChipValue?this._findIndexByValue(this._selectedChipValue):null;if(null!==s){var l=this._findChipByIndex(s);t.ChipGenerator.clearSelection(l)}this._selectedChipValue=null,o!==s&&(t.ChipGenerator.select(i),this._selectedChipValue=a),this._raiseSelectionChangedEvent(this._selectedChipValue)}this._raiseFocusEvent()}}},e.prototype._chipListClickListener=function(){this._isEnabled&&this._raiseFocusEvent()},e.prototype._chipListMouseDownListener=function(t){this._isEnabled&&this._raiseMouseDownEvent(),t.stopImmediatePropagation(),t.preventDefault()},e.prototype._chipMouseOut=function(){this._hideOverlay()},e.prototype._chipMouseOver=function(e){if(null!==this._contextOverlayCoordinator&&!this._contextOverlayCoordinator.isOverlayVisible){var n=t.ChipGenerator.getContextOverlayElement(e.currentTarget,this._chipListElement.className);if(null!==n){var i=this._findIndexByChip(n),o=this._determineContextOverlayRoute(i);this._contextOverlayCoordinator.showOverlay(o,n,this._values[i])}}},e.prototype._findIndexByChip=function(e){for(var n=0,i=0,o=t.ChipGenerator.getChipElements(this._chipListElement);i<o.length;i++){if(e===o[i])return n;n++}return autotask.throwException("The item value was not found.")},e.prototype._findChipByIndex=function(e){var n=t.ChipGenerator.getChipElements(this._chipListElement);return(e<0||e>=n.length)&&autotask.throwException("ChipList: index out of range."),n[e]},e.prototype._hideOverlay=function(){null!==this._contextOverlayCoordinator&&this._contextOverlayCoordinator.hideOverlay()},e.prototype._raiseChipRemovedEvent=function(e){if(this._chipRemovedHandlers.length>0)for(var n=new t.ChipListChipRemovedEventArgs(e),i=0,o=this._chipRemovedHandlers;i<o.length;i++){(0,o[i])(n)}},e.prototype._raiseChipRemovingEvent=function(e){if(this._chipRemovingHandlers.length>0)for(var n=new t.ChipListChipRemovingEventArgs(e),i=0,o=this._chipRemovingHandlers;i<o.length;i++){(0,o[i])(n)}},e.prototype._raiseFocusEvent=function(){for(var t=0,e=this._focusHandlers;t<e.length;t++){(0,e[t])()}},e.prototype._raiseMouseDownEvent=function(){null!==this._mouseDownHandler&&this._mouseDownHandler()},e.prototype._raiseSelectionChangedEvent=function(e){if(this._selectionChangedHandlers.length>0)for(var n=new t.ChipListSelectionChangedEventArgs(e),i=0,o=this._selectionChangedHandlers;i<o.length;i++){(0,o[i])(n)}},e.prototype._removeChips=function(){for(var e=0,n=t.ChipGenerator.getChipElements(this._chipListElement);e<n.length;e++){var i=n[e];this._removeChipEventListeners(i),this._chipListElement.removeChild(i)}},e.prototype._removeChipEventListeners=function(e){t.ChipGenerator.isContextOverlayEnabled(e)&&(e.removeEventListener("click",this._chipClickListener),e.removeEventListener("mouseout",this._chipMouseOutListener),e.removeEventListener("mouseover",this._chipMouseOverListener))},e}();t.ChipList=e}(AutotaskEditorSystem||(AutotaskEditorSystem={})),function(t){var e=function(){function t(t){this._value=t}return Object.defineProperty(t.prototype,"value",{get:function(){return this._value},enumerable:!1,configurable:!0}),t}();t.ChipListChipClickEventArgs=e}(AutotaskEditorSystem||(AutotaskEditorSystem={})),function(t){var e=function(){function t(t){this._value=t}return Object.defineProperty(t.prototype,"value",{get:function(){return this._value},enumerable:!1,configurable:!0}),t}();t.ChipListChipRemovedEventArgs=e}(AutotaskEditorSystem||(AutotaskEditorSystem={})),function(t){var e=function(){function t(t){this._value=t}return Object.defineProperty(t.prototype,"value",{get:function(){return this._value},enumerable:!1,configurable:!0}),t}();t.ChipListChipRemovingEventArgs=e}(AutotaskEditorSystem||(AutotaskEditorSystem={})),function(t){var e=function(){function t(t){this._value=t}return Object.defineProperty(t.prototype,"value",{get:function(){return this._value},enumerable:!1,configurable:!0}),t}();t.ChipListSelectionChangedEventArgs=e}(AutotaskEditorSystem||(AutotaskEditorSystem={})),function(t){var e=function(){function t(){}return t.prototype.generate=function(){var t=document.createElement("div");t.className=this.cssClasses;var e=this._generateNestedElement();return null!==e&&t.appendChild(e),t},t.prototype._generateNestedElement=function(){return null},t}();t.IconGenerator=e}(AutotaskEditorSystem||(AutotaskEditorSystem={})),function(t){var e=function(){function t(){this._data={}}return Object.defineProperty(t.prototype,"data",{get:function(){return this._data},enumerable:!1,configurable:!0}),t.prototype.add=function(t,e){this._validateKey(t),null!==e&&(this._data[t]=e)},t.prototype.addBoolean=function(t,e){if(this._validateKey(t),null!==e){if("boolean"!=typeof e)return autotask.throwException("The value must an instance of Boolean.");this._data[t]=e.toString()}else this._data[t]=null},t.prototype.addDataDictionary=function(t,e){if(this._validateKey(t),null!==e){if(!(e instanceof AutotaskRequestDataSystem.RequestDataDictionary))return autotask.throwException("The value must be an instance of AutotaskRequestDataSystem.RequestDataDictionary.");var n=e.data;for(var i in n)n.hasOwnProperty(i)&&(this._data[t.concat(".",i)]=n[i])}else this._data[t]=null},t.prototype.deprecatedAddDataDictionary=function(t,e){if(this._validateKey(t),null!==e){if(!(e instanceof AutotaskRequestDataSystem.RequestDataDictionary))return autotask.throwException("The value must be an instance of AutotaskRequestDataSystem.RequestDataDictionary.");var n=e.data;for(var i in n)n.hasOwnProperty(i)&&(this._data[i]=n[i])}else this._data[t]=null},t.prototype.addInteger=function(t,e){if(this._validateKey(t),null!==e){if("number"!=typeof e)return autotask.throwException("The value must be an instance of Number.");this._data[t]=window.autotask.convert.integerToString(e)}else this._data[t]=null},t.prototype.addItemValue=function(t,e){if(this._validateKey(t),null!==e){e instanceof AutotaskItemSelectionSystem.ItemValue||autotask.throwException("value must be an instance of AutotaskRequestDataSystem.SerializedRequestData.");var n=e.__createRequestData(t);for(var i in n)n.hasOwnProperty(i)&&(this._data[i]=n[i])}else this._data[t]=null},t.prototype.addItemValueCollection=function(t,e){if(this._validateKey(t),null!==e){e instanceof AutotaskItemSelectionSystem.ItemValueCollection||autotask.throwException("value must be an instance of AutotaskRequestDataSystem.SerializedRequestData.");var n=e.__createRequestData(t);for(var i in n)n.hasOwnProperty(i)&&(this._data[i]=n[i])}else this._data[t]=null},t.prototype.addString=function(t,e){if(this._validateKey(t),null!==e&&"string"!=typeof e)return autotask.throwException("The value must be an instance of String.");this._data[t]=e},t.prototype._validateKey=function(t){this.data.hasOwnProperty(t)&&autotask.throwException("The ajax data dictionary already has an entry for the key: "+t)},t}();t.ApplyFiltersEventArgs=e}(AutotaskDataSelector||(AutotaskDataSelector={})),function(t){var e=function(t){function e(e,n){return t.call(this,e,n)||this}return __extends(e,t),e}(AutotaskEditorSystem.ChipGenerator);t.ChipGenerator=e}(AutotaskDataSelector||(AutotaskDataSelector={})),function(t){var e=function(){function e(e,n,i,o){this._value=e,this._text=n,this._isOverlayEnabled=i,this._iconGenerator=o,this._chipGenerator=new t.ChipGenerator(n,o)}return Object.defineProperty(e.prototype,"chipGenerator",{get:function(){return this._chipGenerator},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isOverlayEnabled",{get:function(){return this._isOverlayEnabled},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"overlayRoute",{get:function(){return null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!1,configurable:!0}),e.prototype.copy=function(){return new e(this._value,this._text,this.isOverlayEnabled,this._iconGenerator)},e}();t.ChipInformation=e}(AutotaskDataSelector||(AutotaskDataSelector={})),function(t){var e=function(){function t(t,e,n,i){this._item=t,this._chipInformation=e,this._selectDelegate=n,this._unselectDelegate=i}return Object.defineProperty(t.prototype,"isSelected",{get:function(){return this._item.isSelected},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"itemValue",{get:function(){return this._item.value},enumerable:!1,configurable:!0}),t.prototype.createChipInformation=function(){return this._chipInformation},t.prototype.select=function(){this._selectDelegate()},t.prototype.unselect=function(){this._unselectDelegate()},t}();t.ItemClickEventArgs=e}(AutotaskDataSelector||(AutotaskDataSelector={})),function(t){var e=function(t){function e(e,n){var i=t.call(this,e)||this;return i._itemCreators=n,i}return __extends(e,t),Object.defineProperty(e.prototype,"itemCreators",{get:function(){return this._itemCreators},enumerable:!1,configurable:!0}),e}(Autotask.LifecycleObject);t.ItemCreatorContainer=e}(AutotaskDataSelector||(AutotaskDataSelector={})),function(t){var e=function(){function t(t){this._items=t,this._previousSearchText=null}return t.prototype.search=function(t){var e=null,n=!1,i=t.length;if(null!==this._previousSearchText&&i>0){var o=this._previousSearchText.length;if(i-1===o){if(t.substring(0,o)===this._previousSearchText){var a=t.charAt(o);e=this._performAdditiveSearch(t,i,a),n=!0}}else i+1===o&&t===this._previousSearchText.substring(0,i)&&(e=this._performSubtractiveSearch(t,i),n=!0);n||(e=this._performNewSearch(t,i)),this._previousSearchText=t}else null!==this._previousSearchText&&0===i?(this._clearHighlighting(),this._previousSearchText=null):(e=this._performNewSearch(t,i),this._previousSearchText=t);return null!==e},t.prototype._clearHighlighting=function(){for(var t=0,e=this._items;t<e.length;t++){e[t].clearHighlighting()}},t.prototype._performAdditiveSearch=function(t,e,n){for(var i=null,o=0;o<this._items.length;o++){this._items[o].performAdditiveSearch(t,e,n)&&null===i&&(i=o)}return i},t.prototype._performNewSearch=function(t,e){for(var n=null,i=0;i<this._items.length;i++){this._items[i].performNewSearch(t,e)&&null===n&&(n=i)}return n},t.prototype._performSubtractiveSearch=function(t,e){for(var n=null,i=0;i<this._items.length;i++){this._items[i].performSubtractiveSearch(t,e)&&null===n&&(n=i)}return n},t}();t.ItemListSearchCoordinator=e}(AutotaskDataSelector||(AutotaskDataSelector={})),function(t){var e=function(){function t(t,e){this._items=t,this._scrollCoordinator=e,this._targetedItemIndex=null}return Object.defineProperty(t.prototype,"targetedItem",{get:function(){var t=null;return null!==this._targetedItemIndex&&(t=this._items[this._targetedItemIndex]),t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"targetedItemIndex",{get:function(){return this._targetedItemIndex},enumerable:!1,configurable:!0}),t.prototype.moveTargetDown=function(){if(null!==this._targetedItemIndex&&this._targetedItemIndex!==this._items.length-1){var t=this._targetedItemIndex+1;this.targetItemByIndex(t);var e=this._items[t];this._scrollCoordinator.scroll(e.displayHeight,e.offsetTop)}},t.prototype.moveTargetUp=function(){if(null!==this._targetedItemIndex&&0!==this._targetedItemIndex){var t=this._targetedItemIndex-1;this.targetItemByIndex(t);var e=this._items[t];this._scrollCoordinator.scroll(e.displayHeight,e.offsetTop)}},t.prototype.removeTargeting=function(){null!==this._targetedItemIndex&&(this._items[this._targetedItemIndex].removeTargeting(),this._targetedItemIndex=null)},t.prototype.targetFirstItem=function(){0!==this._items.length&&this.targetItemByIndex(0)},t.prototype.targetItemByIndex=function(t){t!==this._targetedItemIndex&&(this.removeTargeting(),this._items[t].target(),this._targetedItemIndex=t)},t}();t.ItemListTargetCoordinator=e}(AutotaskDataSelector||(AutotaskDataSelector={})),function(t){var e=function(){function t(t){this._scrollableOverlay=t}return t.prototype.scroll=function(t,e){var n=this._scrollableOverlay.contentHeight;if(n>0){var i=this._scrollableOverlay.contentScrollTop;e<i?this._scrollableOverlay.scrollContent(e):e+t>n+i&&this._scrollableOverlay.scrollContent(e+t-n)}},t}();t.ItemOverlayScrollCoordinator=e}(AutotaskEditorSystem||(AutotaskEditorSystem={})),function(t){var e=function(){function t(t,e,n,i){var o=this;this._itemElement=t,this._chipInformation=e,this._clickDelegate=n,this._mouseOverDelegate=i;var a=AutotaskDomSystem.Document.getChildElementsByClassName(t,"Text");this._leftHalfTextElement=a[0],this._rightHalfTextElement=a[1],this._leftHalfOriginalText=this._leftHalfTextElement.textContent,this._rightHalfOriginalText=this._rightHalfTextElement.textContent,this._areInitialsMatched=!1,this._isLeftTextMatched=!1,this._isRightTextMatched=!1,this._isSelected=!1,this._itemSearchServices=new AutotaskEditorSystem.ItemSearchServices,this._itemElement.addEventListener("click",(function(){o._itemClickListener()})),this._itemElement.addEventListener("mouseover",(function(){o._itemMouseOverListener()}))}return Object.defineProperty(t.prototype,"chipInformation",{get:function(){return this._chipInformation},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"displayHeight",{get:function(){return this._itemElement.clientHeight},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"offsetTop",{get:function(){return this._itemElement.offsetTop},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return this._chipInformation.value},enumerable:!1,configurable:!0}),t.prototype.clearHighlighting=function(){(this._isLeftTextMatched||this._areInitialsMatched)&&this._clearLeftHalfHighlighting(),(this._isRightTextMatched||this._areInitialsMatched)&&this._clearRightHalfHighlighting(),this._areInitialsMatched&&(this._areInitialsMatched=!1)},t.prototype.dispose=function(){this._clickDelegate=null,this._mouseOverDelegate=null},t.prototype.performAdditiveSearch=function(t,e,n){var i=!0,o=!0,a=!0,r=!1,s=!0,l=!1;return this._isLeftTextMatched&&(r=this._itemSearchServices.attemptAdditiveSearchForElement(e,n,this._leftHalfTextElement,this._leftHalfOriginalText))&&(i=!1,a=!1),this._isRightTextMatched&&(l=this._itemSearchServices.attemptAdditiveSearchForElement(e,n,this._rightHalfTextElement,this._rightHalfOriginalText))&&(o=!1,s=!1),this._areInitialsMatched=this._attemptInitialHighlighting(t,e,a,s),this._clearHighlighting(this._areInitialsMatched,i,o),r||l||this._areInitialsMatched},t.prototype.performNewSearch=function(t,e){var n=!0,i=!0,o=!0,a=!0,r=this._attemptNewSearchForLeftTextElement(t,e);r&&(n=!1,o=!1);var s=this._attemptNewSearchForRightTextElement(t,e);return s&&(i=!1,a=!1),this._areInitialsMatched=this._attemptInitialHighlighting(t,e,o,a),this._clearHighlighting(this._areInitialsMatched,n,i),r||s||this._areInitialsMatched},t.prototype.performSubtractiveSearch=function(t,e){var n=!0,i=!0,o=!1,a=!1,r=!1,s=!1;return this._isLeftTextMatched?(this._itemSearchServices.highlightSubtractiveSearchForElement(e,this._leftHalfTextElement,this._leftHalfOriginalText),n=!1,a=!0):(a=this._attemptNewSearchForLeftTextElement(t,e))?n=!1:o=!0,this._isRightTextMatched?(this._itemSearchServices.highlightSubtractiveSearchForElement(e,this._rightHalfTextElement,this._rightHalfOriginalText),i=!1,s=!0):(s=this._attemptNewSearchForRightTextElement(t,e))?i=!1:r=!0,this._areInitialsMatched=this._attemptInitialHighlighting(t,e,o,r),this._clearHighlighting(this._areInitialsMatched,n,i),a||s||this._areInitialsMatched},t.prototype.removeTargeting=function(){this._itemElement.setAttribute("data-is-targeted","false")},t.prototype.select=function(){this._isSelected||(this._itemElement.setAttribute("data-is-selected","true"),this._isSelected=!0)},t.prototype.target=function(){this._itemElement.setAttribute("data-is-targeted","true")},t.prototype.unselect=function(){this._isSelected&&(this._itemElement.setAttribute("data-is-selected","false"),this._isSelected=!1)},t.prototype._attemptInitialHighlighting=function(t,e,n,i){var o=!1;if(2===e&&(n||i)){var a=this._leftHalfOriginalText.charAt(0),r=this._rightHalfOriginalText.charAt(0);t.charAt(0).toLowerCase()===a.toLowerCase()&&t.charAt(1).toLowerCase()===r.toLowerCase()&&(n&&this._itemSearchServices.highlightText(this._leftHalfTextElement,this._leftHalfOriginalText,a,this._leftHalfOriginalText.length,1),i&&this._itemSearchServices.highlightText(this._rightHalfTextElement,this._rightHalfOriginalText,r,this._rightHalfOriginalText.length,1),o=!0)}return o},t.prototype._attemptNewSearchForLeftTextElement=function(t,e){var n=this._itemSearchServices.attemptNewSearchForElement(t,e,this._leftHalfTextElement,this._leftHalfOriginalText);return n&&(this._isLeftTextMatched=!0),n},t.prototype._attemptNewSearchForRightTextElement=function(t,e){var n=this._itemSearchServices.attemptNewSearchForElement(t,e,this._rightHalfTextElement,this._rightHalfOriginalText);return n&&(this._isRightTextMatched=!0),n},t.prototype._clearHighlighting=function(t,e,n){t?(e&&(this._isLeftTextMatched=!1),n&&(this._isRightTextMatched=!1)):(e&&this._clearLeftHalfHighlighting(),n&&this._clearRightHalfHighlighting())},t.prototype._clearLeftHalfHighlighting=function(){this._itemSearchServices.clearHighlighting(this._leftHalfTextElement,this._leftHalfOriginalText),this._isLeftTextMatched=!1},t.prototype._clearRightHalfHighlighting=function(){this._itemSearchServices.clearHighlighting(this._rightHalfTextElement,this._rightHalfOriginalText),this._isRightTextMatched=!1},t.prototype._itemClickListener=function(){if(null!==this._clickDelegate){var t=parseInt(this._itemElement.dataset.index,10);this._clickDelegate(t)}},t.prototype._itemMouseOverListener=function(){if(null!==this._mouseOverDelegate){var t=parseInt(this._itemElement.dataset.index,10);this._mouseOverDelegate(t)}},t}();t.PersonNameItem=e}(AutotaskDataSelector||(AutotaskDataSelector={})),function(t){var e=function(){function e(t){this._chipInformation=t}return e.prototype.create=function(e,n,i){return new t.PersonNameItem(e,this._chipInformation,n,i)},e}();t.PersonNameItemCreator=e}(AutotaskDataSelector||(AutotaskDataSelector={})),function(t){var e=function(t){function e(e){var n=t.call(this,e)||this;n._data={};for(var i=1;i<arguments.length;i+=2){var o=arguments[i],a=arguments[i+1];n._data[o]=a}return n}return __extends(e,t),Object.defineProperty(e.prototype,"data",{get:function(){return this._data},enumerable:!1,configurable:!0}),e}(Autotask.LifecycleObject);t.PopulateResponseData=e}(AutotaskDataSelector||(AutotaskDataSelector={})),function(t){var e=function(){function t(t,e,n,i){var o=this;this._itemElement=t,this._chipInformation=e,this._clickDelegate=n,this._mouseOverDelegate=i,this._isHighlighted=!1,this._isSelected=!1,this._itemSearchServices=new AutotaskEditorSystem.ItemSearchServices;var a=t.lastElementChild;this._originalText=this._itemElement.textContent,this._textElement=a.firstChild,this._itemElement.addEventListener("click",(function(){o._itemClickListener()})),this._itemElement.addEventListener("mouseover",(function(){o._itemMouseOverListener()}))}return Object.defineProperty(t.prototype,"chipInformation",{get:function(){return this._chipInformation},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"displayHeight",{get:function(){return this._itemElement.clientHeight},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"offsetTop",{get:function(){return this._itemElement.offsetTop},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return this._chipInformation.value},enumerable:!1,configurable:!0}),t.prototype.clearHighlighting=function(){if(this._isHighlighted){for(var t=document.createTextNode(this._originalText);null!==this._textElement.firstChild;)this._textElement.removeChild(this._textElement.firstChild);this._textElement.appendChild(t),this._isHighlighted=!1}},t.prototype.dispose=function(){this._clickDelegate=null,this._mouseOverDelegate=null},t.prototype.performAdditiveSearch=function(t,e,n){var i=!1;return this._isHighlighted&&((i=this._itemSearchServices.attemptAdditiveSearchForElement(e,n,this._textElement,this._originalText))||this._clearHighlighting()),i},t.prototype.performNewSearch=function(t,e){var n=this._attemptNewSearchForElement(t,e,this._textElement,this._originalText);return!n&&this._isHighlighted&&this._clearHighlighting(),n},t.prototype.performSubtractiveSearch=function(t,e){var n=!1;return this._isHighlighted?(this._itemSearchServices.highlightSubtractiveSearchForElement(e,this._textElement,this._originalText),n=!0):n=this._attemptNewSearchForElement(t,e,this._textElement,this._originalText),n},t.prototype.removeTargeting=function(){this._itemElement.setAttribute("data-is-targeted","false")},t.prototype.select=function(){this._isSelected||(this._itemElement.setAttribute("data-is-selected","true"),this._isSelected=!0)},t.prototype.target=function(){this._itemElement.setAttribute("data-is-targeted","true")},t.prototype.unselect=function(){this._isSelected&&(this._itemElement.setAttribute("data-is-selected","false"),this._isSelected=!1)},t.prototype._attemptNewSearchForElement=function(t,e,n,i){var o=this._itemSearchServices.attemptNewSearchForElement(t,e,n,i);return o&&(this._isHighlighted=!0),o},t.prototype._clearHighlighting=function(){this._itemSearchServices.clearHighlighting(this._textElement,this._originalText),this._isHighlighted=!1},t.prototype._itemClickListener=function(){if(null!==this._clickDelegate){var t=parseInt(this._itemElement.dataset.index,10);this._clickDelegate(t)}},t.prototype._itemMouseOverListener=function(){if(null!==this._mouseOverDelegate){var t=parseInt(this._itemElement.dataset.index,10);this._mouseOverDelegate(t)}},t}();t.SingleTextItem=e}(AutotaskDataSelector||(AutotaskDataSelector={})),function(t){var e=function(){function e(t){this._chipInformation=t}return e.prototype.create=function(e,n,i){return new t.SingleTextItem(e,this._chipInformation,n,i)},e}();t.SingleTextItemCreator=e}(AutotaskDataSelector||(AutotaskDataSelector={})),function(t){var e=function(t){function e(e,n){var i=t.call(this,e)||this;return i._dialogRoute=n,i._ajaxRequestCanceler=null,i}return __extends(e,t),e.prototype.showDialog=function(t,e,n,i,o){var a=this;this._cancelRequest(),this._ajaxRequestCanceler=this._dialogRoute.__multipleSelectionDialog(t,(function(t){a._dialogOpenedHandler(t,e,n,i,o)}))},e.prototype.__dispose=function(){this._cancelRequest()},e.prototype._cancelRequest=function(){null!==this._ajaxRequestCanceler&&(this._ajaxRequestCanceler.__cancelRequest(),this._ajaxRequestCanceler=null)},e.prototype._dialogOpenedHandler=function(t,e,n,i,o){var a=this;this._ajaxRequestCanceler=null;var r=t.dialogId;autotask.find(r).__configure((function(t){a._selectionHandler(t,e)}),n,i,o)},e.prototype._selectionHandler=function(t,e){this._ajaxRequestCanceler=null,e(t)},e}(Autotask.LifecycleObject);t.MultipleDataSelectionDialogCoordinator=e}(AutotaskEditorSystem||(AutotaskEditorSystem={})),function(t){var e=function(t){function e(e,n){var i=t.call(this,e)||this;return i._dialogRoute=n,i._ajaxRequestCanceler=null,i}return __extends(e,t),e.prototype.showDialog=function(t,e){var n=this;this._cancelRequest(),this._ajaxRequestCanceler=this._dialogRoute.__singleSelectionDialog(t,(function(t){n._dialogOpenedHandler(t,e)}))},e.prototype.__dispose=function(){this._cancelRequest()},e.prototype._cancelRequest=function(){null!==this._ajaxRequestCanceler&&(this._ajaxRequestCanceler.__cancelRequest(),this._ajaxRequestCanceler=null)},e.prototype._dialogOpenedHandler=function(t,e){var n=this;this._ajaxRequestCanceler=null;var i=t.dialogId;autotask.find(i).__configure((function(t){n._selectionHandler(t,e)}))},e.prototype._selectionHandler=function(t,e){this._ajaxRequestCanceler=null,e(t)},e}(Autotask.LifecycleObject);t.SingleDataSelectionDialogCoordinator=e}(AutotaskEditorSystem||(AutotaskEditorSystem={})),function(t){var e=function(){function e(t,e){this._leftOffset=t,this._topOffset=e}return e.prototype.createPositionData=function(t){var e=t.launchingElementLocation.distanceToLeftEdge+this._leftOffset,n=t.launchingElementLocation.distanceToTopEdge+t.launchingElementSize.height+this._topOffset;return new AutotaskPositionSystem.PositionData(e,n)},e.prototype.createSizeData=function(e,n,i){var o=this._calculateAvailableHeight(e),a=i;a>o&&(a=o-1);var r=this._calculateAvailableWidth(e),s=this._calculateMinimumWidthDefaultValue(e),l=this._calculateMaximumWidthDefaultValue(e);return l>r&&(l=r-1),new t.DropDownOverlaySizeData(n,a,s,l)},e.prototype.determineFeasibility=function(t,e){var n=this._calculateMinimumWidthDefaultValue(t),i=this._calculateAvailableWidth(t),o=this._calculateAvailableHeight(t);return n<i&&e<o},e.prototype._calculateAvailableHeight=function(t){return t.launchingElementLocation.distanceToBottomEdge-this._topOffset-AutotaskPositionSystem.CalculationValues.defaultMargin},e.prototype._calculateAvailableWidth=function(t){return t.launchingElementLocation.distanceToRightEdge+t.launchingElementSize.width-this._leftOffset-AutotaskPositionSystem.CalculationValues.defaultMargin},e.prototype._calculateMaximumWidthDefaultValue=function(t){return 4.5*t.launchingElementSize.width},e.prototype._calculateMinimumWidthDefaultValue=function(t){return t.launchingElementSize.width-2},e}();t.DropDownOverlayBottomAlignedLeftPosition=e}(AutotaskEditorSystem||(AutotaskEditorSystem={})),function(t){var e=function(){function t(t,e,n){this._minimumHeightDefaultValue=t,this._maximumHeightDefaultValue=e,this._sizeApplicator=n,this._positions=[],this._applicators=[]}return t.prototype.addPositionAndApplicator=function(t,e){this._positions.push(t),this._applicators.push(e)},t.prototype.applyPosition=function(e,n){0===this._positions.length&&autotask.throwException("There needs to be at least one position.");for(var i=t._createTelemetrySnapshot(e,n),o=!1,a=0;a<this._positions.length;a++){var r=this._positions[a];if(r.determineFeasibility(i,this._minimumHeightDefaultValue)){var s=r.createSizeData(i,this._minimumHeightDefaultValue,this._maximumHeightDefaultValue);this._sizeApplicator.applySize(s),i=t._createTelemetrySnapshot(e,n);var l=r.createPositionData(i);this._applicators[a].applyPosition(l),o=!0;break}}if(!o){var u=this._positions[0],c=this._applicators[0];s=u.createSizeData(i,this._minimumHeightDefaultValue,this._maximumHeightDefaultValue);this._sizeApplicator.applySize(s),i=t._createTelemetrySnapshot(e,n);l=u.createPositionData(i);c.applyPosition(l)}},t._createTelemetrySnapshot=function(t,e){var n=window.document.documentElement.clientHeight,i=window.document.documentElement.clientWidth,o=t.analyzeSize(),a=t.analyzeLocation(n,i),r=e.analyzeSize();return new AutotaskPositionSystem.TelemetrySnapshot(o,a,r,n,i)},t}();t.DropDownOverlayPositionCoordinator=e}(AutotaskEditorSystem||(AutotaskEditorSystem={})),function(t){var e=function(){function t(t,e){this._positionData=t,this._sizeData=e}return Object.defineProperty(t.prototype,"positionData",{get:function(){return this._positionData},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeData",{get:function(){return this._sizeData},enumerable:!1,configurable:!0}),t}();t.DropDownOverlaySizeAndPositionData=e}(AutotaskEditorSystem||(AutotaskEditorSystem={})),function(t){var e=function(){function t(t,e,n,i){this._minimumHeightValue=t,this._maximumHeightValue=e,this._minimumWidthValue=n,this._maximumWidthValue=i}return Object.defineProperty(t.prototype,"maximumHeightValue",{get:function(){return this._maximumHeightValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"minimumHeightValue",{get:function(){return this._minimumHeightValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maximumWidthValue",{get:function(){return this._maximumWidthValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"minimumWidthValue",{get:function(){return this._minimumWidthValue},enumerable:!1,configurable:!0}),t}();t.DropDownOverlaySizeData=e}(AutotaskEditorSystem||(AutotaskEditorSystem={})),function(t){var e=function(){function e(t,e){this._leftOffset=t,this._topOffset=e}return e.prototype.createPositionData=function(t){var e=t.launchingElementLocation.distanceToLeftEdge+this._leftOffset,n=t.launchingElementLocation.distanceToTopEdge-t.overlayElementSize.height+this._topOffset;return new AutotaskPositionSystem.PositionData(e,n)},e.prototype.createSizeData=function(e,n,i){var o=this._calculateAvailableHeight(e),a=i;a>o&&(a=o-1);var r=this._calculateAvailableWidth(e),s=this._calculateMinimumWidthDefaultValue(e),l=this._calculateMaximumWidthDefaultValue(e);return l>r&&(l=r-1),new t.DropDownOverlaySizeData(n,a,s,l)},e.prototype.determineFeasibility=function(t,e){var n=this._calculateMinimumWidthDefaultValue(t),i=this._calculateAvailableWidth(t),o=this._calculateAvailableHeight(t);return n<i&&e<o},e.prototype._calculateAvailableHeight=function(t){return t.launchingElementLocation.distanceToTopEdge+this._topOffset-AutotaskPositionSystem.CalculationValues.defaultMargin},e.prototype._calculateAvailableWidth=function(t){return t.launchingElementLocation.distanceToRightEdge+t.launchingElementSize.width-this._leftOffset-AutotaskPositionSystem.CalculationValues.defaultMargin},e.prototype._calculateMaximumWidthDefaultValue=function(t){return 4.5*t.launchingElementSize.width},e.prototype._calculateMinimumWidthDefaultValue=function(t){return t.launchingElementSize.width-2},e}();t.DropDownOverlayTopAlignedLeftPosition=e}(AutotaskEditorSystem||(AutotaskEditorSystem={})),function(t){var e=function(){function t(t,e){this._message=t,this._detailedMessage=null!==e?e:t}return Object.defineProperty(t.prototype,"detailedMessage",{get:function(){return this._detailedMessage},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isValid",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"message",{get:function(){return this._message},enumerable:!1,configurable:!0}),t}();t.InvalidResult=e}(AutotaskEditorSystem||(AutotaskEditorSystem={})),function(t){var e=function(){function t(){}return Object.defineProperty(t.prototype,"detailedMessage",{get:function(){return autotask.throwException("The detailed message is not set for a valid result.")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isValid",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"message",{get:function(){return autotask.throwException("The message is not set for a valid result.")},enumerable:!1,configurable:!0}),t}();t.ValidResult=e}(AutotaskEditorSystem||(AutotaskEditorSystem={})),function(t){var e=function(){function t(t){this._requiredValidator=t}return t.prototype.addRequiredStateChangedHandler=function(){},t.prototype.createValidator=function(){return this._requiredValidator},t.prototype.initialize=function(){},t}();t.ArrayRequiredValidatorProvider=e}(AutotaskEditorSystem||(AutotaskEditorSystem={})),function(t){var e=function(){function t(t){this._requiredValidator=t}return t.prototype.addRequiredStateChangedHandler=function(){},t.prototype.createValidator=function(){return this._requiredValidator},t.prototype.initialize=function(){},t}();t.DateRequiredValidatorProvider=e}(AutotaskEditorSystem||(AutotaskEditorSystem={})),function(t){var e=function(){function t(t){this._requiredValidator=t}return t.prototype.addRequiredStateChangedHandler=function(){},t.prototype.createValidator=function(){return this._requiredValidator},t.prototype.initialize=function(){},t}();t.ItemValueRequiredValidatorProvider=e}(AutotaskEditorSystem||(AutotaskEditorSystem={})),function(t){var e=function(){function t(t){this._requiredValidator=t}return t.prototype.addRequiredStateChangedHandler=function(){},t.prototype.createValidator=function(){return this._requiredValidator},t.prototype.initialize=function(){},t}();t.NumericRequiredValidatorProvider=e}(AutotaskEditorSystem||(AutotaskEditorSystem={})),function(t){var e=function(){function t(t,e,n){this._checkboxId=t,this._targetValue=e,this._requiredValidator=n,this._checkbox=null,this._isRequired=!1,this._requiredStateChangeHandlers=[]}return t.prototype.addRequiredStateChangedHandler=function(t){this._requiredStateChangeHandlers.push(t)},t.prototype.createValidator=function(){return this._isRequired?this._requiredValidator:null},t.prototype.initialize=function(){var t=this,e=autotask.find(this._checkboxId);e.addChange((function(){t._checkboxChange()})),this._isRequired=e.get_value()===this._targetValue,this._checkbox=e},t.prototype._checkboxChange=function(){var t=this._checkbox;this._isRequired=t.get_value()===this._targetValue,this._raiseRequiredStateChangeEvent()},t.prototype._raiseRequiredStateChangeEvent=function(){for(var t=0,e=this._requiredStateChangeHandlers;t<e.length;t++){(0,e[t])()}},t}();t.RequiredConditionallyByCheckBoxValidatorProvider=e}(AutotaskEditorSystem||(AutotaskEditorSystem={})),function(t){var e=function(){function t(t,e,n,i){this._dropDownListId=t,this._isOperatorEquals=e,this._targetValue=n,this._requiredValidator=i,this._dropDownList=null,this._isRequired=!1,this._requiredStateChangeHandlers=[]}return t.prototype.addRequiredStateChangedHandler=function(t){this._requiredStateChangeHandlers.push(t)},t.prototype.createValidator=function(){return this._isRequired?this._requiredValidator:null},t.prototype.initialize=function(){var t=this,e=autotask.find(this._dropDownListId);e.addChange((function(){t._dropDownListChange()})),this._dropDownList=e,this._isRequired=this._determineRequiredState()},t.prototype._determineRequiredState=function(){var t=this._dropDownList.get_value()===this._targetValue;return this._isOperatorEquals&&t||!this._isOperatorEquals&&!t},t.prototype._dropDownListChange=function(){this._isRequired=this._determineRequiredState(),this._raiseRequiredStateChangeEvent()},t.prototype._raiseRequiredStateChangeEvent=function(){for(var t=0,e=this._requiredStateChangeHandlers;t<e.length;t++){(0,e[t])()}},t}();t.RequiredConditionallyByDropDownListValidatorProvider=e}(AutotaskEditorSystem||(AutotaskEditorSystem={})),function(t){var e=function(){function t(t,e,n,i){this._isOperatorEquals=e,this._radioButtonId=t,this._targetValue=n,this._requiredValidator=i,this._isRequired=!1,this._radioButton=null,this._requiredStateChangeHandlers=[]}return t.prototype.addRequiredStateChangedHandler=function(t){this._requiredStateChangeHandlers.push(t)},t.prototype.createValidator=function(){return this._isRequired?this._requiredValidator:null},t.prototype.initialize=function(){var t=this,e=autotask.find(this._radioButtonId);e.addChange((function(){t._radioButtonChange()})),this._radioButton=e,this._isRequired=this._determineRequiredState()},t.prototype._determineRequiredState=function(){var t=this._radioButton.get_value()===this._targetValue;return this._isOperatorEquals&&t||!this._isOperatorEquals&&t},t.prototype._radioButtonChange=function(){this._isRequired=this._determineRequiredState(),this._raiseRequiredStateChangeEvent()},t.prototype._raiseRequiredStateChangeEvent=function(){for(var t=0,e=this._requiredStateChangeHandlers;t<e.length;t++){(0,e[t])()}},t}();t.RequiredConditionallyByRadioButtonValidatorProvider=e}(AutotaskEditorSystem||(AutotaskEditorSystem={})),function(t){var e=function(){function t(t,e,n,i){this._isOperatorEquals=e,this._itemSelectorId=t,this._targetValue=n,this._requiredValidator=i,this._isRequired=!1,this._itemSelector=null,this._requiredStateChangeHandlers=[]}return t.prototype.addRequiredStateChangedHandler=function(t){this._requiredStateChangeHandlers.push(t)},t.prototype.createValidator=function(){return this._isRequired?this._requiredValidator:null},t.prototype.initialize=function(){var t=this,e=autotask.find(this._itemSelectorId);e.addChange((function(){t._itemSelectorChange()})),this._itemSelector=e,this._isRequired=this._determineRequiredState()},t.prototype._determineRequiredState=function(){var t=this._itemSelector.get_value(),e=AutotaskItemSelectionSystem.ItemValueComparer.equals(this._targetValue,t);return this._isOperatorEquals&&e||!this._isOperatorEquals&&!e},t.prototype._itemSelectorChange=function(){this._isRequired=this._determineRequiredState(),this._raiseRequiredStateChangeEvent()},t.prototype._raiseRequiredStateChangeEvent=function(){for(var t=0,e=this._requiredStateChangeHandlers;t<e.length;t++){(0,e[t])()}},t}();t.RequiredConditionallyBySingleItemSelectorValidatorProvider=e}(AutotaskEditorSystem||(AutotaskEditorSystem={})),function(t){var e=function(){function t(t){this._requiredValidator=t}return t.prototype.addRequiredStateChangedHandler=function(){},t.prototype.createValidator=function(){return this._requiredValidator},t.prototype.initialize=function(){},t}();t.StringRequiredValidatorProvider=e}(AutotaskEditorSystem||(AutotaskEditorSystem={})),function(t){var e=function(){function e(t,e){this._maximumCount=t,this._message=e}return e.prototype.validate=function(e){var n=new t.ValidResult;return null!==e&&e.length>this._maximumCount&&(n=new t.InvalidResult(this._message,null)),n},e}();t.ArrayMaximumCountValidator=e}(AutotaskEditorSystem||(AutotaskEditorSystem={})),function(t){var e=function(){function e(t){this._message=t}return e.prototype.validate=function(e){var n=new t.ValidResult;return null!==e&&0!==e.length||(n=new t.InvalidResult(this._message,null)),n},e}();t.ArrayRequiredValidator=e}(AutotaskEditorSystem||(AutotaskEditorSystem={})),function(t){var e=function(){function e(t,e,n,i){this._targetDateBoxId=t,this._operator=e,this._message=n,this._isCustomMessage=i,this._targetChangeHandler=null,this._targetDateBox=null,this._targetLabelText=null}return Object.defineProperty(e.prototype,"targetChangeHandler",{set:function(t){this._targetChangeHandler=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"targetLabelText",{set:function(t){this._targetLabelText=t},enumerable:!1,configurable:!0}),e.prototype.initialize=function(){var t=this;this._targetDateBox=autotask.find(this._targetDateBoxId),this._targetDateBox.addChange((function(){t._targetDateBoxChange()}))},e.prototype.validate=function(e){var n=new t.ValidResult,i=this._targetDateBox.get_value();if(null!==i&&null!==e&&!this._compareValue(e,i)){var o=this._message;if(!this._isCustomMessage){null===this._targetLabelText&&autotask.throwException("_targetLabelText is null.");var a=new RegExp("\\{0\\}","gm");o=this._message.replace(a,this._targetLabelText)}n=new t.InvalidResult(o,null)}return n},e.prototype._compareValue=function(t,e){return"LessThan"===this._operator&&t<e||"LessThanOrEqualTo"===this._operator&&t<=e||"GreaterThan"===this._operator&&t>e||"GreaterThanOrEqualTo"===this._operator&&t>=e},e.prototype._raiseTargetChangeEvent=function(){null!==this._targetChangeHandler&&this._targetChangeHandler()},e.prototype._targetDateBoxChange=function(){this._raiseTargetChangeEvent()},e}();t.DateComparisonValidator=e}(AutotaskEditorSystem||(AutotaskEditorSystem={})),function(t){var e=function(){function e(t){this._message=t}return e.prototype.validate=function(e){return null===e?new t.InvalidResult(this._message,null):new t.ValidResult},e}();t.DateRequiredValidator=e}(AutotaskEditorSystem||(AutotaskEditorSystem={})),function(t){var e=function(){function t(){}return t.prototype.validate=function(t){var e=!0;return null!==t&&t.length>0&&(e=/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i.test(t)),e},t}();t.EmailAddressFormatValidator=e}(AutotaskEditorSystem||(AutotaskEditorSystem={})),function(t){var e=function(){function e(t){this._message=t}return e.prototype.validate=function(e){return null===e.value?new t.InvalidResult(this._message,null):new t.ValidResult},e}();t.ExternalFileRequiredValidator=e}(AutotaskEditorSystem||(AutotaskEditorSystem={})),function(t){var e=function(){function e(t){this._message=t}return e.prototype.validate=function(e){var n=!0;return null!==e.match(/[/\\?*:|"<>]+/)&&(n=!1),n?new t.ValidResult:new t.InvalidResult(this._message,null)},e}();t.FileNameValidator=e}(AutotaskEditorSystem||(AutotaskEditorSystem={})),function(t){var e=function(){function e(t,e){this._maximumSize=t,this._message=e}return e.prototype.validate=function(e){return null!==e&&e.size>this._maximumSize?new t.InvalidResult(this._message,null):new t.ValidResult},e}();t.FileSizeValidator=e}(AutotaskEditorSystem||(AutotaskEditorSystem={})),function(t){var e=function(){function e(t,e,n){this._fileExtensions=t,this._isAllowList=e,this._message=n}return e.prototype.validate=function(e){var n=!0;if(null!==e){var i=e.name.lastIndexOf("."),o=i>=0?e.name.substring(i+1).toUpperCase():null;null!==o?(this._isAllowList&&this._fileExtensions.indexOf(o)<0||!this._isAllowList&&this._fileExtensions.indexOf(o)>=0)&&(n=!1):n=!1}return n?new t.ValidResult:new t.InvalidResult(this._message,null)},e}();t.FileTypeValidator=e}(AutotaskEditorSystem||(AutotaskEditorSystem={})),function(t){var e=function(){function e(t,e){this._maximumLength=t,this._message=e}return e.prototype.validate=function(e){var n=new t.ValidResult;if(null!==e){var i=e.replace("\r\n","\n"),o=i.length,a=i.match(/\n/g);null!==a&&(o+=a.length),o>this._maximumLength&&(n=new t.InvalidResult(this._message,null))}return n},e}();t.FormatPreservationStringLengthValidator=e}(AutotaskEditorSystem||(AutotaskEditorSystem={})),function(t){var e=function(){function t(){}return t.prototype.validate=function(t){var e=!0;return null!==t&&t.length>0&&(e=/^[0-9A-F]{6}$/i.test(t)),e},t}();t.HexColorFormatValidator=e}(AutotaskEditorSystem||(AutotaskEditorSystem={})),function(t){var e=function(){function e(t,e,n){this._minimum=t,this._maximum=e,this._message=n}return e.prototype.validate=function(e){return null===e||this._isInRange(e)?new t.ValidResult:new t.InvalidResult(this._message,null)},e.prototype._isInRange=function(t){var e=!0;return null!==this._minimum&&null===this._maximum?e=t>=this._minimum:null===this._minimum&&null!==this._maximum?e=t<=this._maximum:null!==this._minimum&&null!==this._maximum&&(e=t>=this._minimum&&t<=this._maximum),e},e}();t.InclusiveDateRangeValidator=e}(AutotaskEditorSystem||(AutotaskEditorSystem={})),function(t){var e=function(){function e(t,e,n){this._minimum=t,this._maximum=e,this._message=n}return e.prototype.validate=function(e){return null===e||this._isInRange(e)?new t.ValidResult:new t.InvalidResult(this._message,null)},e.prototype._isInRange=function(t){return t>=this._minimum&&t<=this._maximum},e}();t.InclusiveNumericRangeValidator=e}(AutotaskEditorSystem||(AutotaskEditorSystem={})),function(t){var e=function(){function e(t){this._message=t}return e.prototype.validate=function(e){var n=new t.ValidResult;return null!==e&&0!==e.length||(n=new t.InvalidResult(this._message,null)),n},e}();t.ItemValueArrayRequiredValidator=e}(AutotaskEditorSystem||(AutotaskEditorSystem={})),function(t){var e=function(){function e(t){this._message=t}return e.prototype.validate=function(e){var n=new t.ValidResult;return null===e&&(n=new t.InvalidResult(this._message,null)),n},e}();t.ItemValueRequiredValidator=e}(AutotaskEditorSystem||(AutotaskEditorSystem={})),function(t){var e=function(){function e(t){this._message=t}return e.prototype.validate=function(e){return null===e?new t.InvalidResult(this._message,null):new t.ValidResult},e}();t.NumericRequiredValidator=e}(AutotaskEditorSystem||(AutotaskEditorSystem={})),function(t){var e=function(){function e(t,e){this._maximum=t,this._message=e}return e.prototype.validate=function(e){return null===e||this._isInRange(e)?new t.ValidResult:new t.InvalidResult(this._message,null)},e.prototype._isInRange=function(t){return t>0&&t<this._maximum},e}();t.PositiveExclusiveNumericRangeValidator=e}(AutotaskEditorSystem||(AutotaskEditorSystem={})),function(t){var e=function(){function e(t,e){this._pattern=t,this._message=e}return e.prototype.validate=function(e){var n=new t.ValidResult;if(null!==e&&e.length>0){var i=new RegExp(this._pattern).exec(e);null!==i&&0===i.index&&i[0].length===e.length||(n=new t.InvalidResult(this._message,null))}return n},e}();t.RegularExpressionValidator=e}(AutotaskEditorSystem||(AutotaskEditorSystem={})),function(t){var e=function(){function e(t,e){this._maximumDepth=t,this._message=e}return e.prototype.validate=function(e){var n=new t.ValidResult;return e>this._maximumDepth&&(n=new t.InvalidResult(this._message,null)),n},e}();t.RichTextDepthValidator=e}(AutotaskEditorSystem||(AutotaskEditorSystem={})),function(t){var e=function(){function e(t,e){this._maximumLength=t,this._message=e}return Object.defineProperty(e.prototype,"maximumLength",{get:function(){return this._maximumLength},enumerable:!1,configurable:!0}),e.prototype.validate=function(e){var n=new t.ValidResult;return null!==e&&e.length>this._maximumLength&&(n=new t.InvalidResult(this._message,null)),n},e}();t.StringLengthValidator=e}(AutotaskEditorSystem||(AutotaskEditorSystem={})),function(t){var e=function(){function e(t){this._message=t}return e.prototype.validate=function(e){var n=new t.ValidResult;return null!==e&&0!==e.trim().length||(n=new t.InvalidResult(this._message,null)),n},e}();t.StringRequiredValidator=e}(AutotaskEditorSystem||(AutotaskEditorSystem={})),function(t){var e=function(e){function n(t,n,i,o,a,r){var s=e.call(this,t)||this;return s._editorElement=AutotaskDomSystem.Document.getElementById(t),s._textAreaElement=s._editorElement.children[0].children[0],s._contentMirrorElement=s._editorElement.children[1],s._textAreaElement.addEventListener("change",(function(){s._changeListener()})),s._textAreaElement.addEventListener("focus",(function(){s._focusListener()})),s._textAreaElement.addEventListener("input",(function(){s._inputListener()})),s._textAreaElement.addEventListener("keydown",(function(t){s._keyDownListener(t)})),s._value=s._textAreaElement.value.replace(/\r|\n/g,""),s._originalValue=s._value,s._isEnabled=n,s._changeHandlers=[],null!==i&&s._changeHandlers.push(i),s._immediateChangeHandlers=[],null!==o&&s._immediateChangeHandlers.push(o),s._bindingPropertyName=a,s._adjustingTextBoxValidation=r,s._adjustingTextBoxValidation.addRequiredStateChangedHandler((function(){s._validationRequiredStateChanged()})),s._adjustingTextBoxValidation.addValidationCorrectedHandler((function(){s._validationCorrected()})),s._adjustingTextBoxValidation.addValidationFailedHandler((function(){s._validationFailed()})),s._dirtyStateChangeHandlers=[],s._tabbingAwayHandlers=[],s._invalidCssClass="Invalid",s._isDirty=!1,s._isValidationFrequencyElevated=!1,s._isValidationOverdue=!0,s._isValidationOverlayDismissed=!1,s}return __extends(n,e),Object.defineProperty(n.prototype,"participantValidation",{get:function(){return this._adjustingTextBoxValidation},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isEnabled",{get:function(){return this._isEnabled},set:function(t){t!==this._isEnabled&&(this._isEnabled=t,this._textAreaElement.disabled=!t,t?this._isValidationFrequencyElevated&&this._validate(!1):(this._isValidationOverdue=!this._adjustingTextBoxValidation.validationResult.isValid,this._adjustingTextBoxValidation.resetValidationResult(this._textAreaElement)))},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isDirty",{get:function(){return this._isDirty},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"value",{get:function(){return this._value},set:function(t){var e=null===t?"":t;n._equals(this._value,e)||(this._value=e,this._textAreaElement.value=this._value,this._contentMirrorElement.textContent=this._value,this._manageDirtyState(this._value)&&this._raiseDirtyStateChangeEvent(this._isDirty),this._isValidationOverdue=!0,this._isValidationFrequencyElevated&&this._validate(!1))},enumerable:!1,configurable:!0}),n.prototype.addChangeHandler=function(t){this._changeHandlers.push(t)},n.prototype.addDirtyStateChangeHandler=function(t){this._dirtyStateChangeHandlers.push(t)},n.prototype.addImmediateChangeHandler=function(t){this._immediateChangeHandlers.push(t)},n.prototype.addTabbingAwayHandler=function(t){this._tabbingAwayHandlers.push(t)},n.prototype.createRequestData=function(){var t=null;if(null!==this._bindingPropertyName){var e=null;this._isEnabled&&(e=this._value),(t={})[this._bindingPropertyName]=e}return t},n.prototype.focus=function(){this._textAreaElement.focus()},n.prototype.focusEnd=function(){this.focus()},n.prototype.focusStart=function(){this.focus()},n.prototype.resetValidation=function(){this._isValidationOverdue=!0},n.prototype.validate=function(){return this._validate(!1)},n.prototype.__initialize=function(){this._adjustingTextBoxValidation.initialize()},n.prototype._changeListener=function(){this._raiseChangeEvent(),this._validate(!0)},n._equals=function(t,e){return t.replace(/\r\n|\r/g,"\n")===e.replace(/\r\n|\r/g,"\n")},n.prototype._focusListener=function(){this._isValidationOverlayDismissed||!this._isValidationFrequencyElevated||this._adjustingTextBoxValidation.validationResult.isValid||this._showValidationOverlay()},n.prototype._inputListener=function(){var t=this._value;this._value=this._textAreaElement.value,this._contentMirrorElement.textContent=this._value;var e=this._manageDirtyState(this._value);this._raiseImmediateChangeEvent(t,this._value),e&&this._raiseDirtyStateChangeEvent(this._isDirty),this._isValidationOverdue=!0,this._isValidationFrequencyElevated&&this._validate(!0)},n.prototype._keyDownListener=function(t){AutotaskDomSystem.KeyCode.isEnter(t.which)?t.preventDefault():AutotaskDomSystem.KeyCode.isTab(t.which)&&this._raiseTabbingAwayEvent(t.shiftKey,(function(){t.preventDefault()}))},n.prototype._manageDirtyState=function(t){var e=!1;return this._isDirty&&t!==this._originalValue||(this._isDirty=!this._isDirty,e=!0),e},n.prototype._raiseChangeEvent=function(){if(this._changeHandlers.length>0)for(var e=new t.ChangeEventArgs(this),n=0,i=this._changeHandlers;n<i.length;n++){(0,i[n])(e)}},n.prototype._raiseDirtyStateChangeEvent=function(t){if(this._dirtyStateChangeHandlers.length>0)for(var e=new AutotaskDirtyStateSystem.DirtyStateChangeEventArgs(t),n=0,i=this._dirtyStateChangeHandlers;n<i.length;n++){(0,i[n])(e)}},n.prototype._raiseImmediateChangeEvent=function(e,n){if(this._immediateChangeHandlers.length>0)for(var i=new t.ImmediateChangeEventArgs(this,e,n),o=0,a=this._immediateChangeHandlers;o<a.length;o++){(0,a[o])(i)}},n.prototype._raiseTabbingAwayEvent=function(t,e){if(this._tabbingAwayHandlers.length>0)for(var n=new AutotaskEditorSystem.TabbingAwayEventArgs(this.id,t,e),i=0,o=this._tabbingAwayHandlers;i<o.length;i++){(0,o[i])(n)}},n.prototype._showValidationOverlay=function(){var t=this;autotask.globalValidationOverlay.show(this._textAreaElement,this.id,this._adjustingTextBoxValidation.validationResult.message,!0,(function(){t._validationOverlayClosed()}),null)},n.prototype._validate=function(t){var e=this._adjustingTextBoxValidation.validationResult.isValid;return this._isValidationOverdue&&this._isEnabled&&(e=this._adjustingTextBoxValidation.validate(this._value,t,this._textAreaElement),this._isValidationOverdue=!1),e?autotask.globalValidationOverlay.hide(this.id):this._showValidationOverlay(),e},n.prototype._validationCorrected=function(){this._textAreaElement.classList.remove(this._invalidCssClass)},n.prototype._validationFailed=function(){this._textAreaElement.classList.add(this._invalidCssClass),this._isValidationFrequencyElevated=!0},n.prototype._validationOverlayClosed=function(){this._isValidationOverlayDismissed=!0},n.prototype._validationRequiredStateChanged=function(){this.resetValidation(),this._isValidationFrequencyElevated&&this._validate(!0)},n}(AutotaskEditorSystem.Editor);t.AdjustingTextBox=e}(AutotaskAdjustingTextBox||(AutotaskAdjustingTextBox={})),function(t){var e=function(t){function e(e,n,i){var o=t.call(this,e)||this;return o._requiredValidatorProvider=n,o._regularExpressionValidator=i,o._requiredValidator=null,o}return __extends(e,t),Object.defineProperty(e.prototype,"_isRequired",{get:function(){return null!==this._requiredValidator},enumerable:!1,configurable:!0}),e.prototype.initialize=function(){var t=this;null!==this._requiredValidatorProvider&&(this._requiredValidatorProvider.initialize(),this._requiredValidatorProvider.addRequiredStateChangedHandler((function(){t._requiredStateChanged()})),this._requiredValidator=this._requiredValidatorProvider.createValidator())},e.prototype.resetValidationResult=function(t){this._updateValidationResult(new AutotaskEditorSystem.ValidResult,!1,t,!0)},e.prototype.validate=function(t,e,n){var i=new AutotaskEditorSystem.ValidResult;return null!==this._requiredValidator&&(i=this._requiredValidator.validate(t)),i.isValid&&null!==this._regularExpressionValidator&&(i=this._regularExpressionValidator.validate(t)),this._updateValidationResult(i,e,n,!0),i.isValid},e.prototype._requiredStateChanged=function(){var t=this._requiredValidatorProvider;this._requiredValidator=t.createValidator(),this._raiseRequiredStateChanged()},e}(AutotaskEditorSystem.EditorValidation);t.AdjustingTextBoxValidation=e}(AutotaskAdjustingTextBox||(AutotaskAdjustingTextBox={})),function(t){var e=function(){function t(t){this._editorInstance=t}return Object.defineProperty(t.prototype,"editorInstance",{get:function(){return this._editorInstance},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"instanceId",{get:function(){return this._editorInstance.id},enumerable:!1,configurable:!0}),t}();t.ChangeEventArgs=e}(AutotaskAdjustingTextBox||(AutotaskAdjustingTextBox={})),function(t){var e=function(){function t(t,e,n){this._editorInstance=t,this._previousValue=e,this._currentValue=n}return Object.defineProperty(t.prototype,"currentValue",{get:function(){return this._currentValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"editorInstance",{get:function(){return this._editorInstance},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"previousValue",{get:function(){return this._previousValue},enumerable:!1,configurable:!0}),t}();t.ImmediateChangeEventArgs=e}(AutotaskAdjustingTextBox||(AutotaskAdjustingTextBox={})),function(t){var e=function(){function t(t){this._editorInstance=t}return Object.defineProperty(t.prototype,"editorInstance",{get:function(){return this._editorInstance},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"instanceId",{get:function(){return this._editorInstance.id},enumerable:!1,configurable:!0}),t}();t.ChangeEventArgs=e}(AutotaskCheckbox||(AutotaskCheckbox={})),function(t){var e=function(e){function n(t,n,i,o,a,r,s){var l=e.call(this,t)||this,u=AutotaskDomSystem.Document.getElementById(t);return l._checkboxElement=AutotaskDomSystem.Document.getFirstElementChild(u),l._checkboxElement.addEventListener("click",(function(){l._clickListener()})),l._checkboxElement.addEventListener("blur",(function(){l._blurListener()})),l._checkboxElement.addEventListener("focus",(function(){l.focus()})),l._checkboxElement.addEventListener("keydown",(function(t){l._keyDownListener(t)})),l._checkboxElement.addEventListener("keyup",(function(t){l._keyUpListener(t)})),l._originalValue=n,l._value=l._originalValue,l._isEnabled=i,l._changeHandlers=[],null!==o&&l._changeHandlers.push(o),l._bindingPropertyName=a,l._isRequestDataProvidedWhenDisabled=r,l._labelId=s,l._blurHandlers=[],l._broadcastKeyUpHandlers=[],l._dirtyStateChangeHandlers=[],l._isDirty=!1,l._isTabKeyDownHandled=!1,l._label=null,l._tabbedAwayHandlers=[],l._tabbingAwayHandlers=[],l}return __extends(n,e),Object.defineProperty(n.prototype,"isEnabled",{get:function(){return this._isEnabled},set:function(t){t!==this._isEnabled&&(this._isEnabled=t,this._checkboxElement.classList.toggle("Disabled"),null!==this._label&&(this._label.isEnabled=t))},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isDirty",{get:function(){return this._isDirty},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"value",{get:function(){return this._value},set:function(t){t!==this._value&&(this._value=t,this._checkboxElement.classList.toggle("Checked"),this._checkboxElement.classList.toggle("Unchecked"),this._manageDirtyState(this._value)&&this._raiseDirtyStateChangeEvent(this._isDirty))},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isDataProvidedWhenDisabled",{get:function(){return this._isRequestDataProvidedWhenDisabled},enumerable:!1,configurable:!0}),n.prototype.addChangeHandler=function(t){this._changeHandlers.push(t)},n.prototype.addBlurHandler=function(t){this._blurHandlers.push(t)},n.prototype.addBroadcastKeyUpHandler=function(t){this._broadcastKeyUpHandlers.push(t)},n.prototype.addDirtyStateChangeHandler=function(t){this._dirtyStateChangeHandlers.push(t)},n.prototype.addTabbedAwayHandler=function(t){this._tabbedAwayHandlers.push(t)},n.prototype.addTabbingAwayHandler=function(t){this._tabbingAwayHandlers.push(t)},n.prototype.clearValue=function(){this.value=!1},n.prototype.createRequestData=function(){var t=null;if(null!==this._bindingPropertyName){var e=null;(this._isRequestDataProvidedWhenDisabled||this._isEnabled)&&(e=this._value?"true":"false"),(t={})[this._bindingPropertyName]=e}return t},n.prototype.focus=function(){this._checkboxElement.focus()},n.prototype.focusEnd=function(){this.focus()},n.prototype.focusStart=function(){this.focus()},n.prototype.removeFocus=function(){this._checkboxElement.blur()},n.prototype.resetValue=function(){this.value=this._originalValue},n.prototype.__initialize=function(){var t=this;null!==this._labelId&&(this._label=autotask.find(this._labelId),this._label.addClickHandler((function(){t._clickListener()})),this._label.setMouseDownHandler((function(){t._labelMouseDownListener()})),this._label.setMouseEnterHandler((function(){t._labelMouseEnterListener()})),this._label.setMouseLeaveHandler((function(){t._labelMouseLeaveListener()})),this._label.setMouseUpHandler((function(){t._labelMouseUpListener()})))},n.prototype._blurListener=function(){this._isTabKeyDownHandled=!1,this._raiseBlurEvent()},n.prototype._clickListener=function(){this._isEnabled&&this._raiseChangeEvent()},n.prototype._keyDownListener=function(t){AutotaskDomSystem.KeyCode.isTab(t.which)?(this._isTabKeyDownHandled=!0,this._raiseTabbingAwayEvent(t.shiftKey,(function(){t.preventDefault()})),this._checkboxElement.classList.remove("Active")):this._isEnabled&&AutotaskDomSystem.KeyCode.isSpace(t.which)&&(t.preventDefault(),this._checkboxElement.classList.add("Active"))},n.prototype._keyUpListener=function(t){AutotaskDomSystem.KeyCode.isEnter(t.which)||AutotaskDomSystem.KeyCode.isEscape(t.which)?this._raiseBroadcastKeyUpEvent(t.which):AutotaskDomSystem.KeyCode.isTab(t.which)&&this._isTabKeyDownHandled?(this._isTabKeyDownHandled=!1,this._raiseTabbedAwayEvent(t.shiftKey)):this._isEnabled&&AutotaskDomSystem.KeyCode.isSpace(t.which)&&(t.preventDefault(),this._checkboxElement.classList.remove("Active"),this._raiseChangeEvent())},n.prototype._labelMouseDownListener=function(){this._isEnabled&&this._checkboxElement.classList.add("Active")},n.prototype._labelMouseEnterListener=function(){this._isEnabled&&this._checkboxElement.classList.add("Hover")},n.prototype._labelMouseLeaveListener=function(){this._isEnabled&&this._checkboxElement.classList.remove("Hover")},n.prototype._labelMouseUpListener=function(){this._isEnabled&&this._checkboxElement.classList.remove("Active")},n.prototype._manageDirtyState=function(t){var e=!1;return this._isDirty&&t!==this._originalValue||(this._isDirty=!this._isDirty,e=!0),e},n.prototype._raiseChangeEvent=function(){if(this.value=!this.value,this._changeHandlers.length>0)for(var e=new t.ChangeEventArgs(this),n=0,i=this._changeHandlers;n<i.length;n++){(0,i[n])(e)}},n.prototype._raiseBlurEvent=function(){for(var t=0,e=this._blurHandlers;t<e.length;t++){(0,e[t])()}},n.prototype._raiseBroadcastKeyUpEvent=function(t){if(this._broadcastKeyUpHandlers.length>0)for(var e=new AutotaskEditorSystem.BroadcastKeyUpEventArgs(this.id,t),n=0,i=this._broadcastKeyUpHandlers;n<i.length;n++){(0,i[n])(e)}},n.prototype._raiseDirtyStateChangeEvent=function(t){if(this._dirtyStateChangeHandlers.length>0)for(var e=new AutotaskDirtyStateSystem.DirtyStateChangeEventArgs(t),n=0,i=this._dirtyStateChangeHandlers;n<i.length;n++){(0,i[n])(e)}},n.prototype._raiseTabbedAwayEvent=function(t){if(this._tabbedAwayHandlers.length>0)for(var e=new AutotaskEditorSystem.TabbedAwayEventArgs(this.id,t,!0),n=0,i=this._tabbedAwayHandlers;n<i.length;n++){(0,i[n])(e)}},n.prototype._raiseTabbingAwayEvent=function(t,e){if(this._tabbingAwayHandlers.length>0)for(var n=new AutotaskEditorSystem.TabbingAwayEventArgs(this.id,t,e),i=0,o=this._tabbingAwayHandlers;i<o.length;i++){(0,o[i])(n)}},n}(AutotaskEditorSystem.Editor);t.Checkbox=e}(AutotaskCheckbox||(AutotaskCheckbox={})),function(t){var e=function(){function t(t){this._editorInstance=t}return Object.defineProperty(t.prototype,"editorInstance",{get:function(){return this._editorInstance},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"instanceId",{get:function(){return this._editorInstance.id},enumerable:!1,configurable:!0}),t}();t.ChangeEventArgs=e}(AutotaskCurrencyBox||(AutotaskCurrencyBox={})),function(t){var e=function(e){function n(t,n,i,o,a,r,s,l,u,c,d,h){var _=this,p=AutotaskDomSystem.Document.getElementById(t),m=p.children[1];return(_=e.call(this,t,m,n,i,d,!1,h)||this)._numberOfDecimalPlaces=r,_._overlayRoute=s,_._externalCurrencyId=l,_._isValueInternalCurrency=u,_._alternateCurrencyId=c,_._currencyBoxValidation=h,_._isOverlayEnabled=null!==s,_._isButtonEnabled=_._isOverlayEnabled&&null!==_.value,_._buttonElement=p.children[0],_._buttonElement.addEventListener("blur",(function(){_._buttonBlurListener()})),_._buttonElement.addEventListener("click",(function(){_._buttonClickListener()})),_._buttonElement.addEventListener("keydown",(function(t){_._buttonKeyDownListener(t)})),_._buttonElement.addEventListener("keyup",(function(t){_._buttonKeyUpListener(t)})),_._buttonElement.addEventListener("mouseleave",(function(){_._buttonMouseLeaveListener()})),_._changeHandlers=new Array,null!==o&&_._changeHandlers.push(o),_._immediateChangeHandlers=new Array,null!==a&&_._immediateChangeHandlers.push(a),_._isButtonTabKeyDownHandled=!1,_}return __extends(n,e),n.prototype.addChangeHandler=function(t){this._changeHandlers.push(t)},n.prototype.addImmediateChangeHandler=function(t){this._immediateChangeHandlers.push(t)},n.prototype.overrideDefaultTranslationSettings=function(t){this._alternateCurrencyId=t,this._isValueInternalCurrency=!1},n.prototype.setDefaultCurrencyIndicatorSettings=function(t,e,n){this._setButtonText(t),this._externalCurrencyId=e,this._isValueInternalCurrency=n,this._alternateCurrencyId=null},n.prototype.__initialize=function(){this._currencyBoxValidation.initialize()},n.prototype._changeListener=function(){e.prototype._changeListener.call(this),this._isOverlayEnabled&&this._setButtonIsEnabled(null!==this.value)},n.prototype._isInputElementTriggeringTabbedAway=function(t){return!t},n.prototype._isInputElementTriggeringTabbingAway=function(t){return!t},n.prototype._convertNumberToDisplayString=function(t){return this._convertNumberToString(t)},n.prototype._convertNumberToSerializedString=function(t){return this._convertNumberToString(t)},n.prototype._convertDisplayStringToNumber=function(t){return window.autotask.convert.stringToDecimal(t,this._numberOfDecimalPlaces)},n.prototype._raiseChangeEvent=function(){if(this._changeHandlers.length>0)for(var e=new t.ChangeEventArgs(this),n=0,i=this._changeHandlers;n<i.length;n++){(0,i[n])(e)}},n.prototype._raiseImmediateChangeEvent=function(e,n){if(this._immediateChangeHandlers.length>0)for(var i=new t.ImmediateChangeEventArgs(this,e,n),o=0,a=this._immediateChangeHandlers;o<a.length;o++){(0,a[o])(i)}},n.prototype._setIsEnabled=function(t){e.prototype._setIsEnabled.call(this,t),this._isOverlayEnabled&&this._setButtonIsEnabled(null!==this.value)},n.prototype._buttonBlurListener=function(){this._isButtonTabKeyDownHandled=!1},n.prototype._buttonClickListener=function(){this._isButtonEnabled&&this._showOverlay()},n.prototype._buttonKeyDownListener=function(t){AutotaskDomSystem.KeyCode.isTab(t.which)&&(this._isButtonTabKeyDownHandled=!0,t.shiftKey&&this._raiseTabbingAwayEvent(!0,(function(){t.preventDefault()})))},n.prototype._buttonKeyUpListener=function(t){AutotaskDomSystem.KeyCode.isEnter(t.which)?this._isButtonEnabled&&this._showOverlay():AutotaskDomSystem.KeyCode.isEscape(t.which)?autotask.globalCurrencyOverlayManagement._hideCurrencyOverlay():AutotaskDomSystem.KeyCode.isTab(t.which)&&this._isButtonTabKeyDownHandled&&(this._isButtonTabKeyDownHandled=!1,t.shiftKey&&this._raiseTabbedAwayEvent(!0,!1))},n.prototype._buttonMouseLeaveListener=function(){autotask.globalCurrencyOverlayManagement._hideCurrencyOverlay()},n.prototype._convertNumberToString=function(t){var e=null;return null!==t&&(e=window.autotask.convert.decimalToString(t,this._numberOfDecimalPlaces,!1)),e},n.prototype._setButtonIsEnabled=function(t){this._isButtonEnabled=t,t?this._buttonElement.classList.remove("DisabledState"):this._buttonElement.classList.add("DisabledState")},n.prototype._setButtonText=function(t){this._buttonElement.firstElementChild.textContent=t},n.prototype._showOverlay=function(){null!==this._overlayRoute&&null!==this.value&&null!==this._externalCurrencyId&&null!==this._isValueInternalCurrency&&autotask.globalCurrencyOverlayManagement._showCurrencyOverlay(this._buttonElement,this._overlayRoute,this.value,this._numberOfDecimalPlaces,this._externalCurrencyId,this._isValueInternalCurrency,this._alternateCurrencyId)},n}(AutotaskEditorSystem.NumberBox);t.CurrencyBox=e}(AutotaskCurrencyBox||(AutotaskCurrencyBox={})),function(t){var e=function(t){function e(e,n,i,o){var a=t.call(this,e)||this;return a._invalidNumberMessage=n,a._requiredValidatorProvider=i,a._rangeValidator=o,a._requiredValidator=null,a}return __extends(e,t),Object.defineProperty(e.prototype,"_isRequired",{get:function(){return null!==this._requiredValidator},enumerable:!1,configurable:!0}),e.prototype.initialize=function(){var t=this;null!==this._requiredValidatorProvider&&(this._requiredValidatorProvider.initialize(),this._requiredValidatorProvider.addRequiredStateChangedHandler((function(){t._requiredStateChanged()})),this._requiredValidator=this._requiredValidatorProvider.createValidator())},e.prototype.resetValidationResult=function(t){this._updateValidationResult(new AutotaskEditorSystem.ValidResult,!1,t,!0)},e.prototype.validate=function(t,e,n,i){var o=new AutotaskEditorSystem.ValidResult;return e||(o=new AutotaskEditorSystem.InvalidResult(this._invalidNumberMessage,null)),o.isValid&&null!==this._requiredValidator&&(o=this._requiredValidator.validate(t)),o.isValid&&null!==this._rangeValidator&&(o=this._rangeValidator.validate(t)),this._updateValidationResult(o,n,i,!0),o.isValid},e.prototype._requiredStateChanged=function(){var t=this._requiredValidatorProvider;this._requiredValidator=t.createValidator(),this._raiseRequiredStateChanged()},e}(AutotaskEditorSystem.EditorValidation);t.CurrencyBoxValidation=e}(AutotaskCurrencyBox||(AutotaskCurrencyBox={})),function(t){var e=function(){function t(t,e,n){this._editorInstance=t,this._previousValue=e,this._currentValue=n}return Object.defineProperty(t.prototype,"currentValue",{get:function(){return this._currentValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"editorInstance",{get:function(){return this._editorInstance},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"previousValue",{get:function(){return this._previousValue},enumerable:!1,configurable:!0}),t}();t.ImmediateChangeEventArgs=e}(AutotaskCurrencyBox||(AutotaskCurrencyBox={})),function(t){var e=function(){function t(t){this._editorInstance=t}return Object.defineProperty(t.prototype,"editorInstance",{get:function(){return this._editorInstance},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"instanceId",{get:function(){return this._editorInstance.id},enumerable:!1,configurable:!0}),t}();t.ChangeEventArgs=e}(AutotaskDateBox||(AutotaskDateBox={})),function(t){var e=function(e){function n(t,n,i,o,a,r,s,l,u,c){var d=e.call(this,t)||this,h=AutotaskDomSystem.Document.getElementById(t);return d._inputElement=h.children[0],d._inputElement.addEventListener("blur",(function(){d._inputBlurListener()})),d._inputElement.addEventListener("change",(function(){d._changeListener()})),d._inputElement.addEventListener("click",(function(){d._inputClickListener()})),d._inputElement.addEventListener("focus",(function(){d._focusListener()})),d._inputElement.addEventListener("input",(function(){d._inputListener()})),d._inputElement.addEventListener("keydown",(function(t){d._inputKeyDownListener(t)})),d._inputElement.addEventListener("keyup",(function(t){d._inputKeyUpListener(t)})),d._overlayLaunchingElement=h.children[1],d._buttonId=n,d._originalValue=i?new Date(i.getTime()):null,d._value=i?new Date(i.getTime()):null,d._isEnabled=o,d._changeHandlers=[],null!==a&&d._changeHandlers.push(a),d._immediateChangeHandlers=[],null!==r&&d._immediateChangeHandlers.push(r),d._calendarOffsetLinkValues=s,d._bindingPropertyName=l,d._isRequestDataProvidedWhenDisabled=u,d._dateBoxValidation=c,d._dateBoxValidation.addComparisonTargetChangeHandler((function(){d._validationComparisonTargetChange()})),d._dateBoxValidation.addRequiredStateChangedHandler((function(){d._validationRequiredStateChanged()})),d._dateBoxValidation.addValidationCorrectedHandler((function(){d._validationCorrected()})),d._dateBoxValidation.addValidationFailedHandler((function(){d._validationFailed()})),d._broadcastKeyUpHandlers=[],d._button=null,d._dirtyStateChangeHandlers=[],d._calendarClosedHandlers=[],d._calendarOpenedHandlers=[],d._tabbedAwayHandlers=[],d._tabbingAwayHandlers=[],d._dateFormatParts=window.autotask.culture._calendarFormat.getPattern("d").split(window.autotask.culture._calendarFormat.get_dateSeparator()),d._defaultDate=new Date,d._defaultDate.setHours(0,0,0,0),d._invalidCssClass="Invalid",d._isCalendarOpen=!1,d._isChangeEventPending=!1,d._isDirty=!1,d._isFormatValid=!0,d._isInputTabKeyDownHandled=!1,d._isValidationFrequencyElevated=!1,d._isValidationOverdue=!0,d._isValidationOverlayDismissed=!1,d}return __extends(n,e),Object.defineProperty(n.prototype,"defaultDate",{get:function(){return new Date(this._defaultDate.getTime())},set:function(t){this._defaultDate=new Date(t.getTime())},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isDirty",{get:function(){return this._isDirty},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isEnabled",{get:function(){return this._isEnabled},set:function(t){t!==this._isEnabled&&(this._isEnabled=t,this._inputElement.disabled=!t,t?(this._button.isEnabled=!0,this._isValidationFrequencyElevated&&this._validate(!1)):(this._isCalendarOpen&&this._hideCalendarOverlay(),this._button.isEnabled=!1,this._isRequestDataProvidedWhenDisabled||(this._isValidationOverdue=!this._dateBoxValidation.validationResult.isValid,this._dateBoxValidation.resetValidationResult(this._inputElement))))},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"participantValidation",{get:function(){return this._dateBoxValidation},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"value",{get:function(){return this._value?new Date(this._value.getTime()):null},set:function(t){this._compareDates(t,this._value)||(this._value=t?new Date(t.getTime()):null,this._inputElement.value=null===this._value?"":window.autotask.convert.dateToString(this._value,null),this._manageDirtyState(this._value)&&this._raiseDirtyStateChangeEvent(this._isDirty),this._isFormatValid=!0,this._isValidationOverdue=!0,this._isValidationFrequencyElevated&&this._validate(!1))},enumerable:!1,configurable:!0}),n.prototype.addBroadcastKeyUpHandler=function(t){this._broadcastKeyUpHandlers.push(t)},n.prototype.addCalendarClosedHandler=function(t){this._calendarClosedHandlers.push(t)},n.prototype.addCalendarOpenedHandler=function(t){this._calendarOpenedHandlers.push(t)},n.prototype.addChangeHandler=function(t){this._changeHandlers.push(t)},n.prototype.addDirtyStateChangeHandler=function(t){this._dirtyStateChangeHandlers.push(t)},n.prototype.addImmediateChangeHandler=function(t){this._immediateChangeHandlers.push(t)},n.prototype.addTabbedAwayHandler=function(t){this._tabbedAwayHandlers.push(t)},n.prototype.addTabbingAwayHandler=function(t){this._tabbingAwayHandlers.push(t)},n.prototype.clearValue=function(){this.value=null},n.prototype.createRequestData=function(){var t=null;if(null!==this._bindingPropertyName){var e=null;(this._isRequestDataProvidedWhenDisabled||this._isEnabled)&&null!==this._value&&(e=window.autotask.convert.dateToString(this._value,null)),(t={})[this._bindingPropertyName]=e}return t},n.prototype.focus=function(){this._inputElement.focus()},n.prototype.focusEnd=function(){this.focus()},n.prototype.focusStart=function(){this.focus()},n.prototype.removeFocus=function(){this._inputElement.blur()},n.prototype.resetValidation=function(){this._isValidationOverdue=!0},n.prototype.resetValue=function(){this._value=this._originalValue},n.prototype.validate=function(){return this._validate(!1)},n.prototype.__dispose=function(){e.prototype.__dispose.call(this),this._hideCalendarOverlay()},n.prototype.__initialize=function(){var t=this;this._dateBoxValidation.initialize(),this._button=autotask.find(this._buttonId);var e=new AutotaskButtonSystem.AdvancedTouchEventHandler((function(){t._buttonClickEventHandler()}),(function(){t._buttonTouchEventHandler()}),null,(function(){t._buttonMouseLeaveEventHandler()}));this._button.addEventHandler(e)},n.prototype._buttonClickEventHandler=function(){this._showCalendarOverlay()},n.prototype._buttonMouseLeaveEventHandler=function(){this._hideCalendarOverlay()},n.prototype._buttonTouchEventHandler=function(){this._isCalendarOpen?this._hideCalendarOverlay():this._showCalendarOverlay()},n.prototype._calendarOverlayDateSelected=function(t){var e=this._value?new Date(this._value.getTime()):null;if(this._value=new Date(t.getTime()),this._inputElement.value=window.autotask.convert.dateToString(t,null),this._isFormatValid=!0,!this._compareDates(this._value,e)){var n=this._manageDirtyState(this._value);this._raiseImmediateChangeEvent(e,this._value),n&&this._raiseDirtyStateChangeEvent(this._isDirty),this._isValidationOverdue=!0,this._validate(!0),this._raiseChangeEvent()}},n.prototype._calendarOverlayHidden=function(){this._isCalendarOpen=!1,this._raiseCalendarClosedEvent()},n.prototype._changeListener=function(){this._raiseChangeEvent(),this._validate(!0),this._isFormatValid&&this._dateBoxValidation.validationResult.isValid&&(this._inputElement.value=null===this._value?"":window.autotask.convert.dateToString(this._value,null))},n.prototype._changeDatePartSelection=function(t,e){var n=this._value?new Date(this._value.getTime()):new Date(this._defaultDate.getTime()),i=null;null===this._value?(this._isChangeEventPending=!0,this._updateValue(n),this._isValidationOverdue=!0,this._validate(!0)):(i=this._getFormatSelectionIndex(),t?i=Math.max(0,i-1):e&&(i=Math.min(this._dateFormatParts.length-1,i+1))),this._selectDatePart(i)},n.prototype._compareDates=function(t,e){var n=t===e;return null!==t&&null!==e&&(n=t.getTime()===e.getTime()),n},n.prototype._focusListener=function(){this._inputElement.setSelectionRange(0,this._inputElement.value.length),this._isValidationOverlayDismissed||!this._isValidationFrequencyElevated||this._dateBoxValidation.validationResult.isValid||this._showValidationOverlay()},n.prototype._getFormatSelectionIndex=function(){for(var t=0,e=this._inputElement.selectionStart?this._inputElement.selectionStart:0,n=0;n<this._dateFormatParts.length;n++)if(t+=this._dateFormatParts[n].length,n>0&&t++,t>=e){t=n;break}return t},n.prototype._hideCalendarOverlay=function(){this._isCalendarOpen=!1,autotask.globalCalendarOverlayManagement.__hide()},n.prototype._incrementOrDecrementDatePart=function(t,e,n){var i,o=!1;return i=n?1:-1,/d|dd|D|DD/.test(t)?(e.setDate(e.getDate()+i),o=!0):/m|mm|M|MM|MMM|MMMM/.test(t)?(e.setMonth(e.getMonth()+i),o=!0):/yy|yyyy/.test(t)&&(e.setFullYear(e.getFullYear()+i),o=!0),o},n.prototype._incrementOrDecrementSelection=function(t,e){var n=this._value?new Date(this._value.getTime()):new Date(this._defaultDate.getTime()),i=!1,o=null;if(null===this._value)i=!0;else if(t){o=this._getFormatSelectionIndex();var a=this._dateFormatParts[o];i=this._incrementOrDecrementDatePart(a,n,!0)}else if(e){o=this._getFormatSelectionIndex();a=this._dateFormatParts[o];i=this._incrementOrDecrementDatePart(a,n,!1)}i&&(this._isChangeEventPending=!0,this._updateValue(n),this._selectDatePart(o),this._isValidationOverdue=!0,this._validate(!0))},n.prototype._inputBlurListener=function(){this._isInputTabKeyDownHandled=!1,this._isChangeEventPending&&(this._raiseChangeEvent(),this._isChangeEventPending=!1)},n.prototype._inputClickListener=function(){var t=this._inputElement.selectionStart,e=this._inputElement.selectionEnd;null!==t&&null!==e&&e===t&&this._selectDatePart(this._getFormatSelectionIndex())},n.prototype._inputKeyDownListener=function(t){this._isFormatValid&&(this._leftRightKeyDownListener(AutotaskDomSystem.KeyCode.isLeft(t.which),AutotaskDomSystem.KeyCode.isRight(t.which),(function(){t.preventDefault()})),this._upDownKeyDownListener(AutotaskDomSystem.KeyCode.isUp(t.which),AutotaskDomSystem.KeyCode.isDown(t.which),(function(){t.preventDefault()}))),AutotaskDomSystem.KeyCode.isTab(t.which)&&(this._isInputTabKeyDownHandled=!0,this._raiseTabbingAwayEvent(t.shiftKey,(function(){t.preventDefault()})))},n.prototype._inputKeyUpListener=function(t){this._isFormatValid&&(this._leftRightKeyUpListener(AutotaskDomSystem.KeyCode.isLeft(t.which),AutotaskDomSystem.KeyCode.isRight(t.which),(function(){t.preventDefault()})),this._upDownKeyUpListener(AutotaskDomSystem.KeyCode.isUp(t.which),AutotaskDomSystem.KeyCode.isDown(t.which),(function(){t.preventDefault()}))),AutotaskDomSystem.KeyCode.isEnter(t.which)||AutotaskDomSystem.KeyCode.isEscape(t.which)?this._raiseBroadcastKeyUpEvent(t.which):AutotaskDomSystem.KeyCode.isTab(t.which)&&this._isInputTabKeyDownHandled&&(this._isInputTabKeyDownHandled=!1,this._raiseTabbedAwayEvent(!0,!0))},n.prototype._inputListener=function(){this._isChangeEventPending=!1;var t=this._value?new Date(this._value.getTime()):null,e=this._isFormatValid,n=this._inputElement.value,i=window.autotask.convert.stringToDate(n,null);if(this._isFormatValid=0===n.length||null!==i,this._value=i,this._compareDates(this._value,t))this._isFormatValid!==e&&(this._isValidationOverdue=!0);else{var o=this._manageDirtyState(this._value);this._raiseImmediateChangeEvent(t,this._value),o&&this._raiseDirtyStateChangeEvent(this._isDirty),this._isValidationOverdue=!0,this._isValidationFrequencyElevated&&this._validate(!0)}},n.prototype._leftRightKeyDownListener=function(t,e,n){(t||e)&&n()},n.prototype._leftRightKeyUpListener=function(t,e,n){(t||e)&&(n(),this._changeDatePartSelection(t,e))},n.prototype._manageDirtyState=function(t){var e=!1;return this._isDirty&&!this._compareDates(t,this._originalValue)||(this._isDirty=!this._isDirty,e=!0),e},n.prototype._raiseBroadcastKeyUpEvent=function(t){if(this._broadcastKeyUpHandlers.length>0)for(var e=new AutotaskEditorSystem.BroadcastKeyUpEventArgs(this.id,t),n=0,i=this._broadcastKeyUpHandlers;n<i.length;n++){(0,i[n])(e)}},n.prototype._raiseCalendarClosedEvent=function(){if(this._calendarClosedHandlers.length>0)for(var t=0,e=this._calendarClosedHandlers;t<e.length;t++){(0,e[t])()}},n.prototype._raiseCalendarOpenedEvent=function(){if(this._calendarOpenedHandlers.length>0)for(var t=0,e=this._calendarOpenedHandlers;t<e.length;t++){(0,e[t])()}},n.prototype._raiseChangeEvent=function(){if(this._changeHandlers.length>0)for(var e=new t.ChangeEventArgs(this),n=0,i=this._changeHandlers;n<i.length;n++){(0,i[n])(e)}},n.prototype._raiseDirtyStateChangeEvent=function(t){if(this._dirtyStateChangeHandlers.length>0)for(var e=new AutotaskDirtyStateSystem.DirtyStateChangeEventArgs(t),n=0,i=this._dirtyStateChangeHandlers;n<i.length;n++){(0,i[n])(e)}},n.prototype._raiseImmediateChangeEvent=function(e,n){if(this._immediateChangeHandlers.length>0)for(var i=new t.ImmediateChangeEventArgs(this,e,n),o=0,a=this._immediateChangeHandlers;o<a.length;o++){(0,a[o])(i)}},n.prototype._raiseTabbedAwayEvent=function(t,e){if(this._tabbedAwayHandlers.length>0)for(var n=new AutotaskEditorSystem.TabbedAwayEventArgs(this.id,t,e),i=0,o=this._tabbedAwayHandlers;i<o.length;i++){(0,o[i])(n)}},n.prototype._raiseTabbingAwayEvent=function(t,e){if(this._tabbingAwayHandlers.length>0)for(var n=new AutotaskEditorSystem.TabbingAwayEventArgs(this.id,t,e),i=0,o=this._tabbingAwayHandlers;i<o.length;i++){(0,o[i])(n)}},n.prototype._selectDatePart=function(t){if(null!==this._value){this._inputElement.value=window.autotask.convert.dateToString(this._value,null);var e=0,n=0;if(null===t||0===t)n=this._dateFormatParts[0].length;else if(t===this._dateFormatParts.length-1)e=this._inputElement.value.length-this._dateFormatParts[this._dateFormatParts.length-1].length,n=this._inputElement.value.length;else{for(var i=0;i<t;)e+=this._dateFormatParts[i].length,e++,i++;n=e+this._dateFormatParts[t].length}this._inputElement.setSelectionRange(e,n)}},n.prototype._showCalendarOverlay=function(){var t=this;this._isCalendarOpen=!0,autotask.globalCalendarOverlayManagement.__show(this._overlayLaunchingElement,this._value,this._calendarOffsetLinkValues,(function(e){t._calendarOverlayDateSelected(e)}),(function(){t._calendarOverlayHidden()})),this._raiseCalendarOpenedEvent()},n.prototype._showValidationOverlay=function(){var t=this;autotask.globalValidationOverlay.show(this._inputElement,this.id,this._dateBoxValidation.validationResult.message,!0,(function(){t._validationOverlayClosed()}),null)},n.prototype._updateValue=function(t){var e=this._value?new Date(this._value.getTime()):null;this._value=new Date(t.getTime()),this._inputElement.value=window.autotask.convert.dateToString(t,null);var n=this._manageDirtyState(t);this._raiseImmediateChangeEvent(e,t),n&&this._raiseDirtyStateChangeEvent(this._isDirty)},n.prototype._upDownKeyDownListener=function(t,e,n){(t||e)&&n()},n.prototype._upDownKeyUpListener=function(t,e,n){(t||e)&&(n(),this._incrementOrDecrementSelection(t,e))},n.prototype._validate=function(t){var e=this._dateBoxValidation.validationResult.isValid;return this._isValidationOverdue&&(this._isRequestDataProvidedWhenDisabled||this._isEnabled)&&(e=this._dateBoxValidation.validate(this._value,this._isFormatValid,t,this._inputElement),this._isValidationOverdue=!1),e?autotask.globalValidationOverlay.hide(this.id):this._showValidationOverlay(),e},n.prototype._validationComparisonTargetChange=function(){this.resetValidation(),this._validate(!0)},n.prototype._validationCorrected=function(){this._inputElement.classList.remove(this._invalidCssClass)},n.prototype._validationFailed=function(){this._inputElement.classList.add(this._invalidCssClass),this._isValidationFrequencyElevated=!0},n.prototype._validationOverlayClosed=function(){this._isValidationOverlayDismissed=!0},n.prototype._validationRequiredStateChanged=function(){this.resetValidation(),this._isValidationFrequencyElevated&&this._validate(!0)},n}(AutotaskEditorSystem.Editor);t.DateBox=e}(AutotaskDateBox||(AutotaskDateBox={})),function(t){var e=function(t){function e(e,n,i,o,a){var r=t.call(this,e)||this;return r._invalidDateMessage=n,r._requiredValidatorProvider=i,r._rangeValidator=o,r._comparisonValidator=a,null!==r._comparisonValidator&&(r._comparisonValidator.targetChangeHandler=function(){r._comparisonTargetChange()}),r._comparisonTargetChangeHandlers=[],r._requiredValidator=null,r}return __extends(e,t),e.prototype.applyComparisonTargetLabelText=function(t){null===this._comparisonValidator&&autotask.throwException("The _comparisonValidator cannot be null."),this._comparisonValidator.targetLabelText=t},Object.defineProperty(e.prototype,"_isRequired",{get:function(){return null!==this._requiredValidator},enumerable:!1,configurable:!0}),e.prototype.addComparisonTargetChangeHandler=function(t){this._comparisonTargetChangeHandlers.push(t)},e.prototype.initialize=function(){var t=this;null!==this._requiredValidatorProvider&&(this._requiredValidatorProvider.initialize(),this._requiredValidatorProvider.addRequiredStateChangedHandler((function(){t._requiredStateChanged()})),this._requiredValidator=this._requiredValidatorProvider.createValidator()),null!==this._comparisonValidator&&this._comparisonValidator.initialize()},e.prototype.resetValidationResult=function(t){this._updateValidationResult(new AutotaskEditorSystem.ValidResult,!1,t,!0)},e.prototype.validate=function(t,e,n,i){var o=new AutotaskEditorSystem.ValidResult;return e||(o=new AutotaskEditorSystem.InvalidResult(this._invalidDateMessage,null)),o.isValid&&null!==this._requiredValidator&&(o=this._requiredValidator.validate(t)),o.isValid&&null!==this._rangeValidator&&(o=this._rangeValidator.validate(t)),o.isValid&&null!==this._comparisonValidator&&(o=this._comparisonValidator.validate(t)),this._updateValidationResult(o,n,i,!0),o.isValid},e.prototype._comparisonTargetChange=function(){this._raiseComparisonTargetChangeEvent()},e.prototype._raiseComparisonTargetChangeEvent=function(){for(var t=0,e=this._comparisonTargetChangeHandlers;t<e.length;t++){(0,e[t])()}},e.prototype._requiredStateChanged=function(){var t=this._requiredValidatorProvider;this._requiredValidator=t.createValidator(),this._raiseRequiredStateChanged()},e}(AutotaskEditorSystem.EditorValidation);t.DateBoxValidation=e}(AutotaskDateBox||(AutotaskDateBox={})),function(t){var e=function(){function t(t,e,n){this._editorInstance=t,this._previousValue=e,this._currentValue=n}return Object.defineProperty(t.prototype,"currentValue",{get:function(){return this._currentValue?new Date(this._currentValue.getTime()):null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"editorInstance",{get:function(){return this._editorInstance},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"previousValue",{get:function(){return this._previousValue?new Date(this._previousValue.getTime()):null},enumerable:!1,configurable:!0}),t}();t.ImmediateChangeEventArgs=e}(AutotaskDateBox||(AutotaskDateBox={})),function(t){var e=function(t){function e(e,n,i,o){var a=t.call(this,e,i,o)||this;return a._backingEditorId=n,a._backingDateBoxEditor=void 0,a}return __extends(e,t),Object.defineProperty(e.prototype,"isDirty",{get:function(){return this._backingEditor.isDirty},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isEnabled",{get:function(){return this._backingEditor.isEnabled},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"participantValidation",{get:function(){return this._backingEditor.participantValidation},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_backingEditor",{get:function(){return void 0===this._backingDateBoxEditor?autotask.throwException("_backingDateBoxEditor is undefined."):this._backingDateBoxEditor},enumerable:!1,configurable:!0}),e.prototype.addTabbingAwayHandler=function(t){var e=this;this._backingEditor.addTabbingAwayHandler((function(n){t(new AutotaskEditorSystem.TabbingAwayEventArgs(e.id,n.isShiftKeyPressed,(function(){n.cancel()})))}))},e.prototype.createRequestData=function(){return this._createRequestData(this._backingEditor,"2",!this._backingEditor.isEnabled)},e.prototype.focus=function(){this._backingEditor.focus()},e.prototype.focusEnd=function(){this._backingEditor.focusEnd()},e.prototype.focusStart=function(){this._backingEditor.focusStart()},e.prototype.resetValidation=function(){this._backingEditor.resetValidation()},e.prototype.validate=function(){return this._backingEditor.validate()},e.prototype.__initialize=function(){this._backingDateBoxEditor=autotask.find(this._backingEditorId)},e}(AutotaskEditorSystem.UserDefinedField);t.UserDefinedField=e}(AutotaskDateBox||(AutotaskDateBox={})),function(t){var e=function(t){function e(e,n,i){var o=t.call(this,e)||this;return o._invalidDateMessage=n,o._requiredValidator=i,o}return __extends(e,t),Object.defineProperty(e.prototype,"_isRequired",{get:function(){return null!==this._requiredValidator},enumerable:!1,configurable:!0}),e.prototype.addComparisonTargetChangeHandler=function(){},e.prototype.applyComparisonTargetLabelText=function(t){},e.prototype.initialize=function(){},e.prototype.resetValidationResult=function(t){this._updateValidationResult(new AutotaskEditorSystem.ValidResult,!1,t,!0)},e.prototype.validate=function(t,e,n,i){var o=new AutotaskEditorSystem.ValidResult;return e||(o=new AutotaskEditorSystem.InvalidResult(this._invalidDateMessage,null)),o.isValid&&null!==this._requiredValidator&&(o=this._requiredValidator.validate(t)),this._updateValidationResult(o,n,i,!0),o.isValid},e}(AutotaskEditorSystem.EditorValidation);t.UserDefinedFieldValidation=e}(AutotaskDateBox||(AutotaskDateBox={})),function(t){var e=function(t){function e(e,n,i,o){var a=t.call(this,e)||this;return a._backingEditorId=n,a._externalId=i,a._bindingPropertyName=o,a}return __extends(e,t),Object.defineProperty(e.prototype,"isDirty",{get:function(){return this._backingEditor.isDirty},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isEnabled",{get:function(){return this._backingEditor.isEnabled},enumerable:!1,configurable:!0}),e.prototype.createRequestData=function(){var t=this._backingEditor.createRequestData();return null===t&&(t={}),t[this._bindingPropertyName+".Id"]=this._externalId,t[this._bindingPropertyName+".RenderingType"]="2",t},Object.defineProperty(e.prototype,"participantValidation",{get:function(){return this._backingEditor.participantValidation},enumerable:!1,configurable:!0}),e.prototype.focus=function(){this._backingEditor.focus()},e.prototype.focusEnd=function(){this._backingEditor.focusEnd()},e.prototype.focusStart=function(){this._backingEditor.focusStart()},e.prototype.resetValidation=function(){this._backingEditor.resetValidation()},e.prototype.validate=function(){return this._backingEditor.validate()},e.prototype.resetValue=function(){this._backingEditor.resetValue()},e.prototype.addTabbingAwayHandler=function(t){var e=this;this._backingEditor.addTabbingAwayHandler((function(n){t(new AutotaskEditorSystem.TabbingAwayEventArgs(e.id,n.isShiftKeyPressed,(function(){n.cancel()})))}))},e.prototype.__initialize=function(){this._backingDateBoxEditor=autotask.find(this._backingEditorId)},Object.defineProperty(e.prototype,"_backingEditor",{get:function(){return void 0===this._backingDateBoxEditor?autotask.throwException("_backingDateBoxEditor is undefined."):this._backingDateBoxEditor},enumerable:!1,configurable:!0}),e}(Autotask.LifecycleObject);t.UserDefinedFieldDateBox=e}(AutotaskDateBox||(AutotaskDateBox={})),function(t){var e=function(){function t(t){this._editorInstance=t}return Object.defineProperty(t.prototype,"editorInstance",{get:function(){return this._editorInstance},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"instanceId",{get:function(){return this._editorInstance.id},enumerable:!1,configurable:!0}),t}();t.ChangeEventArgs=e}(AutotaskDecimalBox||(AutotaskDecimalBox={})),function(t){var e=function(e){function n(t,n,i,o,a,r,s,l,u,c){var d=this,h=AutotaskDomSystem.Document.getElementById(t);return(d=e.call(this,t,h,n,i,l,u,c)||this)._numberOfDecimalPlaces=r,d._isTrailingZeroesTrimmingEnabled=s,d._decimalBoxValidation=c,d._changeHandlers=new Array,d._immediateChangeHandlers=new Array,null!==o&&d._changeHandlers.push(o),null!==a&&d._immediateChangeHandlers.push(a),d}return __extends(n,e),Object.defineProperty(n.prototype,"participantValidation",{get:function(){return this._decimalBoxValidation},enumerable:!1,configurable:!0}),n.prototype.addChangeHandler=function(t){this._changeHandlers.push(t)},n.prototype.addImmediateChangeHandler=function(t){this._immediateChangeHandlers.push(t)},n.prototype.__initialize=function(){this._decimalBoxValidation.initialize()},n.prototype._convertNumberToDisplayString=function(t){return this._convertNumberToString(t)},n.prototype._convertNumberToSerializedString=function(t){return this._convertNumberToString(t)},n.prototype._convertDisplayStringToNumber=function(t){return window.autotask.convert.stringToDecimal(t,this._numberOfDecimalPlaces)},n.prototype._raiseChangeEvent=function(){if(this._changeHandlers.length>0)for(var e=new t.ChangeEventArgs(this),n=0,i=this._changeHandlers;n<i.length;n++){(0,i[n])(e)}},n.prototype._raiseImmediateChangeEvent=function(e,n){if(this._immediateChangeHandlers.length>0)for(var i=new t.ImmediateChangeEventArgs(this,e,n),o=0,a=this._immediateChangeHandlers;o<a.length;o++){(0,a[o])(i)}},n.prototype._convertNumberToString=function(t){var e=null;return null!==t&&(e=window.autotask.convert.decimalToString(t,this._numberOfDecimalPlaces,this._isTrailingZeroesTrimmingEnabled)),e},n}(AutotaskEditorSystem.NumberBox);t.DecimalBox=e}(AutotaskDecimalBox||(AutotaskDecimalBox={})),function(t){var e=function(t){function e(e,n,i,o){var a=t.call(this,e)||this;return a._invalidNumberMessage=n,a._requiredValidatorProvider=i,a._rangeValidator=o,a._requiredValidator=null,a}return __extends(e,t),Object.defineProperty(e.prototype,"_isRequired",{get:function(){return null!==this._requiredValidator},enumerable:!1,configurable:!0}),e.prototype.initialize=function(){var t=this;null!==this._requiredValidatorProvider&&(this._requiredValidatorProvider.initialize(),this._requiredValidatorProvider.addRequiredStateChangedHandler((function(){t._requiredStateChanged()})),this._requiredValidator=this._requiredValidatorProvider.createValidator())},e.prototype.resetValidationResult=function(t){this._updateValidationResult(new AutotaskEditorSystem.ValidResult,!1,t,!0)},e.prototype.validate=function(t,e,n,i){var o=new AutotaskEditorSystem.ValidResult;return e||(o=new AutotaskEditorSystem.InvalidResult(this._invalidNumberMessage,null)),o.isValid&&null!==this._requiredValidator&&(o=this._requiredValidator.validate(t)),o.isValid&&null!==this._rangeValidator&&(o=this._rangeValidator.validate(t)),this._updateValidationResult(o,n,i,!0),o.isValid},e.prototype._requiredStateChanged=function(){var t=this._requiredValidatorProvider;this._requiredValidator=t.createValidator(),this._raiseRequiredStateChanged()},e}(AutotaskEditorSystem.EditorValidation);t.DecimalBoxValidation=e}(AutotaskDecimalBox||(AutotaskDecimalBox={})),function(t){var e=function(){function t(t,e,n){this._editorInstance=t,this._previousValue=e,this._currentValue=n}return Object.defineProperty(t.prototype,"currentValue",{get:function(){return this._currentValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"editorInstance",{get:function(){return this._editorInstance},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"previousValue",{get:function(){return this._previousValue},enumerable:!1,configurable:!0}),t}();t.ImmediateChangeEventArgs=e}(AutotaskDecimalBox||(AutotaskDecimalBox={})),function(t){var e=function(t){function e(e,n,i,o,a,r,s,l){var u=t.call(this,e,o,s)||this;u._button=null,u._buttonId=n,u._backingEditorId=i,u._unmaskRoute=l,u._backingDecimalBoxEditor=void 0,u._originalValue=null,u._isDirty=!1,u._dirtyStateChangeHandlers=[],u._disposingHandlers=[],u._isEnabled=a,u._hasServerValue=r;var c=AutotaskDomSystem.Document.getElementById(e).children[0];return u._maskElement=AutotaskDomSystem.Document.getChildElementByClassName(c,"Mask"),u}return __extends(e,t),Object.defineProperty(e.prototype,"hasServerValue",{get:function(){return this._hasServerValue},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isDirty",{get:function(){return this._isDirty},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isEnabled",{get:function(){return this._isEnabled},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"participantValidation",{get:function(){return this._backingEditor.participantValidation},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_backingEditor",{get:function(){return void 0===this._backingDecimalBoxEditor?autotask.throwException("_backingDecimalBoxEditor is undefined."):this._backingDecimalBoxEditor},enumerable:!1,configurable:!0}),e.prototype.addDirtyStateChangeHandler=function(t){this._dirtyStateChangeHandlers.push(t)},e.prototype.addDisposingHandler=function(t){this._disposingHandlers.push(t)},e.prototype.createRequestData=function(){return this._createRequestData(this._backingEditor,"3",this.isDirty)},e.prototype.focus=function(){this._backingEditor.focus()},e.prototype.resetValidation=function(){this._backingEditor.resetValidation()},e.prototype.validate=function(){return this._backingEditor.validate()},e.prototype.__dispose=function(){this._raiseDisposingEvent()},e.prototype.__initialize=function(){var t=this;if(this._backingDecimalBoxEditor=autotask.find(this._backingEditorId),this._backingDecimalBoxEditor.addBlurHandler((function(){t._backingDecimalBoxBlurHandler()})),this._backingDecimalBoxEditor.addImmediateChangeHandler((function(){t._backingDecimalBoxImmediateChangeHandler()})),null!==this._buttonId){this._button=autotask.find(this._buttonId);var e=new AutotaskButtonSystem.ClickEventHandler((function(){t._buttonClickHandler()}));this._button.addEventHandler(e)}},e.prototype._backingDecimalBoxImmediateChangeHandler=function(){this._manageDirtyState(this._backingEditor.value)&&this._raiseDirtyStateChangeEvent(this._isDirty)},e.prototype._backingDecimalBoxBlurHandler=function(){this._isDirty||(this._backingEditor.value=null,this._originalValue=null),this._mask()},e.prototype._buttonClickHandler=function(){var t=this;this._isDirty?this._unmask():this._unmaskRoute.getMaskedNumericValue((function(e){return t._unmaskValueSuccessHandler(e)}))},e.prototype._manageDirtyState=function(t){var e=!1;return this._isDirty&&t!==this._originalValue||(this._isDirty=!this._isDirty,e=!0),e},e.prototype._mask=function(){this._backingEditor.isEnabled=!1,this._maskElement.classList.remove("Inactive"),null!==this._button&&(this._button.isEnabled=!0)},e.prototype._raiseDirtyStateChangeEvent=function(t){if(this._dirtyStateChangeHandlers.length>0)for(var e=new AutotaskDirtyStateSystem.DirtyStateChangeEventArgs(t),n=0,i=this._dirtyStateChangeHandlers;n<i.length;n++){(0,i[n])(e)}},e.prototype._raiseDisposingEvent=function(){if(this._disposingHandlers.length>0)for(var t=new Autotask.DisposingEventArgs(this.id),e=0,n=this._disposingHandlers;e<n.length;e++){(0,n[e])(t)}},e.prototype._unmask=function(){this._backingEditor.isEnabled=!0,this._backingEditor.focus(),this._maskElement.classList.add("Inactive"),null!==this._button&&(this._button.isEnabled=!1)},e.prototype._unmaskValueSuccessHandler=function(t){this._backingEditor.value=t,this._originalValue=this._backingEditor.value,this._unmask()},e}(AutotaskEditorSystem.MaskedUserDefinedField);t.MaskedUserDefinedField=e}(AutotaskDecimalBox||(AutotaskDecimalBox={})),function(t){var e=function(t){function e(e,n,i){var o=t.call(this,e)||this;return o._maskedEditorId=e,o._invalidNumberMessage=n,o._requiredValidator=i,o}return __extends(e,t),Object.defineProperty(e.prototype,"_isRequired",{get:function(){return null!==this._requiredValidator},enumerable:!1,configurable:!0}),e.prototype.initialize=function(){},e.prototype.resetValidationResult=function(t){this._updateValidationResult(new AutotaskEditorSystem.ValidResult,!1,t,!0)},e.prototype.validate=function(t,e,n,i){var o=new AutotaskEditorSystem.ValidResult,a=autotask.find(this._maskedEditorId);return!a.isEnabled||a.hasServerValue&&!a.isDirty||(e||(o=new AutotaskEditorSystem.InvalidResult(this._invalidNumberMessage,null)),o.isValid&&null!==this._requiredValidator&&(o=this._requiredValidator.validate(t))),this._updateValidationResult(o,n,i,!0),o.isValid},e}(AutotaskEditorSystem.EditorValidation);t.MaskedUserDefinedFieldValidation=e}(AutotaskDecimalBox||(AutotaskDecimalBox={})),function(t){var e=function(t){function e(e,n,i,o){var a=t.call(this,e,i,o)||this;return a._backingEditorId=n,a._backingDecimalBoxEditor=void 0,a}return __extends(e,t),Object.defineProperty(e.prototype,"isDirty",{get:function(){return this._backingEditor.isDirty},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isEnabled",{get:function(){return this._backingEditor.isEnabled},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"participantValidation",{get:function(){return this._backingEditor.participantValidation},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_backingEditor",{get:function(){return void 0===this._backingDecimalBoxEditor?autotask.throwException("_backingDecimalBoxEditor is undefined."):this._backingDecimalBoxEditor},enumerable:!1,configurable:!0}),e.prototype.addTabbingAwayHandler=function(t){var e=this;this._backingEditor.addTabbingAwayHandler((function(n){t(new AutotaskEditorSystem.TabbingAwayEventArgs(e.id,n.isShiftKeyPressed,(function(){n.cancel()})))}))},e.prototype.createRequestData=function(){return this._createRequestData(this._backingEditor,"3",!this._backingEditor.isEnabled)},e.prototype.focus=function(){this._backingEditor.focus()},e.prototype.focusEnd=function(){this._backingEditor.focusEnd()},e.prototype.focusStart=function(){this._backingEditor.focusStart()},e.prototype.resetValidation=function(){this._backingEditor.resetValidation()},e.prototype.validate=function(){return this._backingEditor.validate()},e.prototype.__initialize=function(){this._backingDecimalBoxEditor=autotask.find(this._backingEditorId)},e}(AutotaskEditorSystem.UserDefinedField);t.UserDefinedField=e}(AutotaskDecimalBox||(AutotaskDecimalBox={})),function(t){var e=function(t){function e(e,n,i){var o=t.call(this,e)||this;return o._invalidNumberMessage=n,o._requiredValidator=i,o}return __extends(e,t),Object.defineProperty(e.prototype,"_isRequired",{get:function(){return null!==this._requiredValidator},enumerable:!1,configurable:!0}),e.prototype.initialize=function(){},e.prototype.resetValidationResult=function(t){this._updateValidationResult(new AutotaskEditorSystem.ValidResult,!1,t,!0)},e.prototype.validate=function(t,e,n,i){var o=new AutotaskEditorSystem.ValidResult;return e||(o=new AutotaskEditorSystem.InvalidResult(this._invalidNumberMessage,null)),o.isValid&&null!==this._requiredValidator&&(o=this._requiredValidator.validate(t)),this._updateValidationResult(o,n,i,!0),o.isValid},e}(AutotaskEditorSystem.EditorValidation);t.UserDefinedFieldValidation=e}(AutotaskDecimalBox||(AutotaskDecimalBox={})),function(t){var e=function(t){function e(e,n,i,o){var a=t.call(this,e)||this;return a._backingEditorId=n,a._externalId=i,a._bindingPropertyName=o,a}return __extends(e,t),Object.defineProperty(e.prototype,"isDirty",{get:function(){return this._backingEditor.isDirty},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isEnabled",{get:function(){return this._backingEditor.isEnabled},enumerable:!1,configurable:!0}),e.prototype.createRequestData=function(){var t=this._backingEditor.createRequestData();return null===t&&(t={}),t[this._bindingPropertyName+".Id"]=this._externalId,t[this._bindingPropertyName+".RenderingType"]="3",t},Object.defineProperty(e.prototype,"participantValidation",{get:function(){return this._backingEditor.participantValidation},enumerable:!1,configurable:!0}),e.prototype.focus=function(){this._backingEditor.focus()},e.prototype.focusEnd=function(){this._backingEditor.focusEnd()},e.prototype.focusStart=function(){this._backingEditor.focusStart()},e.prototype.resetValidation=function(){this._backingEditor.resetValidation()},e.prototype.validate=function(){return this._backingEditor.validate()},e.prototype.resetValue=function(){this._backingEditor.resetValue()},e.prototype.addTabbingAwayHandler=function(t){var e=this;this._backingEditor.addTabbingAwayHandler((function(n){t(new AutotaskEditorSystem.TabbingAwayEventArgs(e.id,n.isShiftKeyPressed,(function(){n.cancel()})))}))},e.prototype.__initialize=function(){this._backingDecimalBoxEditor=autotask.find(this._backingEditorId)},Object.defineProperty(e.prototype,"_backingEditor",{get:function(){return void 0===this._backingDecimalBoxEditor?autotask.throwException("_backingDecimalBoxEditor is undefined."):this._backingDecimalBoxEditor},enumerable:!1,configurable:!0}),e}(Autotask.LifecycleObject);t.UserDefinedFieldDecimalBox=e}(AutotaskDecimalBox||(AutotaskDecimalBox={})),function(t){var e=function(){function t(t){this._editorInstance=t}return Object.defineProperty(t.prototype,"editorInstance",{get:function(){return this._editorInstance},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"instanceId",{get:function(){return this._editorInstance.id},enumerable:!1,configurable:!0}),t}();t.ChangeEventArgs=e}(AutotaskDropDownList||(AutotaskDropDownList={})),function(t){var e=function(e){function n(t,n,i,o,a){var r=e.call(this,t)||this;return r._isEnabled=n,r._changeHandlers=new Array,null!==i&&r._changeHandlers.push(i),r._immediateChangeHandlers=new Array,r._bindingPropertyName=o,r._dropDownListValidation=a,r._dropDownListValidation.addRequiredStateChangedHandler((function(){r._validationRequiredStateChanged()})),r._dropDownListValidation.addValidationCorrectedHandler((function(){r._validationCorrected()})),r._dropDownListValidation.addValidationFailedHandler((function(){r._validationFailed()})),r._selectElement=AutotaskDomSystem.Document.getElementById(t),r._selectElement.addEventListener("blur",(function(){r._blurListener()})),r._selectElement.addEventListener("change",(function(){r._changeListener()})),r._selectElement.addEventListener("focus",(function(){r._focusListener()})),r._originalValue=r._selectElement.value,r._value=r._originalValue,r._broadcastKeyUpHandlers=[],r._defaultItemValue="",r._dirtyStateChangeHandlers=[],r._tabbedAwayHandlers=[],r._tabbingAwayHandlers=[],r._invalidCssClass="Invalid",r._isDirty=!1,r._isTabKeyDownHandled=!1,r._isValidationFrequencyElevated=!1,r._isValidationOverdue=!0,r._isValidationOverlayDismissed=!1,r}return __extends(n,e),Object.defineProperty(n.prototype,"count",{get:function(){return this._selectElement.options.length},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"participantValidation",{get:function(){return this._dropDownListValidation},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isDirty",{get:function(){return this._isDirty},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isEnabled",{get:function(){return this._isEnabled},set:function(t){t!==this._isEnabled&&(this._isEnabled=t,this._selectElement.disabled=!t,t?this._isValidationFrequencyElevated&&this._validate(!1):(this._isValidationOverdue=!this._dropDownListValidation.validationResult.isValid,this._dropDownListValidation.resetValidationResult(this._selectElement)))},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"selectedIndex",{get:function(){return this._selectElement.selectedIndex},set:function(t){if(t>=0&&t<this._selectElement.options.length){var e=this._selectElement.options[t];this.value=e.value}else autotask.throwException("DropDownList.set_selectedIndex: index value out of range: "+t.toString())},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"text",{get:function(){return this._selectElement.options[this._selectElement.selectedIndex].text},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"value",{get:function(){return this._value},set:function(t){var e=null===t?this._defaultItemValue:t.toString();if(e!==this._value)if(this.contains(e))this._selectElement.value=e,this._value=e,this._manageDirtyState(this._value)&&this._raiseDirtyStateChangeEvent(this._isDirty),this._isValidationOverdue=!0,this._isValidationFrequencyElevated&&this._validate(!1);else{var n=null===t?"null":t.toString();autotask.throwException("DropDownList.set_value: there is no option for value "+n)}},enumerable:!1,configurable:!0}),n.prototype.addBroadcastKeyUpHandler=function(t){var e=this;this._broadcastKeyUpHandlers.push(t),1===this._broadcastKeyUpHandlers.length&&this._selectElement.addEventListener("keyup",(function(t){e._keyUpListener(t)}))},n.prototype.addChangeHandler=function(t){this._changeHandlers.push(t)},n.prototype.addImmediateChangeHandler=function(t){this._immediateChangeHandlers.push(t)},n.prototype.addDirtyStateChangeHandler=function(t){this._dirtyStateChangeHandlers.push(t)},n.prototype.addOption=function(t,e,n){this._addOption(t,e),n&&(this.value=t)},n.prototype.addTabbedAwayHandler=function(t){var e=this;this._tabbedAwayHandlers.push(t),this._broadcastKeyUpHandlers.length+this._tabbedAwayHandlers.length===1&&this._selectElement.addEventListener("keyup",(function(t){e._keyUpListener(t)}))},n.prototype.addTabbingAwayHandler=function(t){var e=this;this._tabbingAwayHandlers.push(t),1===this._tabbingAwayHandlers.length&&this._selectElement.addEventListener("keydown",(function(t){e._keyDownListener(t)}))},n.prototype.clearValue=function(){this.contains(this._defaultItemValue)&&(this.value=null)},n.prototype.contains=function(t){return null!==this._findOptionElement(t)},n.prototype.createRequestData=function(){var t=null;if(null!==this._bindingPropertyName){t={};var e=null;this._isEnabled?e=this._value:t[this._bindingPropertyName+"_IsDisabled"]=AutotaskRequestDataSystem.ValueSerializer.serializeBoolean(!0),t[this._bindingPropertyName]=e}return t},n.prototype.focus=function(){this._selectElement.focus()},n.prototype.focusEnd=function(){this.focus()},n.prototype.focusStart=function(){this.focus()},n.prototype.modifyText=function(t,e){var n=this._findOptionElement(t);null!==n?(n.text=e,n.title=e):autotask.throwException("DropDownList.modifyText: there is no option for value "+t)},n.prototype.populate=function(t){if(this._selectElement.options.length>0){var e=this._selectElement.options.length>0&&this._selectElement.options[0].value===this._defaultItemValue;this._removeAllOptions(),e&&this._addOption(this._defaultItemValue,"")}for(var n=null,i=0,o=t;i<o.length;i++){var a=o[i];this._addOption(a.Value,a.Text),a.Selected&&(n=a.Value)}null===n?this._value=this._selectElement.options.length>0?this._selectElement.value:"":(this._selectElement.value=n,this._value=n),this._manageDirtyState(this._value)&&this._raiseDirtyStateChangeEvent(this._isDirty),this._isValidationOverdue=!0,this._isValidationFrequencyElevated&&this._validate(!1)},n.prototype.removeAllOptions=function(){if(this._selectElement.options.length>0){var t=this._selectElement.options[0].value===this._defaultItemValue;this._removeAllOptions(),t?(this._addOption(this._defaultItemValue,""),this.value=null):(this._value="",this._manageDirtyState(this._value)&&this._raiseDirtyStateChangeEvent(this._isDirty),this._isValidationOverdue=!0,this._validate(!1))}},n.prototype.removeFocus=function(){this._selectElement.blur()},n.prototype.removeOptionByValue=function(t){var e=this._findOptionIndex(t);null!==e?(this._selectElement.remove(e),this.value=this._selectElement.value):autotask.throwException("DropDownList.removeOptionByValue: there is no option for value "+t)},n.prototype.resetValidation=function(){this._isValidationOverdue=!0},n.prototype.resetValue=function(){this.value=this._originalValue},n.prototype.validate=function(){return this._validate(!1)},n.prototype.__initialize=function(){this._dropDownListValidation.initialize()},n._createOptionElement=function(t,e){var n=document.createElement("option");return n.value=t,n.text=e,n.title=e,n},n.prototype._addOption=function(t,e){var i=n._createOptionElement(t,e);this._selectElement.add(i)},n.prototype._blurListener=function(){this._isTabKeyDownHandled=!1},n.prototype._changeListener=function(){if(this._selectElement.value!==this._value){var t=this._value;this._value=this._selectElement.value;var e=this._manageDirtyState(this._value);this._raiseImmediateChangeEvent(t,this._value),e&&this._raiseDirtyStateChangeEvent(this._isDirty),this._raiseChangeEvent(),this._isValidationOverdue=!0,this._validate(!0)}},n.prototype._findOptionElement=function(t){for(var e=null,n=0;n<this._selectElement.options.length;n++)if(this._selectElement.options[n].value===t){e=this._selectElement.options[n];break}return e},n.prototype._findOptionIndex=function(t){for(var e=null,n=0;n<this._selectElement.options.length;n++)if(this._selectElement.options[n].value===t){e=n;break}return e},n.prototype._focusListener=function(){this._isValidationOverlayDismissed||!this._isValidationFrequencyElevated||this._dropDownListValidation.validationResult.isValid||this._showValidationOverlay()},n.prototype._keyDownListener=function(t){AutotaskDomSystem.KeyCode.isTab(t.which)&&(this._isTabKeyDownHandled=!0,this._raiseTabbingAwayEvent(t.shiftKey,(function(){t.preventDefault()})))},n.prototype._keyUpListener=function(t){AutotaskDomSystem.KeyCode.isEscape(t.which)?this._raiseBroadcastKeyUpEvent(t.which):AutotaskDomSystem.KeyCode.isTab(t.which)&&this._isTabKeyDownHandled&&(this._isTabKeyDownHandled=!1,this._raiseTabbedAwayEvent(t.shiftKey))},n.prototype._manageDirtyState=function(t){var e=!1;return this._isDirty&&t!==this._originalValue||(this._isDirty=!this._isDirty,e=!0),e},n.prototype._raiseChangeEvent=function(){if(this._changeHandlers.length>0)for(var e=new t.ChangeEventArgs(this),n=0,i=this._changeHandlers;n<i.length;n++){(0,i[n])(e)}},n.prototype._raiseBroadcastKeyUpEvent=function(t){if(this._broadcastKeyUpHandlers.length>0)for(var e=new AutotaskEditorSystem.BroadcastKeyUpEventArgs(this.id,t),n=0,i=this._broadcastKeyUpHandlers;n<i.length;n++){(0,i[n])(e)}},n.prototype._raiseDirtyStateChangeEvent=function(t){if(this._dirtyStateChangeHandlers.length>0)for(var e=new AutotaskDirtyStateSystem.DirtyStateChangeEventArgs(t),n=0,i=this._dirtyStateChangeHandlers;n<i.length;n++){(0,i[n])(e)}},n.prototype._raiseImmediateChangeEvent=function(e,n){if(this._immediateChangeHandlers.length>0)for(var i=e===this._defaultItemValue?null:e,o=n===this._defaultItemValue?null:n,a=new t.ImmediateChangeEventArgs(this,i,o),r=0,s=this._immediateChangeHandlers;r<s.length;r++){(0,s[r])(a)}},n.prototype._raiseTabbedAwayEvent=function(t){if(this._tabbedAwayHandlers.length>0)for(var e=new AutotaskEditorSystem.TabbedAwayEventArgs(this.id,t,!0),n=0,i=this._tabbedAwayHandlers;n<i.length;n++){(0,i[n])(e)}},n.prototype._raiseTabbingAwayEvent=function(t,e){if(this._tabbingAwayHandlers.length>0)for(var n=new AutotaskEditorSystem.TabbingAwayEventArgs(this.id,t,e),i=0,o=this._tabbingAwayHandlers;i<o.length;i++){(0,o[i])(n)}},n.prototype._removeAllOptions=function(){for(var t=this._selectElement.options.length-1;t>=0;t--)this._selectElement.remove(t)},n.prototype._showValidationOverlay=function(){var t=this;autotask.globalValidationOverlay.show(this._selectElement,this.id,this._dropDownListValidation.validationResult.message,!0,(function(){t._validationOverlayClosed()}),null)},n.prototype._validate=function(t){var e=this._dropDownListValidation.validationResult.isValid;return this._isValidationOverdue&&this._isEnabled&&(e=this._dropDownListValidation.validate(this._value,t,this._selectElement)),e?autotask.globalValidationOverlay.hide(this.id):this._showValidationOverlay(),e},n.prototype._validationCorrected=function(){this._selectElement.classList.remove(this._invalidCssClass)},n.prototype._validationFailed=function(){this._selectElement.classList.add(this._invalidCssClass),this._isValidationFrequencyElevated=!0},n.prototype._validationOverlayClosed=function(){this._isValidationOverlayDismissed=!0},n.prototype._validationRequiredStateChanged=function(){this.resetValidation(),this._isValidationFrequencyElevated&&this._validate(!0)},n}(AutotaskEditorSystem.Editor);t.DropDownList=e}(AutotaskDropDownList||(AutotaskDropDownList={})),function(t){var e=function(t){function e(e,n){var i=t.call(this,e)||this;return i._requiredValidatorProvider=n,i._requiredValidator=null,i}return __extends(e,t),Object.defineProperty(e.prototype,"_isRequired",{get:function(){return null!==this._requiredValidator},enumerable:!1,configurable:!0}),e.prototype.initialize=function(){var t=this;null!==this._requiredValidatorProvider&&(this._requiredValidatorProvider.initialize(),this._requiredValidatorProvider.addRequiredStateChangedHandler((function(){t._requiredStateChanged()})),this._requiredValidator=this._requiredValidatorProvider.createValidator())},e.prototype.resetValidationResult=function(t){this._updateValidationResult(new AutotaskEditorSystem.ValidResult,!1,t,!1)},e.prototype.validate=function(t,e,n){var i=new AutotaskEditorSystem.ValidResult;return null!==this._requiredValidator&&(i=this._requiredValidator.validate(t)),this._updateValidationResult(i,e,n,!1),i.isValid},e.prototype._requiredStateChanged=function(){var t=this._requiredValidatorProvider;this._requiredValidator=t.createValidator(),this._raiseRequiredStateChanged()},e}(AutotaskEditorSystem.EditorValidation);t.DropDownListValidation=e}(AutotaskDropDownList||(AutotaskDropDownList={})),function(t){var e=function(){function t(t,e,n){this._editorInstance=t,this._previousValue=e,this._currentValue=n}return Object.defineProperty(t.prototype,"currentValue",{get:function(){return this._currentValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"editorInstance",{get:function(){return this._editorInstance},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"previousValue",{get:function(){return this._previousValue},enumerable:!1,configurable:!0}),t}();t.ImmediateChangeEventArgs=e}(AutotaskDropDownList||(AutotaskDropDownList={})),function(t){var e=function(t){function e(e,n,i,o){var a=t.call(this,e,i,o)||this;return a._backingEditorId=n,a._backingDropDownListEditor=void 0,a}return __extends(e,t),Object.defineProperty(e.prototype,"isDirty",{get:function(){return this._backingEditor.isDirty},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isEnabled",{get:function(){return this._backingEditor.isEnabled},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"participantValidation",{get:function(){return this._backingEditor.participantValidation},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_backingEditor",{get:function(){return void 0===this._backingDropDownListEditor?autotask.throwException("_backingDropDownListEditor is undefined."):this._backingDropDownListEditor},enumerable:!1,configurable:!0}),e.prototype.addTabbingAwayHandler=function(t){var e=this;this._backingEditor.addTabbingAwayHandler((function(n){t(new AutotaskEditorSystem.TabbingAwayEventArgs(e.id,n.isShiftKeyPressed,(function(){n.cancel()})))}))},e.prototype.createRequestData=function(){return this._createRequestData(this._backingEditor,"4",!this._backingEditor.isEnabled)},e.prototype.focus=function(){this._backingEditor.focus()},e.prototype.focusEnd=function(){this._backingEditor.focusEnd()},e.prototype.focusStart=function(){this._backingEditor.focusStart()},e.prototype.resetValidation=function(){this._backingEditor.resetValidation()},e.prototype.validate=function(){return this._backingEditor.validate()},e.prototype.__initialize=function(){this._backingDropDownListEditor=autotask.find(this._backingEditorId)},e}(AutotaskEditorSystem.UserDefinedField);t.UserDefinedField=e}(AutotaskDropDownList||(AutotaskDropDownList={})),function(t){var e=function(t){function e(e,n){var i=t.call(this,e)||this;return i._requiredValidator=n,i}return __extends(e,t),Object.defineProperty(e.prototype,"_isRequired",{get:function(){return null!==this._requiredValidator},enumerable:!1,configurable:!0}),e.prototype.initialize=function(){},e.prototype.resetValidationResult=function(t){this._updateValidationResult(new AutotaskEditorSystem.ValidResult,!1,t,!1)},e.prototype.validate=function(t,e,n){var i=new AutotaskEditorSystem.ValidResult;return null!==this._requiredValidator&&(i=this._requiredValidator.validate(t)),this._updateValidationResult(i,e,n,!1),i.isValid},e}(AutotaskEditorSystem.EditorValidation);t.UserDefinedFieldValidation=e}(AutotaskDropDownList||(AutotaskDropDownList={})),function(t){var e=function(){function t(t){this._editorInstance=t}return Object.defineProperty(t.prototype,"editorInstance",{get:function(){return this._editorInstance},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"instanceId",{get:function(){return this._editorInstance.id},enumerable:!1,configurable:!0}),t}();t.ChangeEventArgs=e}(AutotaskEmailArea||(AutotaskEmailArea={})),function(t){var e=function(e){function n(t,n,i,o,a,r){var s=e.call(this,t)||this;return s._delimiter="; ",s._textAreaElement=AutotaskDomSystem.Document.getElementById(t),s._textAreaElement.addEventListener("blur",(function(){s._blurListener()})),s._textAreaElement.addEventListener("change",(function(){s._changeListener()})),s._textAreaElement.addEventListener("focus",(function(){s._focusListener()})),s._textAreaElement.addEventListener("input",(function(){s._inputListener()})),s._arrayComparer=new AutotaskEditorSystem.ArrayComparer(null,null),s._formatValidator=new AutotaskEditorSystem.EmailAddressFormatValidator,s._value=null,s._updateValueArray(s._textAreaElement.value),s._originalValue=s._value,s._isEnabled=n,s._changeHandlers=[],null!==i&&s._changeHandlers.push(i),s._immediateChangeHandlers=[],null!==o&&s._immediateChangeHandlers.push(o),s._bindingPropertyName=a,s._emailAreaValidation=r,s._emailAreaValidation.addValidationCorrectedHandler((function(){s._validationCorrected()})),s._emailAreaValidation.addValidationFailedHandler((function(){s._validationFailed()})),s._blurHandlers=[],s._broadcastKeyUpHandlers=[],s._dirtyStateChangeHandlers=[],s._tabbedAwayHandlers=[],s._tabbingAwayHandlers=[],s._invalidCssClass="Invalid",s._isDirty=!1,s._isFormatValid=!0,s._isTabKeyDownHandled=!1,s._isValidationFrequencyElevated=!1,s._isValidationOverdue=!0,s._isValidationOverlayDismissed=!1,s}return __extends(n,e),Object.defineProperty(n.prototype,"participantValidation",{get:function(){return this._emailAreaValidation},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isEnabled",{get:function(){return this._isEnabled},set:function(t){t!==this._isEnabled&&(this._isEnabled=t,this._textAreaElement.disabled=!t,t?this._isValidationFrequencyElevated&&this._validate(!1):(this._isValidationOverdue=!this._emailAreaValidation.validationResult.isValid,this._emailAreaValidation.resetValidationResult(this._textAreaElement)))},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isDirty",{get:function(){return this._isDirty},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"value",{get:function(){return this._value},enumerable:!1,configurable:!0}),n.prototype.add=function(t){var e=!1;if(this._isFormatValid&&this._formatValidator.validate(t)){var n=this._value;this._textAreaElement.value.length>0?this._textAreaElement.value+=this._delimiter+t:this._textAreaElement.value=t,this._updateValueArray(this._textAreaElement.value);var i=this._manageDirtyState(this._value);this._raiseImmediateChangeEvent(n,this._value),i&&this._raiseDirtyStateChangeEvent(this._isDirty),e=!0}return e},n.prototype.addBlurHandler=function(t){this._blurHandlers.push(t)},n.prototype.addBroadcastKeyUpHandler=function(t){var e=this;this._broadcastKeyUpHandlers.push(t),this._broadcastKeyUpHandlers.length+this._tabbedAwayHandlers.length===1&&this._textAreaElement.addEventListener("keyup",(function(t){e._keyUpListener(t)}))},n.prototype.addChangeHandler=function(t){this._changeHandlers.push(t)},n.prototype.addDirtyStateChangeHandler=function(t){this._dirtyStateChangeHandlers.push(t)},n.prototype.addImmediateChangeHandler=function(t){this._immediateChangeHandlers.push(t)},n.prototype.addTabbedAwayHandler=function(t){var e=this;this._tabbedAwayHandlers.push(t),this._broadcastKeyUpHandlers.length+this._tabbedAwayHandlers.length===1&&this._textAreaElement.addEventListener("keyup",(function(t){e._keyUpListener(t)}))},n.prototype.addTabbingAwayHandler=function(t){var e=this;this._tabbingAwayHandlers.push(t),1===this._tabbingAwayHandlers.length&&this._textAreaElement.addEventListener("keydown",(function(t){e._keyDownListener(t)}))},n.prototype.clear=function(){var t=this._value;this._textAreaElement.value="",this._updateValueArray(this._textAreaElement.value);var e=this._manageDirtyState(this._value);this._raiseImmediateChangeEvent(t,this._value),e&&this._raiseDirtyStateChangeEvent(this._isDirty)},n.prototype.createRequestData=function(){var t=null;if(null!==this._bindingPropertyName){var e=null;this._isEnabled&&null!==this._value&&(e=this._value.join(";")),(t={})[this._bindingPropertyName]=e}return t},n.prototype.focus=function(){this._textAreaElement.focus()},n.prototype.focusEnd=function(){this.focus()},n.prototype.focusStart=function(){this.focus()},n.prototype.resetValidation=function(){this._isValidationOverdue=!0},n.prototype.validate=function(){return this._validate(!1)},n.prototype.__initialize=function(){this._emailAreaValidation.initialize()},n.prototype._blurListener=function(){this._isTabKeyDownHandled=!1,this._raiseBlurEvent()},n.prototype._changeListener=function(){this._raiseChangeEvent(),this._validate(!0)},n.prototype._createValueArray=function(t){var e=null,n=!0;if(t.length>0){var i=new RegExp(this._delimiter+"$"),o=t.replace(/[,|;|\s]+/g,this._delimiter).replace(i,"");if(o.length>0)for(var a=0,r=e=o.split(this._delimiter);a<r.length;a++){var s=r[a];if(!this._formatValidator.validate(s)){n=!1,e=null;break}}}return{value:e,isFormatValid:n}},n.prototype._focusListener=function(){this._isValidationOverlayDismissed||!this._isValidationFrequencyElevated||this._isFormatValid&&this._emailAreaValidation.validationResult.isValid||this._showValidationOverlay()},n.prototype._inputListener=function(){var t=this._value,e=this._createValueArray(this._textAreaElement.value);if(this._isFormatValid=e.isFormatValid,!this._arrayComparer.equals(e.value,t,!1)){this._value=e.value;var n=this._manageDirtyState(this._value);this._raiseImmediateChangeEvent(t,this._value),n&&this._raiseDirtyStateChangeEvent(this._isDirty)}this._isValidationOverdue=!0,this._isValidationFrequencyElevated&&this._validate(!0)},n.prototype._keyDownListener=function(t){AutotaskDomSystem.KeyCode.isTab(t.which)&&this._raiseTabbingAwayEvent(t.shiftKey,(function(){t.preventDefault()}))},n.prototype._keyUpListener=function(t){AutotaskDomSystem.KeyCode.isEscape(t.which)?this._raiseBroadcastKeyUpEvent(t.which):AutotaskDomSystem.KeyCode.isTab(t.which)&&this._isTabKeyDownHandled&&(this._isTabKeyDownHandled=!1,this._raiseTabbedAwayEvent(t.shiftKey))},n.prototype._manageDirtyState=function(t){var e=!1;return this._isDirty&&!this._arrayComparer.equals(t,this._originalValue,!1)||(this._isDirty=!this._isDirty,e=!0),e},n.prototype._raiseBlurEvent=function(){for(var t=0,e=this._blurHandlers;t<e.length;t++){(0,e[t])()}},n.prototype._raiseBroadcastKeyUpEvent=function(t){if(this._broadcastKeyUpHandlers.length>0)for(var e=new AutotaskEditorSystem.BroadcastKeyUpEventArgs(this.id,t),n=0,i=this._broadcastKeyUpHandlers;n<i.length;n++){(0,i[n])(e)}},n.prototype._raiseChangeEvent=function(){if(this._changeHandlers.length>0)for(var e=new t.ChangeEventArgs(this),n=0,i=this._changeHandlers;n<i.length;n++){(0,i[n])(e)}},n.prototype._raiseDirtyStateChangeEvent=function(t){if(this._dirtyStateChangeHandlers.length>0)for(var e=new AutotaskDirtyStateSystem.DirtyStateChangeEventArgs(t),n=0,i=this._dirtyStateChangeHandlers;n<i.length;n++){(0,i[n])(e)}},n.prototype._raiseImmediateChangeEvent=function(e,n){if(this._immediateChangeHandlers.length>0)for(var i=new t.ImmediateChangeEventArgs(this,e,n),o=0,a=this._immediateChangeHandlers;o<a.length;o++){(0,a[o])(i)}},n.prototype._raiseTabbedAwayEvent=function(t){if(this._tabbedAwayHandlers.length>0)for(var e=new AutotaskEditorSystem.TabbedAwayEventArgs(this.id,t,!0),n=0,i=this._tabbedAwayHandlers;n<i.length;n++){(0,i[n])(e)}},n.prototype._raiseTabbingAwayEvent=function(t,e){if(this._tabbingAwayHandlers.length>0)for(var n=new AutotaskEditorSystem.TabbingAwayEventArgs(this.id,t,e),i=0,o=this._tabbingAwayHandlers;i<o.length;i++){(0,o[i])(n)}},n.prototype._showValidationOverlay=function(){var t=this;autotask.globalValidationOverlay.show(this._textAreaElement,this.id,this._emailAreaValidation.validationResult.message,!0,(function(){t._validationOverlayClosed()}),null)},n.prototype._updateValueArray=function(t){var e=this._createValueArray(t);this._value=e.value,this._isFormatValid=e.isFormatValid},n.prototype._validate=function(t){var e=this._emailAreaValidation.validationResult.isValid;return this._isValidationOverdue&&this._isEnabled&&(e=this._emailAreaValidation.validate(this._textAreaElement.value,this._isFormatValid,t,this._textAreaElement),this._isValidationOverdue=!1),e?autotask.globalValidationOverlay.hide(this.id):this._showValidationOverlay(),e},n.prototype._validationCorrected=function(){this._textAreaElement.classList.remove(this._invalidCssClass)},n.prototype._validationFailed=function(){this._textAreaElement.classList.add(this._invalidCssClass),this._isValidationFrequencyElevated=!0},n.prototype._validationOverlayClosed=function(){this._isValidationOverlayDismissed=!0},n}(AutotaskEditorSystem.Editor);t.EmailArea=e}(AutotaskEmailArea||(AutotaskEmailArea={})),function(t){var e=function(t){function e(e,n,i){var o=t.call(this,e)||this;return o._invalidEmailFormatMessage=n,o._requiredValidatorProvider=i,o._requiredValidator=null,o}return __extends(e,t),Object.defineProperty(e.prototype,"_isRequired",{get:function(){return null!==this._requiredValidator},enumerable:!1,configurable:!0}),e.prototype.initialize=function(){var t=this;null!==this._requiredValidatorProvider&&(this._requiredValidatorProvider.initialize(),this._requiredValidatorProvider.addRequiredStateChangedHandler((function(){t._requiredStateChanged()})),this._requiredValidator=this._requiredValidatorProvider.createValidator())},e.prototype.resetValidationResult=function(t){this._updateValidationResult(new AutotaskEditorSystem.ValidResult,!1,t,!0)},e.prototype.validate=function(t,e,n,i){var o=new AutotaskEditorSystem.ValidResult;return e||(o=new AutotaskEditorSystem.InvalidResult(this._invalidEmailFormatMessage,null)),o.isValid&&null!==this._requiredValidator&&(o=this._requiredValidator.validate(t)),this._updateValidationResult(o,n,i,!0),o.isValid},e.prototype._requiredStateChanged=function(){var t=this._requiredValidatorProvider;this._requiredValidator=t.createValidator(),this._raiseRequiredStateChanged()},e}(AutotaskEditorSystem.EditorValidation);t.EmailAreaValidation=e}(AutotaskEmailArea||(AutotaskEmailArea={})),function(t){var e=function(){function t(t,e,n){this._editorInstance=t,this._previousValue=e,this._currentValue=n}return Object.defineProperty(t.prototype,"currentValue",{get:function(){return this._currentValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"editorInstance",{get:function(){return this._editorInstance},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"previousValue",{get:function(){return this._previousValue},enumerable:!1,configurable:!0}),t}();t.ImmediateChangeEventArgs=e}(AutotaskEmailArea||(AutotaskEmailArea={})),function(t){var e=function(t){function e(e,n,i,o){var a=t.call(this,e,i,o)||this;return a._backingEditorId=n,a._backingEmailAreaEditor=void 0,a}return __extends(e,t),Object.defineProperty(e.prototype,"isDirty",{get:function(){return this._backingEditor.isDirty},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isEnabled",{get:function(){return this._backingEditor.isEnabled},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"participantValidation",{get:function(){return this._backingEditor.participantValidation},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_backingEditor",{get:function(){return void 0===this._backingEmailAreaEditor?autotask.throwException("_backingEmailAreaEditor is undefined."):this._backingEmailAreaEditor},enumerable:!1,configurable:!0}),e.prototype.addTabbingAwayHandler=function(t){var e=this;this._backingEditor.addTabbingAwayHandler((function(n){t(new AutotaskEditorSystem.TabbingAwayEventArgs(e.id,n.isShiftKeyPressed,(function(){n.cancel()})))}))},e.prototype.createRequestData=function(){return this._createRequestData(this._backingEditor,"10",!this._backingEditor.isEnabled)},e.prototype.focus=function(){this._backingEditor.focus()},e.prototype.focusEnd=function(){this._backingEditor.focusEnd()},e.prototype.focusStart=function(){this._backingEditor.focusStart()},e.prototype.resetValidation=function(){this._backingEditor.resetValidation()},e.prototype.validate=function(){return this._backingEditor.validate()},e.prototype.__initialize=function(){this._backingEmailAreaEditor=autotask.find(this._backingEditorId)},e}(AutotaskEditorSystem.UserDefinedField);t.UserDefinedField=e}(AutotaskEmailArea||(AutotaskEmailArea={})),function(t){var e=function(t){function e(e,n,i){var o=t.call(this,e)||this;return o._invalidEmailFormatMessage=n,o._requiredValidator=i,o}return __extends(e,t),Object.defineProperty(e.prototype,"_isRequired",{get:function(){return null!==this._requiredValidator},enumerable:!1,configurable:!0}),e.prototype.initialize=function(){},e.prototype.resetValidationResult=function(t){this._updateValidationResult(new AutotaskEditorSystem.ValidResult,!1,t,!0)},e.prototype.validate=function(t,e,n,i){var o=new AutotaskEditorSystem.ValidResult;return e||(o=new AutotaskEditorSystem.InvalidResult(this._invalidEmailFormatMessage,null)),o.isValid&&null!==this._requiredValidator&&(o=this._requiredValidator.validate(t)),this._updateValidationResult(o,n,i,!0),o.isValid},e}(AutotaskEditorSystem.EditorValidation);t.UserDefinedFieldValidation=e}(AutotaskEmailArea||(AutotaskEmailArea={})),function(t){var e=function(){function t(t){this._editorInstance=t}return Object.defineProperty(t.prototype,"editorInstance",{get:function(){return this._editorInstance},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"instanceId",{get:function(){return this._editorInstance.id},enumerable:!1,configurable:!0}),t}();t.ChangeEventArgs=e}(AutotaskEmailBox||(AutotaskEmailBox={})),function(t){var e=function(e){function n(t,n,i,o,a,r){var s=e.call(this,t)||this;return s._inputElement=AutotaskDomSystem.Document.getElementById(t),s._inputElement.addEventListener("change",(function(){s._changeListener()})),s._inputElement.addEventListener("focus",(function(){s._focusListener()})),s._inputElement.addEventListener("input",(function(){s._inputListener()})),s._originalValue=s._inputElement.value,s._value=s._originalValue,s._isEnabled=n,s._changeHandlers=[],null!==i&&s._changeHandlers.push(i),s._immediateChangeHandlers=[],null!==o&&s._immediateChangeHandlers.push(o),s._bindingPropertyName=a,s._emailBoxValidation=r,s._emailBoxValidation.addValidationCorrectedHandler((function(){s._validationCorrected()})),s._emailBoxValidation.addValidationFailedHandler((function(){s._validationFailed()})),s._dirtyStateChangeHandlers=[],s._tabbingAwayHandlers=[],s._formatValidator=new AutotaskEditorSystem.EmailAddressFormatValidator,s._invalidCssClass="Invalid",s._isDirty=!1,s._isFormatValid=!0,s._isValidationFrequencyElevated=!1,s._isValidationOverdue=!0,s._isValidationOverlayDismissed=!1,s}return __extends(n,e),Object.defineProperty(n.prototype,"participantValidation",{get:function(){return this._emailBoxValidation},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isEnabled",{get:function(){return this._isEnabled},set:function(t){t!==this._isEnabled&&(this._isEnabled=t,this._inputElement.disabled=!t,t?this._isValidationFrequencyElevated&&this._validate(!1):(this._isValidationOverdue=!this._emailBoxValidation.validationResult.isValid,this._emailBoxValidation.resetValidationResult(this._inputElement)))},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isDirty",{get:function(){return this._isDirty},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"value",{get:function(){return this._value},set:function(t){var e=null===t?"":t;e!==this._value&&(this._value=e,this._inputElement.value=this._value,this._manageDirtyState(this._value)&&this._raiseDirtyStateChangeEvent(this._isDirty),this._isFormatValid=this._formatValidator.validate(t),this._isValidationFrequencyElevated&&this._validate(!1))},enumerable:!1,configurable:!0}),n.prototype.addChangeHandler=function(t){this._changeHandlers.push(t)},n.prototype.addDirtyStateChangeHandler=function(t){this._dirtyStateChangeHandlers.push(t)},n.prototype.addImmediateChangeHandler=function(t){this._immediateChangeHandlers.push(t)},n.prototype.addTabbingAwayHandler=function(t){var e=this;this._tabbingAwayHandlers.push(t),1===this._tabbingAwayHandlers.length&&this._inputElement.addEventListener("keydown",(function(t){e._keyDownListener(t)}))},n.prototype.createRequestData=function(){var t=null;if(null!==this._bindingPropertyName){var e=null;this._isEnabled&&(e=this._value),(t={})[this._bindingPropertyName]=e}return t},n.prototype.focus=function(){this._inputElement.focus()},n.prototype.focusEnd=function(){this.focus()},n.prototype.focusStart=function(){this.focus()},n.prototype.resetValidation=function(){this._isValidationOverdue=!0},n.prototype.validate=function(){return this._validate(!1)},n.prototype.__initialize=function(){this._emailBoxValidation.initialize()},n.prototype._changeListener=function(){this._raiseChangeEvent(),this._validate(!0)},n.prototype._focusListener=function(){this._isValidationOverlayDismissed||!this._isValidationFrequencyElevated||this._isFormatValid&&this._emailBoxValidation.validationResult.isValid||this._showValidationOverlay()},n.prototype._inputListener=function(){var t=this._value,e=this._inputElement.value;this._isFormatValid=this._formatValidator.validate(e),this._value=this._isFormatValid?e:"";var n=this._manageDirtyState(this._value);this._raiseImmediateChangeEvent(t,this._value),n&&this._raiseDirtyStateChangeEvent(this._isDirty),this._isValidationOverdue=!0,this._isValidationFrequencyElevated&&this._validate(!0)},n.prototype._keyDownListener=function(t){AutotaskDomSystem.KeyCode.isTab(t.which)&&this._raiseTabbingAwayEvent(t.shiftKey,(function(){t.preventDefault()}))},n.prototype._manageDirtyState=function(t){var e=!1;return this._isDirty&&t!==this._originalValue||(this._isDirty=!this._isDirty,e=!0),e},n.prototype._raiseChangeEvent=function(){if(this._changeHandlers.length>0)for(var e=new t.ChangeEventArgs(this),n=0,i=this._changeHandlers;n<i.length;n++){(0,i[n])(e)}},n.prototype._raiseDirtyStateChangeEvent=function(t){if(this._dirtyStateChangeHandlers.length>0)for(var e=new AutotaskDirtyStateSystem.DirtyStateChangeEventArgs(t),n=0,i=this._dirtyStateChangeHandlers;n<i.length;n++){(0,i[n])(e)}},n.prototype._raiseImmediateChangeEvent=function(e,n){if(this._immediateChangeHandlers.length>0)for(var i=new t.ImmediateChangeEventArgs(this,e,n),o=0,a=this._immediateChangeHandlers;o<a.length;o++){(0,a[o])(i)}},n.prototype._raiseTabbingAwayEvent=function(t,e){if(this._tabbingAwayHandlers.length>0)for(var n=new AutotaskEditorSystem.TabbingAwayEventArgs(this.id,t,e),i=0,o=this._tabbingAwayHandlers;i<o.length;i++){(0,o[i])(n)}},n.prototype._showValidationOverlay=function(){var t=this;autotask.globalValidationOverlay.show(this._inputElement,this.id,this._emailBoxValidation.validationResult.message,!0,(function(){t._validationOverlayClosed()}),null)},n.prototype._validate=function(t){var e=this._emailBoxValidation.validationResult.isValid;return this._isValidationOverdue&&this._isEnabled&&(e=this._emailBoxValidation.validate(this._value,this._isFormatValid,t,this._inputElement),this._isValidationOverdue=!1),e?autotask.globalValidationOverlay.hide(this.id):this._showValidationOverlay(),e},n.prototype._validationCorrected=function(){this._inputElement.classList.remove(this._invalidCssClass)},n.prototype._validationFailed=function(){this._inputElement.classList.add(this._invalidCssClass),this._isValidationFrequencyElevated=!0},n.prototype._validationOverlayClosed=function(){this._isValidationOverlayDismissed=!0},n}(AutotaskEditorSystem.Editor);t.EmailBox=e}(AutotaskEmailBox||(AutotaskEmailBox={})),function(t){var e=function(t){function e(e,n,i){var o=t.call(this,e)||this;return o._invalidEmailFormatMessage=n,o._requiredValidatorProvider=i,o._requiredValidator=null,o}return __extends(e,t),Object.defineProperty(e.prototype,"_isRequired",{get:function(){return null!==this._requiredValidator},enumerable:!1,configurable:!0}),e.prototype.initialize=function(){var t=this;null!==this._requiredValidatorProvider&&(this._requiredValidatorProvider.initialize(),this._requiredValidatorProvider.addRequiredStateChangedHandler((function(){t._requiredStateChanged()})),this._requiredValidator=this._requiredValidatorProvider.createValidator())},e.prototype.resetValidationResult=function(t){this._updateValidationResult(new AutotaskEditorSystem.ValidResult,!1,t,!0)},e.prototype.validate=function(t,e,n,i){var o=new AutotaskEditorSystem.ValidResult;return e||(o=new AutotaskEditorSystem.InvalidResult(this._invalidEmailFormatMessage,null)),o.isValid&&null!==this._requiredValidator&&(o=this._requiredValidator.validate(t)),this._updateValidationResult(o,n,i,!0),o.isValid},e.prototype._requiredStateChanged=function(){var t=this._requiredValidatorProvider;this._requiredValidator=t.createValidator(),this._raiseRequiredStateChanged()},e}(AutotaskEditorSystem.EditorValidation);t.EmailBoxValidation=e}(AutotaskEmailBox||(AutotaskEmailBox={})),function(t){var e=function(){function t(t,e,n){this._editorInstance=t,this._previousValue=e,this._currentValue=n}return Object.defineProperty(t.prototype,"currentValue",{get:function(){return this._currentValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"editorInstance",{get:function(){return this._editorInstance},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"previousValue",{get:function(){return this._previousValue},enumerable:!1,configurable:!0}),t}();t.ImmediateChangeEventArgs=e}(AutotaskEmailBox||(AutotaskEmailBox={})),function(t){var e=function(){function t(t){this._editorInstance=t}return Object.defineProperty(t.prototype,"editorInstance",{get:function(){return this._editorInstance},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"instanceId",{get:function(){return this._editorInstance.id},enumerable:!1,configurable:!0}),t}();t.ChangeEventArgs=e}(AutotaskExternalFileBox||(AutotaskExternalFileBox={})),function(t){var e=function(){function t(t,e){this._type=t,this._value=e}return t.prototype.equals=function(t){return this.type===t.type&&this.value===t.value},Object.defineProperty(t.prototype,"type",{get:function(){return this._type},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return this._value},enumerable:!1,configurable:!0}),t}();t.ExternalFile=e}(AutotaskExternalFileBox||(AutotaskExternalFileBox={})),function(t){var e=function(e){function n(t,n,i,o,a,r,s,l,u,c,d,h){var _=e.call(this,t)||this;_._editorElement=AutotaskDomSystem.Document.getElementById(t),_._textInputElement=AutotaskDomSystem.Document.getElementById(i),_._fileInputElement=AutotaskDomSystem.Document.getElementById(n),_._fileContainerElement=AutotaskDomSystem.Document.getParentElement(_._fileInputElement),_._fileResetButtonElement=AutotaskDomSystem.Document.getChildElementsByClassName(_._fileContainerElement,"IconContainer")[1],_._fileTextContainerElement=AutotaskDomSystem.Document.getElementsByClassName(_._fileContainerElement,"Text")[0],_._fileValueContainerElement=AutotaskDomSystem.Document.getChildElementByClassName(_._fileContainerElement,"ValueContainer"),_._fileInputElement.addEventListener("blur",(function(){_._fileInputBlurListener()})),_._fileInputElement.addEventListener("change",(function(){_._fileInputChangeListener()})),_._fileInputElement.addEventListener("focus",(function(){_._fileInputFocusListener()})),_._fileValueContainerElement.addEventListener("click",(function(){_._fileValueContainerClickListener()})),_._fileValueContainerElement.addEventListener("dragover",(function(t){_._fileValueContainerDragStartListener(t)})),_._fileValueContainerElement.addEventListener("dragenter",(function(t){_._fileValueContainerDragStartListener(t)})),_._fileValueContainerElement.addEventListener("dragleave",(function(t){_._fileValueContainerDragEndListener(t)})),_._fileValueContainerElement.addEventListener("dragend",(function(t){_._fileValueContainerDragEndListener(t)})),_._fileValueContainerElement.addEventListener("drop",(function(t){_._fileValueContainerDragEndListener(t)})),_._fileValueContainerElement.addEventListener("drop",(function(t){_._fileValueContainerDropListener(t)})),_._fileResetButtonElement.addEventListener("click",(function(){_._resetButtonClickListener()})),_._fileResetButtonElement.addEventListener("focus",(function(){_._resetButtonFocusListener()})),_._fileResetButtonElement.addEventListener("keydown",(function(t){_._resetButtonKeyDownListener(t)})),_._textInputElement.addEventListener("change",(function(){_._textInputChangeListener()})),_._textInputElement.addEventListener("focus",(function(){_._focusListener()})),_._textInputElement.addEventListener("input",(function(){_._inputListener()}));return _._fileUploader=l,_._fileUploader.__setHandlers((function(t){_._uploadId=t,u(t)}),c,d),_._changeHandlers=[],null!==a&&_._changeHandlers.push(a),_._isEnabled=o,_._bindingPropertyName=r,_._externalFileType=s,_._externalFileBoxValidation=h,_._externalFileBoxValidation.addValidationFailedHandler((function(){_._validationFailed()})),_._externalFileBoxValidation.addValidationCorrectedHandler((function(){_._validationCorrected()})),_._dirtyStateChangeHandlers=[],_._immediateChangeHandlers=[],_._tabbingAwayHandlers=[],_._invalidCssClass="Invalid",_._focusedCssClass="Focused",_._isDirty=!1,_._isValidationFrequencyElevated=!1,_._isValidationOverdue=!0,_._isValidationOverlayDismissed=!1,_._uploadId=null,_._originalValue=_._createValue(),_._value=_._originalValue,_}return __extends(n,e),Object.defineProperty(n.prototype,"isDirty",{get:function(){return this._isDirty},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isEnabled",{get:function(){return this._isEnabled},set:function(t){t!==this._isEnabled&&(this._isEnabled=t,this._fileInputElement.disabled=!this._isEnabled,this._textInputElement.disabled=!this._isEnabled,this._isEnabled?this._isValidationFrequencyElevated&&this._validate(!1):(this._externalFileBoxValidation.resetValidationResult(this._editorElement),this._fileContainerElement.classList.remove(this._focusedCssClass)))},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"externalFileType",{get:function(){return this._externalFileType},set:function(t){this._isEnabled?t!==this._externalFileType&&(this._externalFileType=t,this._updateInputElements(t)):autotask.throwException("You cannot call ExternalFileBox.setExternalFileType when the editor is disabled.")},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"fileList",{get:function(){var e=null;return this._externalFileType===t.ExternalFileType.Upload&&(e=this._fileInputElement.files),e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"participantValidation",{get:function(){return this._externalFileBoxValidation},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"value",{get:function(){return this._value.value},enumerable:!1,configurable:!0}),n.prototype.addChangeHandler=function(t){this._changeHandlers.push(t)},n.prototype.addDirtyStateChangeHandler=function(t){this._dirtyStateChangeHandlers.push(t)},n.prototype.addImmediateChangeHandler=function(t){this._immediateChangeHandlers.push(t)},n.prototype.addTabbingAwayHandler=function(t){var e=this;this._tabbingAwayHandlers.push(t),1===this._tabbingAwayHandlers.length&&(this._fileInputElement.addEventListener("keydown",(function(t){e._keyDownListener(t)})),this._fileResetButtonElement.addEventListener("keydown",(function(t){e._keyDownListener(t)})),this._textInputElement.addEventListener("keydown",(function(t){e._keyDownListener(t)})))},n.prototype.blur=function(){this._isEnabled&&(this._externalFileType===t.ExternalFileType.Upload?this._fileInputElement.blur():this._textInputElement.blur())},n.prototype.clear=function(){null!==this._value.value&&(this._externalFileType===t.ExternalFileType.Upload?this._resetFileInput():this._textInputElement.value="",this._value=this._createValue(),this._manageDirtyState(this._value)&&this._raiseDirtyStateChangeEvent(this._isDirty),this._isValidationOverdue=!0,this._isValidationFrequencyElevated&&this._validate(!1))},n.prototype.createRequestData=function(){var e=null;if(null!==this._bindingPropertyName){var n=null,i=null;this._isEnabled&&(n=this._value.type.toString(),this._value.type===t.ExternalFileType.Upload?null===this._uploadId?autotask.throwException("Upload id cannot be null when external file type is Upload."):i=this._uploadId.toString():i=this._value.value),(e={})[this._bindingPropertyName]=n,e[this._bindingPropertyName+"v"]=i}return e},n.prototype.focus=function(){this._isEnabled&&(this._externalFileType===t.ExternalFileType.Upload?this._fileInputElement.focus():this._textInputElement.focus())},n.prototype.focusEnd=function(){this.focus()},n.prototype.focusStart=function(){this.focus()},n.prototype.resetValidation=function(){this._isValidationOverdue=!0},n.prototype.uploadFile=function(t){null!==this._fileInputElement.files&&this._fileInputElement.files.length>0&&this._fileUploader.__upload(t)},n.prototype.validate=function(){return this._validate(!1)},n.prototype._createValue=function(){var e=null;return e=this._externalFileType===t.ExternalFileType.Upload?this._fileInputElement.value.length>0?this._fileInputElement.value:null:this._textInputElement.value.length>0?this._textInputElement.value:null,new t.ExternalFile(this._externalFileType,e)},n.prototype._fileInputBlurListener=function(){this._fileContainerElement.classList.remove(this._focusedCssClass)},n.prototype._fileInputChangeListener=function(){this._manageFileInputChange()},n.prototype._fileValueContainerDragStartListener=function(t){this._fileContainerElement.classList.add(this._focusedCssClass),t.preventDefault()},n.prototype._fileValueContainerDragEndListener=function(t){this._fileContainerElement.classList.remove(this._focusedCssClass),t.preventDefault()},n.prototype._fileValueContainerDropListener=function(t){null!==t.dataTransfer&&(this._fileInputElement.files=t.dataTransfer.files,this._manageFileInputChange(),t.preventDefault())},n.prototype._fileInputFocusListener=function(){this._fileContainerElement.classList.add(this._focusedCssClass)},n.prototype._fileNameValue=function(){var t="";return null!==this._fileInputElement.files&&this._fileInputElement.files.length>0&&this._fileInputElement.files[0].name.length>0&&(t=this._fileInputElement.files[0].name),t},n.prototype._fileValueContainerClickListener=function(){this._fileInputElement.click()},n.prototype._focusListener=function(){this._isValidationOverlayDismissed||!this._isValidationFrequencyElevated||this._externalFileBoxValidation.validationResult.isValid||this._showValidationOverlay()},n.prototype._keyDownListener=function(t){AutotaskDomSystem.KeyCode.isTab(t.which)&&this._raiseTabbingAwayEvent(t.shiftKey,(function(){t.preventDefault()}))},n.prototype._manageDirtyState=function(t){var e=!1;return this._isDirty&&!this._originalValue.equals(t)||(this._isDirty=!this._isDirty,e=!0),e},n.prototype._manageFileInputChange=function(){var t=this._value;this._value=this._createValue();var e=this._manageDirtyState(this._value);this._raiseImmediateChangeEvent(t,this._value),e&&this._raiseDirtyStateChangeEvent(this._isDirty),null===this._value||null===this._value.value?this._resetFileInput():(this._fileTextContainerElement.innerText=this._fileNameValue(),this._fileResetButtonElement.classList.remove("Hidden")),this._isValidationOverdue=!0,this._validate(!0),this._raiseChangeEvent()},n.prototype._raiseChangeEvent=function(){if(this._changeHandlers.length>0)for(var e=new t.ChangeEventArgs(this),n=0,i=this._changeHandlers;n<i.length;n++){(0,i[n])(e)}},n.prototype._raiseDirtyStateChangeEvent=function(t){if(this._dirtyStateChangeHandlers.length>0)for(var e=new AutotaskDirtyStateSystem.DirtyStateChangeEventArgs(t),n=0,i=this._dirtyStateChangeHandlers;n<i.length;n++){(0,i[n])(e)}},n.prototype._raiseImmediateChangeEvent=function(e,n){if(this._immediateChangeHandlers.length>0)for(var i=new t.ImmediateChangeEventArgs(this,e,n),o=0,a=this._immediateChangeHandlers;o<a.length;o++){(0,a[o])(i)}},n.prototype._raiseResetButtonEvent=function(){this._resetFileInput(),this._manageFileInputChange()},n.prototype._raiseTabbingAwayEvent=function(t,e){if(this._tabbingAwayHandlers.length>0)for(var n=new AutotaskEditorSystem.TabbingAwayEventArgs(this.id,t,e),i=0,o=this._tabbingAwayHandlers;i<o.length;i++){(0,o[i])(n)}},n.prototype._resetButtonClickListener=function(){this._raiseResetButtonEvent()},n.prototype._resetButtonFocusListener=function(){this._fileContainerElement.classList.remove(this._focusedCssClass)},n.prototype._resetButtonKeyDownListener=function(t){(1===t.key.length||"Unidentified"===t.key||AutotaskDomSystem.KeyCode.isEnter(t.which)||AutotaskDomSystem.KeyCode.isNumberPadEnter(t.which))&&this._raiseResetButtonEvent()},n.prototype._resetFileInput=function(){this._fileInputElement.value="",this._fileResetButtonElement.classList.add("Hidden");var t=this._fileTextContainerElement.getAttribute("data-default-text");this._fileTextContainerElement.innerText=null===t?"":t},n.prototype._showValidationOverlay=function(){var t=this;autotask.globalValidationOverlay.show(this._editorElement,this.id,this._externalFileBoxValidation.validationResult.message,!0,(function(){t._validationOverlayClosed()}),null)},n.prototype._textInputChangeListener=function(){this._raiseChangeEvent(),this._validate(!0)},n.prototype._inputListener=function(){var t=this._value;this._value=this._createValue();var e=this._manageDirtyState(this._value);this._raiseImmediateChangeEvent(t,this._value),e&&this._raiseDirtyStateChangeEvent(this._isDirty),this._isValidationOverdue=!0,this._isValidationFrequencyElevated&&this._validate(!0)},n.prototype._updateInputElements=function(e){var n=this._value;switch(e){case t.ExternalFileType.FileLink:case t.ExternalFileType.FolderLink:case t.ExternalFileType.Url:this._fileContainerElement.classList.add("Hidden"),this._textInputElement.value="",this._textInputElement.classList.remove("Hidden");break;case t.ExternalFileType.Upload:this._textInputElement.classList.add("Hidden"),this._fileContainerElement.classList.remove("Hidden"),this._resetFileInput();break;default:autotask.throwException("Unexpected ExternalFileType value.")}this._value=this._createValue(),this._manageDirtyState(this._value)&&this._raiseDirtyStateChangeEvent(this._isDirty),null!==n.value&&(this._isValidationOverdue=!0,this._validate(!1))},n.prototype._validate=function(e){var n=this._externalFileBoxValidation.validationResult.isValid;if(this._isValidationOverdue&&this._isEnabled){var i=null;this._externalFileType===t.ExternalFileType.Upload&&null!==this._fileInputElement.files&&this._fileInputElement.files.length>0&&(i=this._fileInputElement.files[0]),n=this._externalFileBoxValidation.validate(this._value,i,e,this._editorElement),this._isValidationOverdue=!1}return n?autotask.globalValidationOverlay.hide(this.id):this._showValidationOverlay(),n},n.prototype._validationCorrected=function(){this._fileContainerElement.classList.remove(this._invalidCssClass),this._textInputElement.classList.remove(this._invalidCssClass)},n.prototype._validationFailed=function(){this._fileContainerElement.classList.add(this._invalidCssClass),this._textInputElement.classList.add(this._invalidCssClass),this._isValidationFrequencyElevated=!0},n.prototype._validationOverlayClosed=function(){this._isValidationOverlayDismissed=!0},n}(AutotaskEditorSystem.Editor);t.ExternalFileBox=e}(AutotaskExternalFileBox||(AutotaskExternalFileBox={})),function(t){var e=function(t){function e(e,n,i,o,a){var r=t.call(this,e)||this;return r._requiredValidator=n,r._fileNameValidator=i,r._fileSizeValidator=o,r._fileTypeValidator=a,r}return __extends(e,t),Object.defineProperty(e.prototype,"_isRequired",{get:function(){return null!==this._requiredValidator},enumerable:!1,configurable:!0}),e.prototype.resetValidationResult=function(t){this._updateValidationResult(new AutotaskEditorSystem.ValidResult,!1,t,!0)},e.prototype.validate=function(t,e,n,i){var o=new AutotaskEditorSystem.ValidResult;return o.isValid&&null!==e&&(o=this._fileNameValidator.validate(e.name)),o.isValid&&null!==this._requiredValidator&&(o=this._requiredValidator.validate(t)),o.isValid&&null!==this._fileTypeValidator&&(o=this._fileTypeValidator.validate(e)),o.isValid&&null!==this._fileSizeValidator&&(o=this._fileSizeValidator.validate(e)),this._updateValidationResult(o,n,i,!0),o.isValid},e}(AutotaskEditorSystem.EditorValidation);t.ExternalFileBoxValidation=e}(AutotaskExternalFileBox||(AutotaskExternalFileBox={})),function(t){!function(t){t[t.FileLink=0]="FileLink",t[t.FolderLink=1]="FolderLink",t[t.Upload=2]="Upload",t[t.Url=3]="Url"}(t.ExternalFileType||(t.ExternalFileType={}))}(AutotaskExternalFileBox||(AutotaskExternalFileBox={})),function(t){var e=function(){function t(t,e,n){this._editorInstance=t,this._previousValue=e,this._currentValue=n}return Object.defineProperty(t.prototype,"currentValue",{get:function(){return this._currentValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"editorInstance",{get:function(){return this._editorInstance},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"previousValue",{get:function(){return this._previousValue},enumerable:!1,configurable:!0}),t}();t.ImmediateChangeEventArgs=e}(AutotaskExternalFileBox||(AutotaskExternalFileBox={})),function(t){var e=function(t){function e(e,n){var i=t.call(this,e)||this;return i._containerElement=AutotaskDomSystem.Document.getElementById(e),i._activeCssClass="Active",i._externalFileType=n,i}return __extends(e,t),e.prototype.updateVisibility=function(t){t===this._externalFileType?this._containerElement.classList.add(this._activeCssClass):this._containerElement.classList.remove(this._activeCssClass)},e}(Autotask.LifecycleObject);t.LabelContainer=e}(AutotaskExternalFileBox||(AutotaskExternalFileBox={})),function(t){var e=function(){function t(t){this._editorInstance=t}return Object.defineProperty(t.prototype,"editorInstance",{get:function(){return this._editorInstance},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"instanceId",{get:function(){return this._editorInstance.id},enumerable:!1,configurable:!0}),t}();t.ChangeEventArgs=e}(AutotaskHexColorBox||(AutotaskHexColorBox={})),function(t){var e=function(e){function n(t,n,i,o,a){var r=e.call(this,t)||this;r._editorElement=AutotaskDomSystem.Document.getElementById(t);var s=r._editorElement.children[0];return r._swatchElement=s.children[0],r._inputElement=r._editorElement.children[1],r._inputElement.addEventListener("blur",(function(){r._blurListener()})),r._inputElement.addEventListener("focus",(function(){r._focusListener()})),r._inputElement.addEventListener("input",(function(){r._inputListener()})),r._originalValue=r._createValue(),r._value=r._originalValue,r._isEnabled=n,r._bindingPropertyName=o,r._changeHandlers=[],null!==i&&r._changeHandlers.push(i),r._hexColorBoxValidation=a,r._hexColorBoxValidation.addValidationCorrectedHandler((function(){r._validationCorrected()})),r._hexColorBoxValidation.addValidationFailedHandler((function(){r._validationFailed()})),r._dirtyStateChangeHandlers=[],r._immediateChangeHandlers=[],r._tabbingAwayHandlers=[],r._formatValidator=new AutotaskEditorSystem.HexColorFormatValidator,r._invalidCssClass="Invalid",r._isDirty=!1,r._isFormatValid=!0,r._isSwatchVisible=r._inputElement.value.length>0,r._isValidationFrequencyElevated=!1,r._isValidationOverdue=!0,r._isValidationOverlayDismissed=!1,r}return __extends(n,e),Object.defineProperty(n.prototype,"participantValidation",{get:function(){return this._hexColorBoxValidation},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isEnabled",{get:function(){return this._isEnabled},set:function(t){t!==this._isEnabled&&(this._isEnabled=t,this._inputElement.disabled=!t,t?(this._editorElement.classList.remove("Disabled"),this._isValidationFrequencyElevated&&this._validate(!1)):(this._editorElement.classList.add("Disabled"),this._isValidationOverdue=!this._hexColorBoxValidation.validationResult.isValid,this._hexColorBoxValidation.resetValidationResult(this._inputElement)))},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isDirty",{get:function(){return this._isDirty},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"value",{get:function(){return this._value},set:function(t){t!==this._value&&(this._inputElement.value=null!==t?t:"",this._value=this._createValue(),this._isFormatValid=this._formatValidator.validate(t),this._updateSwatch(),this._manageDirtyState(this._value)&&this._raiseDirtyStateChangeEvent(this._isDirty),this._isValidationOverdue=!0,this._isValidationFrequencyElevated&&this._validate(!1))},enumerable:!1,configurable:!0}),n.prototype.addChangeHandler=function(t){this._changeHandlers.push(t)},n.prototype.addDirtyStateChangeHandler=function(t){this._dirtyStateChangeHandlers.push(t)},n.prototype.addImmediateChangeHandler=function(t){this._immediateChangeHandlers.push(t)},n.prototype.addTabbingAwayHandler=function(t){var e=this;this._tabbingAwayHandlers.push(t),1===this._tabbingAwayHandlers.length&&this._inputElement.addEventListener("keydown",(function(t){e._keyDownListener(t)}))},n.prototype.createRequestData=function(){var t=null;if(null!==this._bindingPropertyName){var e=null;this._isEnabled&&(e=this._value),(t={})[this._bindingPropertyName]=e}return t},n.prototype.focus=function(){this._inputElement.focus()},n.prototype.focusEnd=function(){this.focus()},n.prototype.focusStart=function(){this.focus()},n.prototype.resetValidation=function(){this._isValidationOverdue=!0},n.prototype.validate=function(){return this._validate(!1)},n.prototype.__initialize=function(){this._hexColorBoxValidation.initialize()},n.prototype._blurListener=function(){this._editorElement.classList.remove("Focused"),this._raiseChangeEvent(),this._validate(!0)},n.prototype._createValue=function(){var t=null;return this._inputElement.value.length>0&&(t="#"===this._inputElement.value.charAt(0)?this._inputElement.value.substring(1):this._inputElement.value),t},n.prototype._focusListener=function(){this._editorElement.classList.add("Focused"),this._isValidationOverlayDismissed||!this._isValidationFrequencyElevated||this._isFormatValid&&this._hexColorBoxValidation.validationResult.isValid||this._showValidationOverlay()},n.prototype._hideSwatch=function(){this._isSwatchVisible&&(this._isSwatchVisible=!1,this._swatchElement.classList.add("Hidden"))},n.prototype._inputListener=function(){var t=this._value,e=this._createValue();this._isFormatValid=this._formatValidator.validate(e),this._value=this._isFormatValid?e:null,this._updateSwatch();var n=this._manageDirtyState(this._value);this._raiseImmediateChangeEvent(t,this._value),n&&this._raiseDirtyStateChangeEvent(this._isDirty),this._isValidationOverdue=!0,this._isValidationFrequencyElevated&&this._validate(!0)},n.prototype._keyDownListener=function(t){AutotaskDomSystem.KeyCode.isTab(t.which)&&this._raiseTabbingAwayEvent(t.shiftKey,(function(){t.preventDefault()}))},n.prototype._manageDirtyState=function(t){var e=!1;return this._isDirty&&t!==this._originalValue||(this._isDirty=!this._isDirty,e=!0),e},n.prototype._raiseChangeEvent=function(){if(this._changeHandlers.length>0)for(var e=new t.ChangeEventArgs(this),n=0,i=this._changeHandlers;n<i.length;n++){(0,i[n])(e)}},n.prototype._raiseDirtyStateChangeEvent=function(t){if(this._dirtyStateChangeHandlers.length>0)for(var e=new AutotaskDirtyStateSystem.DirtyStateChangeEventArgs(t),n=0,i=this._dirtyStateChangeHandlers;n<i.length;n++){(0,i[n])(e)}},n.prototype._raiseImmediateChangeEvent=function(e,n){if(this._immediateChangeHandlers.length>0)for(var i=new t.ImmediateChangeEventArgs(this,e,n),o=0,a=this._immediateChangeHandlers;o<a.length;o++){(0,a[o])(i)}},n.prototype._raiseTabbingAwayEvent=function(t,e){if(this._tabbingAwayHandlers.length>0)for(var n=new AutotaskEditorSystem.TabbingAwayEventArgs(this.id,t,e),i=0,o=this._tabbingAwayHandlers;i<o.length;i++){(0,o[i])(n)}},n.prototype._showSwatch=function(t){this._swatchElement.setAttribute("style","background-color: #"+t),this._isSwatchVisible||(this._isSwatchVisible=!0,this._swatchElement.classList.remove("Hidden"))},n.prototype._showValidationOverlay=function(){var t=this;autotask.globalValidationOverlay.show(this._editorElement,this.id,this._hexColorBoxValidation.validationResult.message,!0,(function(){t._validationOverlayClosed()}),null)},n.prototype._updateSwatch=function(){null!==this._value?this._showSwatch(this._value):this._hideSwatch()},n.prototype._validate=function(t){var e=this._hexColorBoxValidation.validationResult.isValid;return this._isValidationOverdue&&this._isEnabled&&(e=this._hexColorBoxValidation.validate(this._value,this._isFormatValid,t,this._editorElement),this._isValidationOverdue=!1),e?autotask.globalValidationOverlay.hide(this.id):this._showValidationOverlay(),e},n.prototype._validationCorrected=function(){this._editorElement.classList.remove(this._invalidCssClass)},n.prototype._validationFailed=function(){this._editorElement.classList.add(this._invalidCssClass),this._isValidationFrequencyElevated=!0},n.prototype._validationOverlayClosed=function(){this._isValidationOverlayDismissed=!0},n}(AutotaskEditorSystem.Editor);t.HexColorBox=e}(AutotaskHexColorBox||(AutotaskHexColorBox={})),function(t){var e=function(t){function e(e,n,i){var o=t.call(this,e)||this;return o._invalidFormatMessage=n,o._requiredValidatorProvider=i,o._requiredValidator=null,o}return __extends(e,t),Object.defineProperty(e.prototype,"_isRequired",{get:function(){return null!==this._requiredValidator},enumerable:!1,configurable:!0}),e.prototype.initialize=function(){var t=this;null!==this._requiredValidatorProvider&&(this._requiredValidatorProvider.initialize(),this._requiredValidatorProvider.addRequiredStateChangedHandler((function(){t._requiredStateChanged()})),this._requiredValidator=this._requiredValidatorProvider.createValidator())},e.prototype.resetValidationResult=function(t){this._updateValidationResult(new AutotaskEditorSystem.ValidResult,!1,t,!0)},e.prototype.validate=function(t,e,n,i){var o=new AutotaskEditorSystem.ValidResult;return e||(o=new AutotaskEditorSystem.InvalidResult(this._invalidFormatMessage,null)),o.isValid&&null!==this._requiredValidator&&(o=this._requiredValidator.validate(t)),this._updateValidationResult(o,n,i,!0),o.isValid},e.prototype._requiredStateChanged=function(){var t=this._requiredValidatorProvider;this._requiredValidator=t.createValidator(),this._raiseRequiredStateChanged()},e}(AutotaskEditorSystem.EditorValidation);t.HexColorBoxValidation=e}(AutotaskHexColorBox||(AutotaskHexColorBox={})),function(t){var e=function(){function t(t,e,n){this._editorInstance=t,this._previousValue=e,this._currentValue=n}return Object.defineProperty(t.prototype,"currentValue",{get:function(){return this._currentValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"editorInstance",{get:function(){return this._editorInstance},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"previousValue",{get:function(){return this._previousValue},enumerable:!1,configurable:!0}),t}();t.ImmediateChangeEventArgs=e}(AutotaskHexColorBox||(AutotaskHexColorBox={})),function(t){var e=function(){function t(t){this._editorInstance=t}return Object.defineProperty(t.prototype,"editorInstance",{get:function(){return this._editorInstance},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"instanceId",{get:function(){return this._editorInstance.id},enumerable:!1,configurable:!0}),t}();t.ChangeEventArgs=e}(AutotaskImageRadioButtonGroup||(AutotaskImageRadioButtonGroup={})),function(t){var e=function(e){function n(t,i,o,a,r){var s=e.call(this,t)||this;s._editorElement=AutotaskDomSystem.Document.getElementById(t);var l=n._findButtonElements(s._editorElement);s._checkedElement=null;for(var u=0,c=l;u<c.length;u++){var d=c[u];d.classList.contains("Checked")&&(s._checkedElement=d),d.classList.contains("Disabled")||d.addEventListener("click",(function(t){s._clickListener(t)}))}return s._originalValue=i,s._value=i,s._isEnabled=o,s._bindingPropertyName=r,s._changeHandlers=[],null!==a&&s._changeHandlers.push(a),s._dirtyStateChangeHandlers=[],s._isDirty=!1,s}return __extends(n,e),Object.defineProperty(n.prototype,"isEnabled",{get:function(){return this._isEnabled},set:function(t){t!==this._isEnabled&&(t?this._editorElement.classList.remove("Disabled"):this._editorElement.classList.add("Disabled"),this._isEnabled=t)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isDirty",{get:function(){return this._isDirty},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"value",{get:function(){return this._value},enumerable:!1,configurable:!0}),n.prototype.addChangeHandler=function(t){this._changeHandlers.push(t)},n.prototype.addDirtyStateChangeHandler=function(t){this._dirtyStateChangeHandlers.push(t)},n.prototype.createRequestData=function(){var t=null;if(null!==this._bindingPropertyName){var e=null;this._isEnabled&&(e=this.value),(t={})[this._bindingPropertyName]=e}return t},n._findButtonElements=function(t){for(var e=[],n=0;n<t.children.length;n++)for(var i=t.children[n].children[1],o=0;o<i.children.length;o++)e.push(i.children[o]);return e},n.prototype._clickListener=function(t){if(this._isEnabled){var e=t.currentTarget,n=e.getAttribute("data-value");n!==this._value&&null!==this._checkedElement&&(this._checkedElement.classList.remove("Checked"),this._checkedElement=e,this._checkedElement.classList.add("Checked"),this._value=n,this._manageDirtyState(this._value)&&this._raiseDirtyStateChangeEvent(this._isDirty),this._raiseChangeEvent())}},n.prototype._manageDirtyState=function(t){var e=!1;return this._isDirty&&t!==this._originalValue||(this._isDirty=!this._isDirty,e=!0),e},n.prototype._raiseChangeEvent=function(){if(this._changeHandlers.length>0)for(var e=new t.ChangeEventArgs(this),n=0,i=this._changeHandlers;n<i.length;n++){(0,i[n])(e)}},n.prototype._raiseDirtyStateChangeEvent=function(t){if(this._dirtyStateChangeHandlers.length>0)for(var e=new AutotaskDirtyStateSystem.DirtyStateChangeEventArgs(t),n=0,i=this._dirtyStateChangeHandlers;n<i.length;n++){(0,i[n])(e)}},n}(AutotaskEditorSystem.Editor);t.ImageRadioButtonGroup=e}(AutotaskImageRadioButtonGroup||(AutotaskImageRadioButtonGroup={})),function(t){var e=function(){function t(t){this._editorInstance=t}return Object.defineProperty(t.prototype,"editorInstance",{get:function(){return this._editorInstance},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"instanceId",{get:function(){return this._editorInstance.id},enumerable:!1,configurable:!0}),t}();t.ChangeEventArgs=e}(AutotaskIntegerBox||(AutotaskIntegerBox={})),function(t){var e=function(){function t(t,e,n){this._editorInstance=t,this._previousValue=e,this._currentValue=n}return Object.defineProperty(t.prototype,"currentValue",{get:function(){return this._currentValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"editorInstance",{get:function(){return this._editorInstance},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"previousValue",{get:function(){return this._previousValue},enumerable:!1,configurable:!0}),t}();t.ImmediateChangeEventArgs=e}(AutotaskIntegerBox||(AutotaskIntegerBox={})),function(t){var e=function(e){function n(t,n,i,o,a,r,s,l,u){var c=this,d=AutotaskDomSystem.Document.getElementById(t);return(c=e.call(this,t,d,n,i,s,l,u)||this)._isGroupSeparatorEnabled=o,c._integerBoxValidation=u,c._changeHandlers=new Array,c._immediateChangeHandlers=new Array,null!==a&&c._changeHandlers.push(a),null!==r&&c._immediateChangeHandlers.push(r),c}return __extends(n,e),Object.defineProperty(n.prototype,"participantValidation",{get:function(){return this._integerBoxValidation},enumerable:!1,configurable:!0}),n.prototype.addChangeHandler=function(t){this._changeHandlers.push(t)},n.prototype.addImmediateChangeHandler=function(t){this._immediateChangeHandlers.push(t)},n.prototype.__initialize=function(){this._integerBoxValidation.initialize()},n.prototype._convertNumberToDisplayString=function(t){var e=null;return this._isGroupSeparatorEnabled?e=this._convertNumberToString(t):null!==t&&(e=window.autotask.convert.integerToStringWithoutGroupSeparator(t)),e},n.prototype._convertNumberToSerializedString=function(t){return this._convertNumberToString(t)},n.prototype._convertDisplayStringToNumber=function(t){return window.autotask.convert.stringToInteger(t)},n.prototype._isANumber=function(t){return e.prototype._isANumber.call(this,t)&&t>=-2147483647&&t<=2147483647},n.prototype._raiseChangeEvent=function(){if(this._changeHandlers.length>0)for(var e=new t.ChangeEventArgs(this),n=0,i=this._changeHandlers;n<i.length;n++){(0,i[n])(e)}},n.prototype._raiseImmediateChangeEvent=function(e,n){if(this._immediateChangeHandlers.length>0)for(var i=new t.ImmediateChangeEventArgs(this,e,n),o=0,a=this._immediateChangeHandlers;o<a.length;o++){(0,a[o])(i)}},n.prototype._convertNumberToString=function(t){var e=null;return null!==t&&(e=window.autotask.convert.integerToString(t)),e},n}(AutotaskEditorSystem.NumberBox);t.IntegerBox=e}(AutotaskIntegerBox||(AutotaskIntegerBox={})),function(t){var e=function(t){function e(e,n,i,o){var a=t.call(this,e)||this;return a._invalidNumberMessage=n,a._requiredValidatorProvider=i,a._rangeValidator=o,a._requiredValidator=null,a}return __extends(e,t),Object.defineProperty(e.prototype,"_isRequired",{get:function(){return null!==this._requiredValidator},enumerable:!1,configurable:!0}),e.prototype.initialize=function(){var t=this;null!==this._requiredValidatorProvider&&(this._requiredValidatorProvider.initialize(),this._requiredValidatorProvider.addRequiredStateChangedHandler((function(){t._requiredStateChanged()})),this._requiredValidator=this._requiredValidatorProvider.createValidator())},e.prototype.resetValidationResult=function(t){this._updateValidationResult(new AutotaskEditorSystem.ValidResult,!1,t,!0)},e.prototype.validate=function(t,e,n,i){var o=new AutotaskEditorSystem.ValidResult;return e||(o=new AutotaskEditorSystem.InvalidResult(this._invalidNumberMessage,null)),o.isValid&&null!==this._requiredValidator&&(o=this._requiredValidator.validate(t)),o.isValid&&null!==this._rangeValidator&&(o=this._rangeValidator.validate(t)),this._updateValidationResult(o,n,i,!0),o.isValid},e.prototype._requiredStateChanged=function(){var t=this._requiredValidatorProvider;this._requiredValidator=t.createValidator(),this._raiseRequiredStateChanged()},e}(AutotaskEditorSystem.EditorValidation);t.IntegerBoxValidation=e}(AutotaskIntegerBox||(AutotaskIntegerBox={})),function(t){var e=function(t){function e(e,n,i,o,a,r,s,l){var u=t.call(this,e,o,s)||this;u._backingEditorId=i,u._button=null,u._buttonId=n,u._unmaskRoute=l,u._backingIntegerBoxEditor=void 0,u._originalValue=null,u._isDirty=!1,u._dirtyStateChangeHandlers=[],u._disposingHandlers=[],u._isEnabled=a,u._hasServerValue=r;var c=AutotaskDomSystem.Document.getElementById(e).children[0];return u._maskElement=AutotaskDomSystem.Document.getChildElementByClassName(c,"Mask"),u}return __extends(e,t),Object.defineProperty(e.prototype,"hasServerValue",{get:function(){return this._hasServerValue},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isDirty",{get:function(){return this._isDirty},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isEnabled",{get:function(){return this._isEnabled},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"participantValidation",{get:function(){return this._backingEditor.participantValidation},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_backingEditor",{get:function(){return void 0===this._backingIntegerBoxEditor?autotask.throwException("_backingIntegerBoxEditor is undefined."):this._backingIntegerBoxEditor},enumerable:!1,configurable:!0}),e.prototype.addDirtyStateChangeHandler=function(t){this._dirtyStateChangeHandlers.push(t)},e.prototype.addDisposingHandler=function(t){this._disposingHandlers.push(t)},e.prototype.createRequestData=function(){return this._createRequestData(this._backingEditor,"3",this.isDirty)},e.prototype.focus=function(){this._backingEditor.focus()},e.prototype.resetValidation=function(){this._backingEditor.resetValidation()},e.prototype.validate=function(){return this._backingEditor.validate()},e.prototype.__dispose=function(){this._raiseDisposingEvent()},e.prototype.__initialize=function(){var t=this;if(this._backingIntegerBoxEditor=autotask.find(this._backingEditorId),this._backingIntegerBoxEditor.addBlurHandler((function(){t._backingIntegerBoxBlurHandler()})),this._backingIntegerBoxEditor.addImmediateChangeHandler((function(){t._backingIntegerBoxImmediateChangeHandler()})),null!==this._buttonId){this._button=autotask.find(this._buttonId);var e=new AutotaskButtonSystem.ClickEventHandler((function(){t._buttonClickHandler()}));this._button.addEventHandler(e)}},e.prototype._backingIntegerBoxImmediateChangeHandler=function(){this._manageDirtyState(this._backingEditor.value)&&this._raiseDirtyStateChangeEvent(this._isDirty)},e.prototype._backingIntegerBoxBlurHandler=function(){this._isDirty||(this._backingEditor.value=null,this._originalValue=null),this._mask()},e.prototype._buttonClickHandler=function(){var t=this;this._isDirty?this._unmask():this._unmaskRoute.getMaskedNumericValue((function(e){return t._unmaskValueSuccessHandler(e)}))},e.prototype._manageDirtyState=function(t){var e=!1;return this._isDirty&&t!==this._originalValue||(this._isDirty=!this._isDirty,e=!0),e},e.prototype._mask=function(){this._backingEditor.isEnabled=!1,this._maskElement.classList.remove("Inactive"),null!==this._button&&(this._button.isEnabled=!0)},e.prototype._raiseDirtyStateChangeEvent=function(t){if(this._dirtyStateChangeHandlers.length>0)for(var e=new AutotaskDirtyStateSystem.DirtyStateChangeEventArgs(t),n=0,i=this._dirtyStateChangeHandlers;n<i.length;n++){(0,i[n])(e)}},e.prototype._raiseDisposingEvent=function(){if(this._disposingHandlers.length>0)for(var t=new Autotask.DisposingEventArgs(this.id),e=0,n=this._disposingHandlers;e<n.length;e++){(0,n[e])(t)}},e.prototype._unmask=function(){this._backingEditor.isEnabled=!0,this._backingEditor.focus(),this._maskElement.classList.add("Inactive"),null!==this._button&&(this._button.isEnabled=!1)},e.prototype._unmaskValueSuccessHandler=function(t){this._backingEditor.value=t,this._originalValue=this._backingEditor.value,this._unmask()},e}(AutotaskEditorSystem.MaskedUserDefinedField);t.MaskedUserDefinedField=e}(AutotaskIntegerBox||(AutotaskIntegerBox={})),function(t){var e=function(t){function e(e,n,i){var o=t.call(this,e)||this;return o._maskedEditorId=e,o._invalidNumberMessage=n,o._requiredValidator=i,o}return __extends(e,t),Object.defineProperty(e.prototype,"_isRequired",{get:function(){return null!==this._requiredValidator},enumerable:!1,configurable:!0}),e.prototype.initialize=function(){},e.prototype.resetValidationResult=function(t){this._updateValidationResult(new AutotaskEditorSystem.ValidResult,!1,t,!0)},e.prototype.validate=function(t,e,n,i){var o=new AutotaskEditorSystem.ValidResult,a=autotask.find(this._maskedEditorId);return!a.isEnabled||a.hasServerValue&&!a.isDirty||(e||(o=new AutotaskEditorSystem.InvalidResult(this._invalidNumberMessage,null)),o.isValid&&null!==this._requiredValidator&&(o=this._requiredValidator.validate(t))),this._updateValidationResult(o,n,i,!0),o.isValid},e}(AutotaskEditorSystem.EditorValidation);t.MaskedUserDefinedFieldValidation=e}(AutotaskIntegerBox||(AutotaskIntegerBox={})),function(t){var e=function(t){function e(e,n,i,o){var a=t.call(this,e,i,o)||this;return a._backingEditorId=n,a._backingIntegerBoxEditor=void 0,a}return __extends(e,t),Object.defineProperty(e.prototype,"isDirty",{get:function(){return this._backingEditor.isDirty},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isEnabled",{get:function(){return this._backingEditor.isEnabled},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"participantValidation",{get:function(){return this._backingEditor.participantValidation},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_backingEditor",{get:function(){return void 0===this._backingIntegerBoxEditor?autotask.throwException("_backingIntegerBoxEditor is undefined."):this._backingIntegerBoxEditor},enumerable:!1,configurable:!0}),e.prototype.addTabbingAwayHandler=function(t){var e=this;this._backingEditor.addTabbingAwayHandler((function(n){t(new AutotaskEditorSystem.TabbingAwayEventArgs(e.id,n.isShiftKeyPressed,(function(){n.cancel()})))}))},e.prototype.createRequestData=function(){return this._createRequestData(this._backingEditor,"5",!this._backingEditor.isEnabled)},e.prototype.focus=function(){this._backingEditor.focus()},e.prototype.focusEnd=function(){this._backingEditor.focusEnd()},e.prototype.focusStart=function(){this._backingEditor.focusStart()},e.prototype.resetValidation=function(){this._backingEditor.resetValidation()},e.prototype.validate=function(){return this._backingEditor.validate()},e.prototype.__initialize=function(){this._backingIntegerBoxEditor=autotask.find(this._backingEditorId)},e}(AutotaskEditorSystem.UserDefinedField);t.UserDefinedField=e}(AutotaskIntegerBox||(AutotaskIntegerBox={})),function(t){var e=function(t){function e(e,n,i){var o=t.call(this,e)||this;return o._invalidNumberMessage=n,o._requiredValidator=i,o}return __extends(e,t),Object.defineProperty(e.prototype,"_isRequired",{get:function(){return null!==this._requiredValidator},enumerable:!1,configurable:!0}),e.prototype.initialize=function(){},e.prototype.resetValidationResult=function(t){this._updateValidationResult(new AutotaskEditorSystem.ValidResult,!1,t,!0)},e.prototype.validate=function(t,e,n,i){var o=new AutotaskEditorSystem.ValidResult;return e||(o=new AutotaskEditorSystem.InvalidResult(this._invalidNumberMessage,null)),o.isValid&&null!==this._requiredValidator&&(o=this._requiredValidator.validate(t)),this._updateValidationResult(o,n,i,!0),o.isValid},e}(AutotaskEditorSystem.EditorValidation);t.UserDefinedFieldValidation=e}(AutotaskIntegerBox||(AutotaskIntegerBox={})),function(t){var e=function(t){function e(e,n,i,o){var a=t.call(this,e)||this;return a._backingEditorId=n,a._externalId=i,a._bindingPropertyName=o,a}return __extends(e,t),Object.defineProperty(e.prototype,"isDirty",{get:function(){return this._backingEditor.isDirty},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isEnabled",{get:function(){return this._backingEditor.isEnabled},enumerable:!1,configurable:!0}),e.prototype.createRequestData=function(){var t=this._backingEditor.createRequestData();return null===t&&(t={}),t[this._bindingPropertyName+".Id"]=this._externalId,t[this._bindingPropertyName+".RenderingType"]="5",t},Object.defineProperty(e.prototype,"participantValidation",{get:function(){return this._backingEditor.participantValidation},enumerable:!1,configurable:!0}),e.prototype.focus=function(){this._backingEditor.focus()},e.prototype.focusEnd=function(){this._backingEditor.focusEnd()},e.prototype.focusStart=function(){this._backingEditor.focusStart()},e.prototype.resetValidation=function(){this._backingEditor.resetValidation()},e.prototype.validate=function(){return this._backingEditor.validate()},e.prototype.resetValue=function(){this._backingEditor.resetValue()},e.prototype.addTabbingAwayHandler=function(t){var e=this;this._backingEditor.addTabbingAwayHandler((function(n){t(new AutotaskEditorSystem.TabbingAwayEventArgs(e.id,n.isShiftKeyPressed,(function(){n.cancel()})))}))},e.prototype.__initialize=function(){this._backingIntegerBoxEditor=autotask.find(this._backingEditorId)},Object.defineProperty(e.prototype,"_backingEditor",{get:function(){return void 0===this._backingIntegerBoxEditor?autotask.throwException("_backingIntegerBoxEditor is undefined."):this._backingIntegerBoxEditor},enumerable:!1,configurable:!0}),e}(Autotask.LifecycleObject);t.UserDefinedFieldIntegerBox=e}(AutotaskIntegerBox||(AutotaskIntegerBox={})),function(t){var e=function(){function t(){this._data={}}return Object.defineProperty(t.prototype,"data",{get:function(){return this._data},enumerable:!1,configurable:!0}),t.prototype.addBoolean=function(t,e){if(this._validateKey(t),null!==e){if("boolean"!=typeof e)return autotask.throwException("The value must an instance of Boolean.");this._data[t]=e.toString()}else this._data[t]=null},t.prototype.deprecatedAddDataDictionary=function(t,e){if(this._validateKey(t),null!==e){if(!(e instanceof AutotaskRequestDataSystem.RequestDataDictionary))return autotask.throwException("The value must be an instance of AutotaskRequestDataSystem.RequestDataDictionary.");var n=e.data;for(var i in n)n.hasOwnProperty(i)&&(this._data[i]=n[i])}else this._data[t]=null},t.prototype.addDataDictionary=function(t,e){if(this._validateKey(t),null!==e){if(!(e instanceof AutotaskRequestDataSystem.RequestDataDictionary))return autotask.throwException("The value must be an instance of AutotaskRequestDataSystem.RequestDataDictionary.");var n=e.data;for(var i in n)n.hasOwnProperty(i)&&(this._data[t.concat(".",i)]=n[i])}else this._data[t]=null},t.prototype.addInteger=function(t,e){if(this._validateKey(t),null!==e){if("number"!=typeof e)return autotask.throwException("The value must be an instance of Number.");this._data[t]=window.autotask.convert.integerToString(e)}else this._data[t]=null},t.prototype.addString=function(t,e){if(this._validateKey(t),null!==e&&"string"!=typeof e)return autotask.throwException("The value must be an instance of String.");this._data[t]=e},t.prototype._validateKey=function(t){this.data.hasOwnProperty(t)&&autotask.throwException("The ajax data dictionary already has an entry for the key: "+t)},t}();t.ApplyFiltersEventArgs=e}(AutotaskLargeMultipleTagSelector||(AutotaskLargeMultipleTagSelector={})),function(t){var e=function(){function e(t,e,n,i,o,a,r,s,l){var u=this;this._autoCompleteRoute=e,this._overlay=t,this._overlayLaunchingElement=n,this._overlayShowCompletedDelegate=i,this._overlayHideCompletedDelegate=o,this._overlayMouseDownDelegate=a,this._overlayMouseLeaveDelegate=r,this._itemClickDelegate=s,this._applyFiltersDelegate=l,this._overlay.initialize((function(t){u._itemClickHandler(t)}),(function(){u._overlayMouseDownHandler()}),(function(){u._overlayMouseLeaveHandler()})),this._overlay.addHideCompletedHandler((function(){u._overlayHideCompletedHandler()})),this._overlay.addShowCompletedHandler((function(){u._overlayShowCompletedHandler()})),this._ajaxRequestCanceler=null,this._overlayExplicitlyHidden=!1,this._timeoutDuration=300,this._timeoutId=null}return Object.defineProperty(e.prototype,"isOverlayVisible",{get:function(){return this._overlay.isVisible},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isSearchInProgress",{get:function(){return null!==this._ajaxRequestCanceler},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"itemSet",{get:function(){return this._overlay.itemSet},enumerable:!1,configurable:!0}),e.prototype.cancelSearch=function(){null!==this._ajaxRequestCanceler&&(this._ajaxRequestCanceler.__cancelRequest(),this._ajaxRequestCanceler=null)},e.prototype.hideOverlay=function(){this._overlayExplicitlyHidden=!0,this._overlay.hide()},e.prototype.search=function(t){var e=this;null!==this._timeoutId&&window.clearTimeout(this._timeoutId),this._timeoutId=window.setTimeout((function(){e._timeoutHandler(t)}),this._timeoutDuration)},e.prototype.setOverlayHidingCompleteHandler=function(t){this._overlay.addHideCompletedHandler(t)},e.prototype.showOverlay=function(){this._overlay.show(this._overlayLaunchingElement)},e.prototype._autoCompleteSuccessHandler=function(t){this._ajaxRequestCanceler=null,this._overlay.isVisible&&(null!==t?(this._overlay.applyItemListHtml(t),this._overlay.hideLoadingIndicator(),null!==this._overlay.itemSet&&this._overlay.itemSet.itemCount>0&&this._overlay.itemSet.targetFirstItem()):(this._overlay.hideLoadingIndicator(),this.hideOverlay()))},e.prototype._itemClickHandler=function(t){null!==this._itemClickDelegate&&this._itemClickDelegate(t)},e.prototype._overlayHideCompletedHandler=function(){null!==this._overlayHideCompletedDelegate&&this._overlayHideCompletedDelegate(!this._overlayExplicitlyHidden),this._overlayExplicitlyHidden=!1},e.prototype._overlayMouseDownHandler=function(){null!==this._overlayMouseDownDelegate&&this._overlayMouseDownDelegate()},e.prototype._overlayMouseLeaveHandler=function(){null!==this._overlayMouseLeaveDelegate&&this._overlayMouseLeaveDelegate()},e.prototype._overlayShowCompletedHandler=function(){null!==this._overlayShowCompletedDelegate&&this._overlayShowCompletedDelegate()},e.prototype._search=function(){var e=this,n=new t.ApplyFiltersEventArgs;this._applyFiltersDelegate(n),this._ajaxRequestCanceler=this._autoCompleteRoute.autoComplete(n.data,(function(t){e._autoCompleteSuccessHandler(t)}))},e.prototype._timeoutHandler=function(t){this.isSearchInProgress&&this.cancelSearch(),t.length>0&&!this.isOverlayVisible&&this.showOverlay(),null!==this._overlay.itemSet&&this._overlay.clearItemSet(),this._overlay.showLoadingIndicator(),this._search()},e}();t.AutoCompleteCoordinator=e}(AutotaskLargeMultipleTagSelector||(AutotaskLargeMultipleTagSelector={})),function(t){var e=function(){function t(t,e){this._chipInfomation=t,this._chipElement=e}return Object.defineProperty(t.prototype,"chipInformation",{get:function(){return this._chipInfomation},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"chipElement",{get:function(){return this._chipElement},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"groupName",{get:function(){return this._chipInfomation.groupName},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"text",{get:function(){return this._chipInfomation.text},enumerable:!1,configurable:!0}),t}();t.Chip=e}(AutotaskLargeMultipleTagSelector||(AutotaskLargeMultipleTagSelector={})),function(t){var e=function(){function t(t,e,n,i){this._text=t,this._groupName=e,this._groupColorCssClass=n,this._isRemoveEnabled=i}return t.getChipElements=function(e){return AutotaskDomSystem.Document.getChildElementsByClassName(e,t._chipCssClass)},t.isTargetingRemoveButton=function(e){return e.classList.contains(t._removeButtonCssClass)||e.classList.contains(t._removeIconContainerCssClass)},t.prototype.generateChipElement=function(){var t=document.createElement("div");null!==this._groupName&&t.setAttribute("data-group-name",this._groupName),t.classList.add("Chip"),null!==this._groupColorCssClass?(t.classList.add(this._groupColorCssClass),t.classList.add("ColorSample"),t.classList.add("ColorBorder")):t.classList.add("DefaultColor"),this._isRemoveEnabled||t.classList.add("NoRemove");var e=document.createElement("div");e.classList.add("InnerChip"),t.appendChild(e);var n=document.createElement("div");if(n.classList.add("Text"),n.appendChild(document.createTextNode(this._text)),t.appendChild(n),this._isRemoveEnabled){var i=document.createElement("div");i.classList.add("TagRemoveIcon");var o=document.createElement("div");o.classList.add("IconContainer"),o.appendChild(i),t.appendChild(o)}return t},t._chipCssClass="Chip",t._removeButtonCssClass="TagRemoveIcon",t._removeIconContainerCssClass="IconContainer",t}();t.ChipGenerator=e}(AutotaskLargeMultipleTagSelector||(AutotaskLargeMultipleTagSelector={})),function(t){var e=function(){function e(e,n,i,o,a){this._itemValue=e,this._text=n,this._groupName=i,this._chipGenerator=new t.ChipGenerator(n,i,o,a)}return Object.defineProperty(e.prototype,"chipGenerator",{get:function(){return this._chipGenerator},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"groupName",{get:function(){return this._groupName},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"itemValue",{get:function(){return this._itemValue},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"text",{get:function(){return this._text},enumerable:!1,configurable:!0}),e}();t.ChipInformation=e}(AutotaskLargeMultipleTagSelector||(AutotaskLargeMultipleTagSelector={})),function(t){var e=function(){function e(e,n,i,o){var a=this;this._element=AutotaskDomSystem.Document.getElementById(e),this._isEnabled=n,this._isGroupSortingEnabled=o,i.length!==this._element.childElementCount&&autotask.throwException("Unexpected chip list construction."),this._chips=[],this._chipClickListener=function(t){a._chipClick(t)},this._chipClickHandlers=[],this._chipRemovedHandlers=[],this._chipRemovingHandlers=[],this._focusHandlers=[];for(var r=0;r<this._element.children.length;r++){var s=i[r],l=this._element.children[r];this._addChipEventListeners(l),this._chips.push(new t.Chip(s,l))}}return Object.defineProperty(e.prototype,"chipInformation",{get:function(){for(var t=[],e=0,n=this._chips;e<n.length;e++){var i=n[e];t.push(i.chipInformation)}return t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"count",{get:function(){return this._chips.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isEnabled",{get:function(){return this._isEnabled},set:function(t){this._isEnabled=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isGroupSortingEnabled",{get:function(){return this._isGroupSortingEnabled},set:function(t){t!==this._isGroupSortingEnabled&&(this._isGroupSortingEnabled=t,this._sort())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){for(var t=[],e=0,n=this._chips;e<n.length;e++){var i=n[e];t.push(i.chipInformation.itemValue)}return t},enumerable:!1,configurable:!0}),e.prototype.addChipClickHandler=function(t){this._chipClickHandlers.push(t)},e.prototype.addChipRemovedHandler=function(t){this._chipRemovedHandlers.push(t)},e.prototype.addChipRemovingHandler=function(t){this._chipRemovingHandlers.push(t)},e.prototype.addFocusHandler=function(t){this._focusHandlers.push(t)},e.prototype.clear=function(){for(var t=this._chips.length-1;t>=0;t--)this._removeChipEventListeners(this._chips[t].chipElement),this._element.removeChild(this._chips[t].chipElement);this._chips.length=0},e.prototype.insert=function(t){this._insert(t),this._sort()},e.prototype.insertMultiple=function(t){for(var e=0,n=t;e<n.length;e++){var i=n[e];this._insert(i)}this._sort()},e.prototype.removeByValue=function(t){if(this._chips.length>0){var e=this._findIndexByValue(t);if(null===e)return autotask.throwException("The item value was not found.");this._removeByIndex(e)}},e.prototype._addChipEventListeners=function(t){t.addEventListener("click",this._chipClickListener)},e.prototype._chipClick=function(e){if(this._isEnabled){var n=e.target,i=e.currentTarget,o=this._findIndexByChip(i),a=this._chips[o].chipInformation.itemValue;t.ChipGenerator.isTargetingRemoveButton(n)?(e.stopPropagation(),this._raiseChipRemovingEvent(a),this._removeByIndex(o),this._raiseChipRemovedEvent(a)):(this._raiseFocusEvent(),this._raiseChipClickEvent(a))}},e.prototype._findIndexByChip=function(e){for(var n=0,i=0,o=t.ChipGenerator.getChipElements(this._element);i<o.length;i++){if(e===o[i])return n;n++}return autotask.throwException("The item value was not found.")},e.prototype._findIndexByValue=function(t){for(var e=null,n=0,i=0,o=this._chips;i<o.length;i++){var a=o[i];AutotaskItemSelectionSystem.ItemValueComparer.equals(t,a.chipInformation.itemValue)&&(e=n),n++}return e},e.prototype._insert=function(e){var n=e.chipGenerator.generateChipElement();this._addChipEventListeners(n),this._chips.push(new t.Chip(e,n)),this._element.appendChild(n)},e.prototype._raiseChipClickEvent=function(t){if(this._chipClickHandlers.length>0)for(var e=new AutotaskEditorSystem.ChipListChipClickEventArgs(t),n=0,i=this._chipClickHandlers;n<i.length;n++){(0,i[n])(e)}},e.prototype._raiseChipRemovedEvent=function(t){if(this._chipRemovedHandlers.length>0)for(var e=new AutotaskEditorSystem.ChipListChipRemovedEventArgs(t),n=0,i=this._chipRemovedHandlers;n<i.length;n++){(0,i[n])(e)}},e.prototype._raiseChipRemovingEvent=function(t){if(this._chipRemovingHandlers.length>0)for(var e=new AutotaskEditorSystem.ChipListChipRemovingEventArgs(t),n=0,i=this._chipRemovingHandlers;n<i.length;n++){(0,i[n])(e)}},e.prototype._raiseFocusEvent=function(){for(var t=0,e=this._focusHandlers;t<e.length;t++){(0,e[t])()}},e.prototype._removeByIndex=function(t){this._removeChipEventListeners(this._chips[t].chipElement),this._element.removeChild(this._chips[t].chipElement),this._chips.splice(t,1)},e.prototype._removeChipEventListeners=function(t){t.removeEventListener("click",this._chipClickListener)},e.prototype._sort=function(){this._isGroupSortingEnabled?this._sortByGroup():this._sortByText()},e.prototype._sortByText=function(){for(this._chips.sort((function(t,e){var n=0;return t.text<e.text?n=-1:t.text>e.text&&(n=1),n}));null!==this._element.firstChild;)this._element.removeChild(this._element.firstChild);for(var t=0,e=this._chips;t<e.length;t++){var n=e[t];this._element.appendChild(n.chipElement)}},e.prototype._sortByGroup=function(){for(this._chips.sort((function(t,e){var n=0;return t.groupName!==e.groupName?n=null===t.groupName?1:null===e.groupName||t.groupName<e.groupName?-1:1:t.text<e.text?n=-1:t.text>e.text&&(n=1),n}));null!==this._element.firstChild;)this._element.removeChild(this._element.firstChild);for(var t=0,e=this._chips;t<e.length;t++){var n=e[t];this._element.appendChild(n.chipElement)}},e}();t.ChipList=e}(AutotaskLargeMultipleTagSelector||(AutotaskLargeMultipleTagSelector={})),function(t){var e=function(){function t(t){this._chipInformation=t}return Object.defineProperty(t.prototype,"chipInformation",{get:function(){return this._chipInformation},enumerable:!1,configurable:!0}),t}();t.DialogSelectedEventArgs=e}(AutotaskLargeMultipleTagSelector||(AutotaskLargeMultipleTagSelector={})),function(t){var e=function(){function t(t){this._values=t}return Object.defineProperty(t.prototype,"values",{get:function(){return this._values},enumerable:!1,configurable:!0}),t}();t.DialogSelectionSavedEventArgs=e}(AutotaskLargeMultipleTagSelector||(AutotaskLargeMultipleTagSelector={})),function(t){var e=function(t){function e(e,n){var i=t.call(this,e)||this;return i._chipInforamtion=n,i}return __extends(e,t),Object.defineProperty(e.prototype,"chipInformation",{get:function(){return this._chipInforamtion},enumerable:!1,configurable:!0}),e}(Autotask.LifecycleObject);t.InsertNewTagResponse=e}(AutotaskLargeMultipleTagSelector||(AutotaskLargeMultipleTagSelector={})),function(t){var e=function(){function t(t){this._item=t}return Object.defineProperty(t.prototype,"chipInformation",{get:function(){return this._item.chipInformation},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"itemValue",{get:function(){return this._item.value},enumerable:!1,configurable:!0}),t}();t.ItemClickEventArgs=e}(AutotaskLargeMultipleTagSelector||(AutotaskLargeMultipleTagSelector={})),function(t){var e=function(){function e(e,n){this._items=this._createItemArray(e),this._targetCoordinator=new t.ItemListTargetCoordinator(this._items),this._itemClickDelegate=n,this._isMouseOverTargetingEnabled=!0}return Object.defineProperty(e.prototype,"isMouseOverTargetingEnabled",{get:function(){return this._isMouseOverTargetingEnabled},set:function(t){this._isMouseOverTargetingEnabled=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"itemCount",{get:function(){return this._items.length},enumerable:!1,configurable:!0}),e.prototype.createChipInformationForTargetedItem=function(){var t=null;return null!==this._targetCoordinator.targetedItem&&(t=this._targetCoordinator.targetedItem.chipInformation),t},e.prototype.dispose=function(){delete this._itemClickDelegate;for(var t=0,e=this._items;t<e.length;t++){e[t].dispose()}},e.prototype.getTargetedItemValue=function(){var t=null,e=this._targetCoordinator.targetedItem;return null!==e&&(t=e.value),t},e.prototype.moveTargetDown=function(){this._targetCoordinator.moveTargetDown()},e.prototype.moveTargetLeft=function(){this._targetCoordinator.moveTargetLeft()},e.prototype.moveTargetRight=function(){this._targetCoordinator.moveTargetRight()},e.prototype.moveTargetUp=function(){this._targetCoordinator.moveTargetUp()},e.prototype.targetFirstItem=function(){this._targetCoordinator.targetFirstItem()},e.prototype._createItem=function(e){var n=this;return new t.ItemListItem(e,(function(t,e){n._itemClickHandler(t,e)}),(function(t){n._itemMouseOverHandler(t)}))},e.prototype._createItemArray=function(t){for(var e=[],n=t.firstElementChild;null!==n;){var i=this._createItem(n);null!==i&&e.push(i),n=n.nextElementSibling}return e},e.prototype._itemClickHandler=function(t,e){this._itemClickDelegate(t,e)},e.prototype._itemMouseOverHandler=function(t){this.isMouseOverTargetingEnabled&&this._targetCoordinator.targetItemByIndex(t)},e}();t.ItemList=e}(AutotaskLargeMultipleTagSelector||(AutotaskLargeMultipleTagSelector={})),function(t){var e=function(){function e(t,e,n){var i=this;this._itemElement=t,this._itemClickDelegate=e,this._itemMouseOverDelegate=n,this._chipInformation=null,this._offsetLeft=t.offsetLeft,this._rowIndex=t.offsetTop/t.clientHeight,this._primaryValue=null,this._secondaryValues=null,this._width=t.clientWidth,this._itemElement.addEventListener("click",(function(){i._itemClickListener()})),this._itemElement.addEventListener("mouseover",(function(){i._itemMouseOverListener()}))}return Object.defineProperty(e.prototype,"chipInformation",{get:function(){return null===this._chipInformation&&(this._chipInformation=this._createChipInformation()),this._chipInformation},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"offsetLeft",{get:function(){return this._offsetLeft},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"offsetRight",{get:function(){return this._offsetLeft+this._width},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rowIndex",{get:function(){return this._rowIndex},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return new AutotaskItemSelectionSystem.ItemValue(this.primaryValue,this.secondaryValues)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"width",{get:function(){return this._width},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"primaryValue",{get:function(){return null===this._primaryValue&&(this._primaryValue=this._createPrimaryValue()),this._primaryValue},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"secondaryValues",{get:function(){return null===this._secondaryValues&&(this._secondaryValues=this._createSecondaryValues()),this._secondaryValues},enumerable:!1,configurable:!0}),e.prototype.dispose=function(){delete this._itemClickDelegate,delete this._itemMouseOverDelegate},e.prototype.removeTargeting=function(){this._itemElement.dataset.isTargeted="false"},e.prototype.target=function(){this._itemElement.dataset.isTargeted="true"},e.prototype._createChipInformation=function(){var e=this._itemElement.dataset.displayText,n="true"===this._itemElement.dataset.isRemoveEnabled,i=void 0!==this._itemElement.dataset.groupName?this._itemElement.dataset.groupName:null,o=void 0!==this._itemElement.dataset.groupColorCss?this._itemElement.dataset.groupColorCss:null;return new t.ChipInformation(new AutotaskItemSelectionSystem.ItemValue(this.primaryValue,this.secondaryValues),e,i,o,n)},e.prototype._createPrimaryValue=function(){return this._itemElement.dataset.value},e.prototype._createSecondaryValues=function(){var t=null,e="k0",n="v0",i=0;if(void 0!==this._itemElement.dataset[e])for(t={};void 0!==this._itemElement.dataset[e];){var o=this._itemElement.dataset[e],a=this._itemElement.dataset[n];t[o]=void 0!==a?a:null,e="k"+(++i).toString(),n="v"+i.toString()}return t},e.prototype._itemClickListener=function(){var t=parseInt(this._itemElement.dataset.index,0);this._itemClickDelegate(t,this)},e.prototype._itemMouseOverListener=function(){var t=parseInt(this._itemElement.dataset.index,0);this._itemMouseOverDelegate(t)},e}();t.ItemListItem=e}(AutotaskLargeMultipleTagSelector||(AutotaskLargeMultipleTagSelector={})),function(t){var e=function(){function t(t){this._items=t,this._rowCount=this._items.length>0?this._items[this._items.length-1].rowIndex+1:0,this._targetedItemIndex=null}return Object.defineProperty(t.prototype,"targetedItem",{get:function(){var t=null;return null!==this._targetedItemIndex&&(t=this._items[this._targetedItemIndex]),t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"targetedItemIndex",{get:function(){return this._targetedItemIndex},enumerable:!1,configurable:!0}),t.prototype.moveTargetDown=function(){if(null!==this._targetedItemIndex&&this._rowCount>1){var e=this._items[this._targetedItemIndex];if(e.rowIndex<this._rowCount-1){for(var n=null,i=0,o=0,a=this._items.filter((function(t){return t.rowIndex===e.rowIndex+1}));o<a.length;o++){var r=a[o],s=t._calculateOverlap(e,r);if(s>i)i=s,n=r;else if(0===s&&0===i)n=r;else if(i>0&&0===s)break}if(null!==n){var l=this._items.indexOf(n);this.targetItemByIndex(l)}}}},t.prototype.moveTargetLeft=function(){null!==this._targetedItemIndex&&0!==this._targetedItemIndex&&this.targetItemByIndex(this._targetedItemIndex-1)},t.prototype.moveTargetRight=function(){null!==this._targetedItemIndex&&this._targetedItemIndex!==this._items.length-1&&this.targetItemByIndex(this._targetedItemIndex+1)},t.prototype.moveTargetUp=function(){if(null!==this._targetedItemIndex&&this._rowCount>1){var e=this._items[this._targetedItemIndex];if(0!==e.rowIndex){for(var n=null,i=0,o=0,a=this._items.filter((function(t){return t.rowIndex===e.rowIndex-1}));o<a.length;o++){var r=a[o],s=t._calculateOverlap(e,r);if(s>i)i=s,n=r;else if(0===s&&0===i)n=r;else if(i>0&&0===s)break}if(null!==n){var l=this._items.indexOf(n);this.targetItemByIndex(l)}}}},t.prototype.removeTargeting=function(){null!==this._targetedItemIndex&&(this._items[this._targetedItemIndex].removeTargeting(),this._targetedItemIndex=null)},t.prototype.targetFirstItem=function(){0!==this._items.length&&this.targetItemByIndex(0)},t.prototype.targetItemByIndex=function(t){t!==this._targetedItemIndex&&(this.removeTargeting(),this._items[t].target(),this._targetedItemIndex=t)},t._calculateOverlap=function(t,e){var n=0;return e.offsetLeft<=t.offsetLeft?t.offsetRight<e.offsetRight?n=t.width:e.offsetRight-t.offsetLeft>n&&(n=e.offsetRight-t.offsetLeft):e.offsetLeft<t.offsetRight&&(e.offsetRight<=t.offsetRight?e.width>n&&(n=e.width):t.offsetRight-e.offsetLeft>n&&(n=t.offsetRight-e.offsetLeft)),n},t}();t.ItemListTargetCoordinator=e}(AutotaskLargeMultipleTagSelector||(AutotaskLargeMultipleTagSelector={})),function(t){var e=function(){function e(e,n){var i=this;this._itemClickDelegate=n,this._itemList=new t.ItemList(e.firstElementChild,(function(t,e){return i._itemClickHandler(t,e)}))}return Object.defineProperty(e.prototype,"itemCount",{get:function(){return this._itemList.itemCount},enumerable:!1,configurable:!0}),e.prototype.createChipInformationForTargetedItem=function(){return this._itemList.createChipInformationForTargetedItem()},e.prototype.dispose=function(){delete this._itemClickDelegate,this._itemList.dispose()},e.prototype.moveTargetDown=function(){this._itemList.moveTargetDown()},e.prototype.moveTargetLeft=function(){this._itemList.moveTargetLeft()},e.prototype.moveTargetRight=function(){this._itemList.moveTargetRight()},e.prototype.moveTargetUp=function(){this._itemList.moveTargetUp()},e.prototype.targetFirstItem=function(){this._itemList.targetFirstItem()},e.prototype._itemClickHandler=function(e,n){var i=new t.ItemClickEventArgs(n);this._itemClickDelegate(i)},e}();t.ItemSet=e}(AutotaskLargeMultipleTagSelector||(AutotaskLargeMultipleTagSelector={})),function(t){var e=function(e){function n(n,i,o,a,r,s,l,u,c,d,h,_,p,m,f){var y=e.call(this,n)||this;y._editorElement=AutotaskDomSystem.Document.getElementById(n);var g=AutotaskDomSystem.Document.getChildElementByClassName(y._editorElement,"InputContainer"),v=AutotaskDomSystem.Document.getChildElementByClassName(g,"SearchBox");return y._bindingPropertyName=o,y._dialogButtonId=a,y._newTagButtonId=r,y._isEnabled=i,y._selectionDialogRoute=c,y._suggestedTagsDialogRoute=d,y._insertNewTagRoute=_,y._maximumSelectionCount=p,y._maximumSelectionCountExceededMessage=m,y._alertDialog=f,y._chipList=s,y._chipList.addChipClickHandler((function(t){y._chipClickHandler(t)})),y._chipList.addChipRemovedHandler((function(t){y._chipRemovedHandler(t)})),y._chipList.addFocusHandler((function(){y._chipListFocusHandler()})),y._searchBox=l,y._searchBox.initialize((function(t){y._searchBoxTextChangedHandler(t)}),(function(){y._enterKeyHandler()}),(function(){y._escapeKeyHandler()}),(function(t){y._blurHandler(t)}),(function(t){y._keyUpHandler(t)}),(function(t){y._navigationKeyHandler(t)})),y._autoCompleteCoordinator=new t.AutoCompleteCoordinator(u,h,v,(function(){y._overlayShowCompletedHandler()}),(function(t){y._overlayHideCompletedHandler(t)}),(function(){y._overlayMouseDownHandler()}),(function(){y._overlayMouseLeaveHandler()}),(function(t){y._itemClickHandler(t)}),(function(t){return y._applyFiltersHandler(t)})),y._applyingAutoCompleteFilterHandlers=[],y._applyingSelectionDialogFilterHandlers=[],y._arrayComparer=new AutotaskEditorSystem.ArrayComparer(null,AutotaskItemSelectionSystem.ItemValueSorter.compare),y._dialogButton=null,y._dialogSelectionSavedHandlers=[],y._dirtyStateChangeHandlers=[],y._isDirty=!1,y._isMaximumSelectionExceededMessageQueued=!1,y._newTagButton=null,y._newTagRequestHandlers=[],y._originalValue=y._chipList.value,y._tabbingAwayHandlers=[],y._tagAddedHandlers=[],y._tagClickedHandlers=[],y._tagRemovedHandlers=[],y}return __extends(n,e),Object.defineProperty(n.prototype,"isDirty",{get:function(){return this._isDirty},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isEnabled",{get:function(){return this._isEnabled},set:function(t){t!==this._isEnabled&&(this._searchBox.isEnabled=t,this._chipList.isEnabled=t,null!==this._dialogButton&&(this._dialogButton.isEnabled=t),this._isEnabled=t)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isGroupSortingEnabled",{get:function(){return this._chipList.isGroupSortingEnabled},set:function(t){this._chipList.isGroupSortingEnabled=t},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"searchText",{get:function(){return this._searchBox.searchText.length>0?this._searchBox.searchText:null},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"selectionCount",{get:function(){return this._chipList.count},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"value",{get:function(){return new AutotaskItemSelectionSystem.ItemValueCollection(this._chipList.value)},enumerable:!1,configurable:!0}),n.prototype.addApplyAutoCompleteFilters=function(t){this._applyingAutoCompleteFilterHandlers.push(t)},n.prototype.addApplySelectionDialogFilters=function(t){this._applyingSelectionDialogFilterHandlers.push(t)},n.prototype.addDialogSelectionSavedHandler=function(t){this._dialogSelectionSavedHandlers.push(t)},n.prototype.addDirtyStateChangeHandler=function(t){this._dirtyStateChangeHandlers.push(t)},n.prototype.addNewTagRequestHandler=function(t){this._newTagRequestHandlers.push(t)},n.prototype.addTabbingAwayHandler=function(t){var e=this;this._tabbingAwayHandlers.push(t),1===this._tabbingAwayHandlers.length&&(this._searchBox.tabbingAwayHandler=function(t,n){e._searchBoxTabbingAwayHandler(t,n)},null!==this._dialogButton&&this._dialogButton.addTabbingAwayHandler((function(t){e._dialogButtonTabbingAwayHandler(t)})),null!==this._newTagButton&&this._newTagButton.addTabbingAwayHandler((function(t,n){e._newTagButtonTabbingAwayHandler(t,n)})))},n.prototype.addTagAddedHandler=function(t){this._tagAddedHandlers.push(t)},n.prototype.addTagClickedHandler=function(t){this._tagClickedHandlers.push(t)},n.prototype.addTagRemovedHandler=function(t){this._tagRemovedHandlers.push(t)},n.prototype.createRequestData=function(){var t=null;null!==this._bindingPropertyName&&(this._isEnabled?t=new AutotaskItemSelectionSystem.ItemValueCollection(this._chipList.value).__createRequestData(this._bindingPropertyName):(t={})[this._bindingPropertyName]=null);return t},n.prototype.focus=function(){this._searchBox.focus()},n.prototype.focusEnd=function(){null!==this._newTagButton&&this._newTagButton.isEnabled?this._newTagButton.focus():null!==this._dialogButton&&this._dialogButton.isEnabled?this._dialogButton.focus():this.focus()},n.prototype.focusStart=function(){this.focus()},n.prototype.insertNewTag=function(t){var e=this;this._chipList.count<this._maximumSelectionCount?this._insertNewTagRoute.insertNewTag(t,(function(t){e._insertNewTagSuccessHandler(t)})):this._showMaximumSelectionCountExceededMessage()},n.prototype.replaceTags=function(t){this._chipList.clear(),this._chipList.insertMultiple(t),this._manageDirtyState(this._chipList.value)&&this._raiseDirtyStateChangeEvent(this._isDirty)},n.prototype.showSuggestedTagsDialog=function(){null===this._suggestedTagsDialogRoute&&autotask.throwException("The suggested tags dialog has not been enabled."),this._showSelectionDialog(this._suggestedTagsDialogRoute)},n.prototype.__initialize=function(){var t=this;this._dialogButton=autotask.find(this._dialogButtonId);var e=new AutotaskButtonSystem.ClickEventHandler((function(){t._selectionDialogButtonClickHandler()}));this._dialogButton.addEventHandler(e),null!==this._newTagButtonId&&(this._newTagButton=autotask.find(this._newTagButtonId),this._newTagButton.__configure((function(){return t._searchBox.searchText})))},n.prototype._applyFiltersHandler=function(t){this._raiseApplyingAutoCompleteFilterEvent(t)},n.prototype._blurHandler=function(t){if(this._autoCompleteCoordinator.isOverlayVisible){if(this._autoCompleteCoordinator.isSearchInProgress&&this._autoCompleteCoordinator.cancelSearch(),t&&null!==this._autoCompleteCoordinator.itemSet)if(this._chipList.count<this._maximumSelectionCount){var e=this._autoCompleteCoordinator.itemSet.createChipInformationForTargetedItem();null!==e&&(this._chipList.insert(e),this._raiseTagAddedEvent(e.itemValue))}else this._isMaximumSelectionExceededMessageQueued=!0;this._autoCompleteCoordinator.hideOverlay()}this._searchBox.searchText.length>0&&(this._searchBox.clearSearchText(),this._searchBox.showPlaceholderText())},n.prototype._chipClickHandler=function(t){this._raiseTagClickedEvent(t.value)},n.prototype._chipRemovedHandler=function(t){var e=this._manageDirtyState(this._chipList.value);this._raiseTagRemovedEvent(t.value),e&&this._raiseDirtyStateChangeEvent(this._isDirty)},n.prototype._chipListFocusHandler=function(){this._searchBox.focus()},n.prototype._dialogButtonTabbingAwayHandler=function(t){t.isShiftKeyPressed?this._searchBox.focus():null!==this._newTagButton&&this._newTagButton.isEnabled?this._newTagButton.focus():this._raiseTabbingAwayEvent(t.isShiftKeyPressed,(function(){t.cancel()}))},n.prototype._enterKeyHandler=function(){if(this._autoCompleteCoordinator.isOverlayVisible&&null!==this._autoCompleteCoordinator.itemSet){if(this._chipList.count<this._maximumSelectionCount){var t=this._autoCompleteCoordinator.itemSet.createChipInformationForTargetedItem();if(null!==t){this._chipList.insert(t);var e=this._manageDirtyState(this._chipList.value);this._raiseTagAddedEvent(t.itemValue),e&&this._raiseDirtyStateChangeEvent(this._isDirty)}}else this._isMaximumSelectionExceededMessageQueued=!0;this._autoCompleteCoordinator.hideOverlay(),this._searchBox.clearSearchText()}},n.prototype._escapeKeyHandler=function(){this._autoCompleteCoordinator.isOverlayVisible&&this._autoCompleteCoordinator.hideOverlay(),this._searchBox.searchText.length>0&&(this._searchBox.clearSearchText(),this._searchBox.showPlaceholderText())},n.prototype._insertNewTagSuccessHandler=function(t){null!==t&&(this._chipList.insert(t),this._manageDirtyState(this._chipList.value)&&this._raiseDirtyStateChangeEvent(this._isDirty))},n.prototype._itemClickHandler=function(t){if(this._autoCompleteCoordinator.hideOverlay(),this._searchBox.clearSearchText(),this._chipList.count<this._maximumSelectionCount){this._chipList.insert(t.chipInformation);var e=this._manageDirtyState(this._chipList.value);this._raiseTagAddedEvent(t.chipInformation.itemValue),e&&this._raiseDirtyStateChangeEvent(this._isDirty)}else this._showMaximumSelectionCountExceededMessage()},n.prototype._keyUpHandler=function(t){AutotaskDomSystem.KeyCode.isEnter(t.which)&&(this._isMaximumSelectionExceededMessageQueued?(this._isMaximumSelectionExceededMessageQueued=!1,this._showMaximumSelectionCountExceededMessage()):this._searchBox.searchText.length>0&&this._raiseNewTagRequestEvent())},n.prototype._manageDirtyState=function(t){var e=!1;return this._isDirty&&!this._arrayComparer.equals(t,this._originalValue,!1)||(this._isDirty=!this._isDirty,e=!0),e},n.prototype._navigationKeyHandler=function(t){this._autoCompleteCoordinator.isOverlayVisible&&null!==this._autoCompleteCoordinator.itemSet&&(AutotaskDomSystem.KeyCode.isDown(t)?this._autoCompleteCoordinator.itemSet.moveTargetDown():AutotaskDomSystem.KeyCode.isLeft(t)?this._autoCompleteCoordinator.itemSet.moveTargetLeft():AutotaskDomSystem.KeyCode.isRight(t)?this._autoCompleteCoordinator.itemSet.moveTargetRight():AutotaskDomSystem.KeyCode.isUp(t)?this._autoCompleteCoordinator.itemSet.moveTargetUp():autotask.throwException("Unexpected keyCode: "+t.toString()))},n.prototype._newTagButtonTabbingAwayHandler=function(t,e){t?null!==this._dialogButton&&this._dialogButton.isEnabled?this._dialogButton.focus():this._searchBox.focus():this._raiseTabbingAwayEvent(t,e)},n.prototype._overlayHideCompletedHandler=function(t){this._searchBox.isBlurEnabled=!0,t&&this._searchBox.searchText.length>0&&(this._searchBox.clearSearchText(),this._searchBox.showPlaceholderText())},n.prototype._overlayMouseDownHandler=function(){this._searchBox.isBlurEnabled=!1},n.prototype._overlayMouseLeaveHandler=function(){this._searchBox.isBlurEnabled=!0},n.prototype._overlayShowCompletedHandler=function(){},n.prototype._raiseApplyingAutoCompleteFilterEvent=function(t){if(this._applyingAutoCompleteFilterHandlers.length>0)for(var e=0,n=this._applyingAutoCompleteFilterHandlers;e<n.length;e++){(0,n[e])(t)}},n.prototype._raiseApplyingSelectionDialogFilterEvent=function(t){if(this._applyingSelectionDialogFilterHandlers.length>0)for(var e=0,n=this._applyingSelectionDialogFilterHandlers;e<n.length;e++){(0,n[e])(t)}},n.prototype._raiseDialogSelectionSavedEvent=function(e){if(this._dialogSelectionSavedHandlers.length>0)for(var n=new t.DialogSelectionSavedEventArgs(e),i=0,o=this._dialogSelectionSavedHandlers;i<o.length;i++){(0,o[i])(n)}},n.prototype._raiseDirtyStateChangeEvent=function(t){if(this._dirtyStateChangeHandlers.length>0)for(var e=new AutotaskDirtyStateSystem.DirtyStateChangeEventArgs(t),n=0,i=this._dirtyStateChangeHandlers;n<i.length;n++){(0,i[n])(e)}},n.prototype._raiseNewTagRequestEvent=function(){for(var t=0,e=this._newTagRequestHandlers;t<e.length;t++){(0,e[t])()}},n.prototype._raiseTabbingAwayEvent=function(t,e){if(this._tabbingAwayHandlers.length>0)for(var n=new AutotaskEditorSystem.TabbingAwayEventArgs(this.id,t,e),i=0,o=this._tabbingAwayHandlers;i<o.length;i++){(0,o[i])(n)}},n.prototype._raiseTagAddedEvent=function(e){if(this._tagAddedHandlers.length>0)for(var n=new t.TagAddedEventArgs(e),i=0,o=this._tagAddedHandlers;i<o.length;i++){(0,o[i])(n)}},n.prototype._raiseTagClickedEvent=function(e){if(this._tagClickedHandlers.length>0)for(var n=new t.TagClickedEventArgs(e),i=0,o=this._tagClickedHandlers;i<o.length;i++){(0,o[i])(n)}},n.prototype._raiseTagRemovedEvent=function(e){if(this._tagRemovedHandlers.length>0)for(var n=new t.TagRemovedEventArgs(e),i=0,o=this._tagRemovedHandlers;i<o.length;i++){(0,o[i])(n)}},n.prototype._searchBoxTextChangedHandler=function(t){t.length>0?(this._searchBox.hidePlaceholderText(),this._autoCompleteCoordinator.search(t)):(this._searchBox.showPlaceholderText(),this._autoCompleteCoordinator.isSearchInProgress&&this._autoCompleteCoordinator.cancelSearch())},n.prototype._searchBoxTabbingAwayHandler=function(t,e){t?this._raiseTabbingAwayEvent(t,e):this._dialogButton.focus()},n.prototype._selectionDialogButtonClickHandler=function(){this._showSelectionDialog(this._selectionDialogRoute)},n.prototype._selectionDialogSave=function(t){if(this._chipList.insertMultiple(t.chipInformation),this._manageDirtyState(this._chipList.value)&&this._raiseDirtyStateChangeEvent(this._isDirty),this._dialogSelectionSavedHandlers.length>0){for(var e=[],n=0,i=t.chipInformation;n<i.length;n++){var o=i[n];e.push(o.itemValue)}this._raiseDialogSelectionSavedEvent(e)}},n.prototype._selectionDialogShowing=function(t){var e=this,n=autotask.find(t.dialogId),i=this._maximumSelectionCount-this._chipList.count;n.__configure((function(t){e._selectionDialogSave(t)}),i,this._maximumSelectionCountExceededMessage)},n.prototype._showMaximumSelectionCountExceededMessage=function(){var t=this;this._searchBox.isAlertDialogTriggeringEvent=!0,this._alertDialog.show(this._maximumSelectionCountExceededMessage,(function(){t._searchBox.focus(),t._searchBox.isAlertDialogTriggeringEvent=!1}))},n.prototype._showSelectionDialog=function(e){var n=this,i=new t.ApplyFiltersEventArgs;this._raiseApplyingSelectionDialogFilterEvent(i),e.__multipleSelectionDialog(i.data,(function(t){n._selectionDialogShowing(t)}))},n}(AutotaskEditorSystem.Editor);t.LargeMultipleTagSelector=e}(AutotaskLargeMultipleTagSelector||(AutotaskLargeMultipleTagSelector={})),function(t){var e=function(e){function n(t){var n=e.call(this,t,!1)||this,i=AutotaskDomSystem.Document.getElementById(t).firstElementChild;return n._contentElement=i.firstElementChild,n._loadingIndicatorElement=n._contentElement.firstElementChild,n._itemSetElement=n._contentElement.lastElementChild,n._defaultStyleCoordinator=new AutotaskOverlaySystem.DefaultStyleCoordinator(n._overlayElementStyleApplicator),n._itemClickDelegate=null,n._itemSet=null,n._overlayMouseDownDelegate=null,n._overlayMouseLeaveDelegate=null,n._contentElement.addEventListener("mousedown",(function(t){n._contentElementMouseDownListener(t)})),n._contentElement.addEventListener("mouseleave",(function(){n._contentElementMouseLeaveListener()})),n}return __extends(n,e),Object.defineProperty(n.prototype,"itemSet",{get:function(){return this._itemSet},enumerable:!1,configurable:!0}),n.prototype.applyItemListHtml=function(e){var n=this;this._contentElement.insertAdjacentHTML("beforeend",e),this._itemSetElement=this._contentElement.lastElementChild,null!==this._itemSet&&this._itemSet.dispose(),this._itemSet=new t.ItemSet(this._itemSetElement,(function(t){n._itemClickHandler(t)}))},n.prototype.clearItemSet=function(){this._contentElement.children.length>1&&null!==this._contentElement.lastChild&&this._contentElement.removeChild(this._contentElement.lastChild),null!==this._itemSet&&this._itemSet.dispose(),this._itemSet=null},n.prototype.hideLoadingIndicator=function(){this._loadingIndicatorElement.classList.remove("Active")},n.prototype.initialize=function(t,e,n){this._itemClickDelegate=t,this._overlayMouseDownDelegate=e,this._overlayMouseLeaveDelegate=n},n.prototype.show=function(t){this._contentElement.style.width=t.clientWidth.toString()+"px",this._show(t)},n.prototype.showLoadingIndicator=function(){this._loadingIndicatorElement.classList.add("Active")},Object.defineProperty(n.prototype,"_delayBeforeHiding",{get:function(){return 0},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"_delayBeforeShowing",{get:function(){return 0},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"_styleCoordinator",{get:function(){return this._defaultStyleCoordinator},enumerable:!1,configurable:!0}),n.prototype._createPositionCoordinator=function(t){var e=new AutotaskOverlaySystem.PositionCoordinator,n=new AutotaskPositionApplicatorSystem.Default(this._defaultStyleCoordinator,t,null,null);return e.addPositionAndApplicator(new AutotaskPositionSystem.BottomAlignedLeft(0,0),n),e.addPositionAndApplicator(new AutotaskPositionSystem.TopAlignedLeft(0,0),n),e},n.prototype._contentElementMouseDownListener=function(t){t.preventDefault(),null!==this._overlayMouseDownDelegate&&this._overlayMouseDownDelegate()},n.prototype._contentElementMouseLeaveListener=function(){null!==this._overlayMouseLeaveDelegate&&this._overlayMouseLeaveDelegate()},n.prototype._itemClickHandler=function(t){null!==this._itemClickDelegate&&this._itemClickDelegate(t)},n}(AutotaskOverlaySystem.ContextOverlay);t.Overlay=e}(AutotaskLargeMultipleTagSelector||(AutotaskLargeMultipleTagSelector={})),function(t){var e=function(){function t(t,e){var n=this;this._searchBoxElement=AutotaskDomSystem.Document.getElementById(t),this._placeholderElement=this._searchBoxElement.children[0],this._inputElement=this._searchBoxElement.children[1],this._inputElement.addEventListener("blur",(function(t){n._blurListener(t)})),this._inputElement.addEventListener("focus",(function(){n._focusListener()})),this._inputElement.addEventListener("input",(function(){n._inputListener()})),this._inputElement.addEventListener("keydown",(function(t){n._keyDownListener(t)})),this._inputElement.addEventListener("keyup",(function(t){n._keyUpListener(t)})),this._isEnabled=e,this._blurHandler=null,this._enterKeyHandler=null,this._escapeKeyHandler=null,this._isAlertDialogTriggeringEvent=!1,this._isBlurEnabled=!0,this._isFocused=!1,this._isTabKeyTrggeringBlur=!1,this._keyUpHandler=null,this._navigationKeyHandler=null,this._searchTextChangedHandler=null,this._tabbingAwayHandler=null}return Object.defineProperty(t.prototype,"isAlertDialogTriggeringEvent",{set:function(t){this._isAlertDialogTriggeringEvent=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isBlurEnabled",{get:function(){return this._isBlurEnabled},set:function(t){this._isBlurEnabled=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isEnabled",{get:function(){return this._isEnabled},set:function(t){this._isEnabled!==t&&(this._isEnabled=t,this._isEnabled?(this._inputElement.removeAttribute("disabled"),this._searchBoxElement.classList.remove("Disabled")):(this._inputElement.setAttribute("disabled","true"),this._searchBoxElement.classList.add("Disabled")))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"searchText",{get:function(){return this._inputElement.value},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tabbingAwayHandler",{set:function(t){this._tabbingAwayHandler=t},enumerable:!1,configurable:!0}),t.prototype.clearSearchText=function(){this._inputElement.value="",this.showPlaceholderText()},t.prototype.focus=function(){this._inputElement.focus(),this._isFocused=!0,this._searchBoxElement.classList.add("Focused")},t.prototype.hidePlaceholderText=function(){this._placeholderElement.classList.add("Inactive")},t.prototype.initialize=function(t,e,n,i,o,a){this._searchTextChangedHandler=t,this._enterKeyHandler=e,this._escapeKeyHandler=n,this._blurHandler=i,this._keyUpHandler=o,this._navigationKeyHandler=a},t.prototype.showPlaceholderText=function(){this._placeholderElement.classList.remove("Inactive")},t.prototype._blurListener=function(t){this._isBlurEnabled?this._isAlertDialogTriggeringEvent||(this._searchBoxElement.classList.remove("Focused"),null!==this._blurHandler&&this._blurHandler(this._isTabKeyTrggeringBlur)):(t.preventDefault(),this._inputElement.focus())},t.prototype._focusListener=function(){this._isAlertDialogTriggeringEvent||(this._isFocused=!0,this._searchBoxElement.classList.add("Focused"))},t.prototype._inputListener=function(){null!==this._searchTextChangedHandler&&this._searchTextChangedHandler(this._inputElement.value)},t.prototype._isLeftArrowNavigationAvailable=function(){var t=this._inputElement.selectionStart;return t===this._inputElement.selectionEnd&&0===t},t.prototype._isRightArrowNavigationAvailable=function(){var t=this._inputElement.selectionStart;return t===this._inputElement.selectionEnd&&t===this._inputElement.value.length},t.prototype._keyDownListener=function(t){if(AutotaskDomSystem.KeyCode.isTab(t.keyCode))this._isTabKeyTrggeringBlur=!0,this._raiseTabbingAwayEvent(t.shiftKey,(function(){t.preventDefault()}));else if(AutotaskDomSystem.KeyCode.isEnter(t.keyCode))null!==this._enterKeyHandler&&this._enterKeyHandler();else if(AutotaskDomSystem.KeyCode.isEscape(t.keyCode)){if(null!==this._escapeKeyHandler){this._escapeKeyHandler((function(){t.preventDefault()}),(function(){t.stopPropagation()}))}t.preventDefault()}else AutotaskDomSystem.KeyCode.isDown(t.keyCode)||AutotaskDomSystem.KeyCode.isUp(t.keyCode)?(t.preventDefault(),null!==this._navigationKeyHandler&&this._navigationKeyHandler(t.keyCode)):AutotaskDomSystem.KeyCode.isLeft(t.keyCode)?this._isLeftArrowNavigationAvailable()&&null!==this._navigationKeyHandler&&this._navigationKeyHandler(t.keyCode):AutotaskDomSystem.KeyCode.isRight(t.keyCode)&&this._isRightArrowNavigationAvailable()&&null!==this._navigationKeyHandler&&this._navigationKeyHandler(t.keyCode)},t.prototype._keyUpListener=function(t){null!==this._keyUpHandler&&this._keyUpHandler(t)},t.prototype._raiseTabbingAwayEvent=function(t,e){null!==this._tabbingAwayHandler&&this._tabbingAwayHandler(t,e)},t}();t.SearchBox=e}(AutotaskLargeMultipleTagSelector||(AutotaskLargeMultipleTagSelector={})),function(t){var e=function(){function t(t){this._value=t}return Object.defineProperty(t.prototype,"value",{get:function(){return this._value},enumerable:!1,configurable:!0}),t}();t.TagAddedEventArgs=e}(AutotaskLargeMultipleTagSelector||(AutotaskLargeMultipleTagSelector={})),function(t){var e=function(){function t(t){this._value=t}return Object.defineProperty(t.prototype,"value",{get:function(){return this._value},enumerable:!1,configurable:!0}),t}();t.TagClickedEventArgs=e}(AutotaskLargeMultipleTagSelector||(AutotaskLargeMultipleTagSelector={})),function(t){var e=function(){function t(t){this._value=t}return Object.defineProperty(t.prototype,"value",{get:function(){return this._value},enumerable:!1,configurable:!0}),t}();t.TagRemovedEventArgs=e}(AutotaskLargeMultipleTagSelector||(AutotaskLargeMultipleTagSelector={})),function(t){var e=function(){function t(t){this._editorInstance=t}return Object.defineProperty(t.prototype,"editorInstance",{get:function(){return this._editorInstance},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"instanceId",{get:function(){return this._editorInstance.id},enumerable:!1,configurable:!0}),t}();t.ChangeEventArgs=e}(AutotaskListBox||(AutotaskListBox={})),function(t){var e=function(){function t(t,e){this._editorInstance=t,this._optionValue=e}return Object.defineProperty(t.prototype,"editorInstance",{get:function(){return this._editorInstance},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"instanceId",{get:function(){return this._editorInstance.id},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"optionValue",{get:function(){return this._optionValue},enumerable:!1,configurable:!0}),t}();t.DoubleClickEventArgs=e}(AutotaskListBox||(AutotaskListBox={})),function(t){var e=function(){function t(t,e,n){this._editorInstance=t,this._previousValue=e,this._currentValue=n}return Object.defineProperty(t.prototype,"currentValue",{get:function(){return this._currentValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"editorInstance",{get:function(){return this._editorInstance},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"previousValue",{get:function(){return this._previousValue},enumerable:!1,configurable:!0}),t}();t.ImmediateChangeEventArgs=e}(AutotaskListBox||(AutotaskListBox={})),function(t){var e=function(e){function n(t,n,i,o,a){var r=e.call(this,t)||this;return r._selectElement=AutotaskDomSystem.Document.getElementById(t),r._selectElement.addEventListener("change",(function(){r._changeListener()})),r._selectElement.addEventListener("dblclick",(function(){r._doubleClickListener()})),r._selectElement.addEventListener("focus",(function(){r._focusListener()})),r._listBoxValidation=a,r._listBoxValidation.addRequiredStateChangedHandler((function(){r._validationRequiredStateChanged()})),r._listBoxValidation.addValidationCorrectedHandler((function(){r._validationCorrected()})),r._listBoxValidation.addValidationFailedHandler((function(){r._validationFailed()})),r._originalValue=r._createValue(),r._value=r._originalValue,r._isEnabled=n,r._changeHandlers=new Array,null!==i&&r._changeHandlers.push(i),r._arrayComparer=new AutotaskEditorSystem.ArrayComparer(null,null),r._bindingPropertyName=o,r._broadcastKeyUpHandlers=[],r._dirtyStateChangeHandlers=[],r._doubleClickHandlers=[],r._immediateChangeHandlers=[],r._tabbingAwayHandlers=[],r._invalidCssClass="Invalid",r._isDirty=!1,r._isValidationFrequencyElevated=!1,r._isValidationOverdue=!0,r._isValidationOverlayDismissed=!1,r}return __extends(n,e),Object.defineProperty(n.prototype,"availableValues",{get:function(){var t=null;if(this._selectElement.options.length>0){t=[];for(var e=0;e<this._selectElement.options.length;e++)t.push(this._selectElement.options[e].value)}return t},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isDirty",{get:function(){return this._isDirty},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isEnabled",{get:function(){return this._isEnabled},set:function(t){t!==this._isEnabled&&(this._isEnabled=t,this._selectElement.disabled=!t,t?this._isValidationFrequencyElevated&&this._validate(!1):(this._isValidationOverdue=!this._listBoxValidation.validationResult.isValid,this._listBoxValidation.resetValidationResult(this._selectElement)))},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"participantValidation",{get:function(){return this._listBoxValidation},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"value",{get:function(){return this._value},enumerable:!1,configurable:!0}),n.prototype.addBroadcastKeyUpHandler=function(t){var e=this;this._broadcastKeyUpHandlers.push(t),this._broadcastKeyUpHandlers.length&&this._selectElement.addEventListener("keyup",(function(t){e._keyUpListener(t)}))},n.prototype.addChangeHandler=function(t){this._changeHandlers.push(t)},n.prototype.addDirtyStateChangeHandler=function(t){this._dirtyStateChangeHandlers.push(t)},n.prototype.addDoubleClickHandler=function(t){this._doubleClickHandlers.push(t)},n.prototype.addImmediateChangeHandler=function(t){this._immediateChangeHandlers.push(t)},n.prototype.addOption=function(t,e,n){this._addOption(t,e,n),n&&(this._value=this._createValue(),this._manageDirtyState(this._value)&&this._raiseDirtyStateChangeEvent(this._isDirty),this._isValidationOverdue=!0,this._isValidationFrequencyElevated&&this._validate(!1))},n.prototype.addTabbingAwayHandler=function(t){var e=this;this._tabbingAwayHandlers.push(t),1===this._tabbingAwayHandlers.length&&this._selectElement.addEventListener("keydown",(function(t){e._keyDownListener(t)}))},n.prototype.clearValue=function(){this._clearValue(),this._value=null,this._manageDirtyState(this._value)&&this._raiseDirtyStateChangeEvent(this._isDirty),this._isValidationOverdue=!0,this._isValidationFrequencyElevated&&this._validate(!1)},n.prototype.createRequestData=function(){var t=null;if(null!==this._bindingPropertyName){t={};var e=null;this._isEnabled?e=null!==this._value?this._value.join(","):null:t[this._bindingPropertyName+"_IsDisabled"]=AutotaskRequestDataSystem.ValueSerializer.serializeBoolean(!0),t[this._bindingPropertyName]=e}return t},n.prototype.contains=function(t){return null!==this._findOptionElement(t)},n.prototype.focus=function(){this._selectElement.focus()},n.prototype.focusEnd=function(){this.focus()},n.prototype.focusStart=function(){this.focus()},n.prototype.isOptionLocked=function(t){var e=!1,n=this._findOptionElement(t);return null!==n?e=null!==n.getAttribute("data-visibility-locked"):autotask.throwException("ListBox.lockOption: there is no option for value "+t),e},n.prototype.lockOption=function(t){var e=this._findOptionElement(t);null!==e?e.setAttribute("data-visibility-locked","true"):autotask.throwException("ListBox.lockOption: there is no option for value "+t)},n.prototype.modifyText=function(t,e){var n=this._findOptionElement(t);null!==n?(n.text=e,n.title=e):autotask.throwException("ListBox.modifyText: there is no option for value "+t)},n.prototype.populate=function(t){this._populate(t),this._value=this._createValue(),this._manageDirtyState(this._value)&&this._raiseDirtyStateChangeEvent(this._isDirty),this._isValidationOverdue=!0,this._isValidationFrequencyElevated&&this._validate(!1)},n.prototype.removeAllOptions=function(){this._removeAllOptions(),this._value=null,this._manageDirtyState(this._value)&&this._raiseDirtyStateChangeEvent(this._isDirty),this._isValidationOverdue=!0,this._isValidationFrequencyElevated&&this._validate(!1)},n.prototype.removeFocus=function(){this._selectElement.blur()},n.prototype.removeOption=function(t){this._removeOption(t),this._value=this._createValue(),this._manageDirtyState(this._value)&&this._raiseDirtyStateChangeEvent(this._isDirty),this._isValidationOverdue=!0,this._isValidationFrequencyElevated&&this._validate(!1)},n.prototype.removeOptions=function(t){this._removeOptions(t),this._value=this._createValue(),this._manageDirtyState(this._value)&&this._raiseDirtyStateChangeEvent(this._isDirty),this._isValidationOverdue=!0,this._isValidationFrequencyElevated&&this._validate(!1)},n.prototype.resetValidation=function(){this._isValidationOverdue=!0},n.prototype.resetValue=function(){this._clearValue(),null!==this._originalValue&&this._selectOptions(this._originalValue),this._manageDirtyState(this._value)&&this._raiseDirtyStateChangeEvent(this._isDirty),this._isValidationOverdue=!0,this._validate(!1)},n.prototype.selectOption=function(t){this._selectOption(t),this._value=this._createValue(),this._manageDirtyState(this._value)&&this._raiseDirtyStateChangeEvent(this._isDirty),this._isValidationOverdue=!0,this._isValidationFrequencyElevated&&this._validate(!1)},n.prototype.selectOptions=function(t){this._selectOptions(t),this._value=this._createValue(),this._manageDirtyState(this._value)&&this._raiseDirtyStateChangeEvent(this._isDirty),this._isValidationOverdue=!0,this._isValidationFrequencyElevated&&this._validate(!1)},n.prototype.validate=function(){return this._validate(!1)},n.prototype.__initialize=function(){this._listBoxValidation.initialize()},n._createOptionElement=function(t,e,n){var i=document.createElement("option");return i.selected=n,i.text=e,i.title=e,i.value=t,i},n.prototype._addOption=function(t,e,i){var o=n._createOptionElement(t,e,i);this._selectElement.add(o)},n.prototype._changeListener=function(){var t=this._value,e=this._createValue();if(!this._arrayComparer.equals(e,t,!1)){this._value=e;var n=this._manageDirtyState(this._value);this._raiseImmediateChangeEvent(t,this._value),n&&this._raiseDirtyStateChangeEvent(this._isDirty),this._raiseChangeEvent(),this._isValidationOverdue=!0,this._validate(!0)}},n.prototype._clearValue=function(){for(var t=0,e=this._selectedOptions();t<e.length;t++){e[t].selected=!1}},n.prototype._createValue=function(){for(var t=[],e=0;e<this._selectElement.options.length;e++)this._selectElement.options[e].selected&&t.push(this._selectElement.options[e].value);return t.length>0?t:null},n.prototype._doubleClickListener=function(){null!==this._value&&this._value.length>0&&this._raiseDoubleClickEvent(this._value[0])},n.prototype._findOptionElement=function(t){for(var e=null,n=0;n<this._selectElement.options.length;n++)if(this._selectElement.options[n].value===t){e=this._selectElement.options[n];break}return e},n.prototype._findOptionIndex=function(t){for(var e=null,n=0;n<this._selectElement.options.length;n++)if(this._selectElement.options[n].value===t){e=n;break}return e},n.prototype._focusListener=function(){this._isValidationOverlayDismissed||!this._isValidationFrequencyElevated||this._listBoxValidation.validationResult.isValid||this._showValidationOverlay()},n.prototype._keyDownListener=function(t){AutotaskDomSystem.KeyCode.isTab(t.which)&&this._raiseTabbingAwayEvent(t.shiftKey,(function(){t.preventDefault()}))},n.prototype._keyUpListener=function(t){(AutotaskDomSystem.KeyCode.isEnter(t.which)||AutotaskDomSystem.KeyCode.isEscape(t.which))&&this._raiseBroadcastKeyUpEvent(t.which)},n.prototype._populate=function(t){this._removeAllOptions();for(var e=0,n=t;e<n.length;e++){var i=n[e];this._addOption(i.Value,i.Text,i.Selected)}},n.prototype._manageDirtyState=function(t){var e=!1;return this._isDirty&&!this._arrayComparer.equals(t,this._originalValue,!1)||(this._isDirty=!this._isDirty,e=!0),e},n.prototype._raiseChangeEvent=function(){if(this._changeHandlers.length>0)for(var e=new t.ChangeEventArgs(this),n=0,i=this._changeHandlers;n<i.length;n++){(0,i[n])(e)}},n.prototype._raiseBroadcastKeyUpEvent=function(t){if(this._broadcastKeyUpHandlers.length>0)for(var e=new AutotaskEditorSystem.BroadcastKeyUpEventArgs(this.id,t),n=0,i=this._broadcastKeyUpHandlers;n<i.length;n++){(0,i[n])(e)}},n.prototype._raiseDirtyStateChangeEvent=function(t){if(this._dirtyStateChangeHandlers.length>0)for(var e=new AutotaskDirtyStateSystem.DirtyStateChangeEventArgs(t),n=0,i=this._dirtyStateChangeHandlers;n<i.length;n++){(0,i[n])(e)}},n.prototype._raiseDoubleClickEvent=function(e){if(this._doubleClickHandlers.length>0)for(var n=new t.DoubleClickEventArgs(this,e),i=0,o=this._doubleClickHandlers;i<o.length;i++){(0,o[i])(n)}},n.prototype._raiseImmediateChangeEvent=function(e,n){if(this._immediateChangeHandlers.length>0)for(var i=new t.ImmediateChangeEventArgs(this,e,n),o=0,a=this._immediateChangeHandlers;o<a.length;o++){(0,a[o])(i)}},n.prototype._raiseTabbingAwayEvent=function(t,e){if(this._tabbingAwayHandlers.length>0)for(var n=new AutotaskEditorSystem.TabbingAwayEventArgs(this.id,t,e),i=0,o=this._tabbingAwayHandlers;i<o.length;i++){(0,o[i])(n)}},n.prototype._removeAllOptions=function(){for(var t=this._selectElement.options.length-1;t>=0;t--)this._selectElement.remove(t)},n.prototype._removeOption=function(t){var e=this._findOptionIndex(t);null!==e?this._selectElement.options.remove(e):autotask.throwException("ListBox.removeOption: there is no option for value "+t)},n.prototype._removeOptions=function(t){for(var e=this._selectElement.options.length-1;e>=0;e--)t.indexOf(this._selectElement.options[e].value)>=0&&this._selectElement.remove(e)},n.prototype._selectedOptions=function(){for(var t=[],e=0;e<this._selectElement.options.length;e++)this._selectElement.options[e].selected&&t.push(this._selectElement.options[e]);return t},n.prototype._selectOption=function(t){var e=this._findOptionElement(t);null!==e?e.selected=!0:autotask.throwException("ListBox.selectItem: there is no option for value "+t)},n.prototype._selectOptions=function(t){for(var e=0;e<this._selectElement.options.length;e++)t.indexOf(this._selectElement.options[e].value)>=0?this._selectElement.options[e].selected=!0:autotask.throwException("ListBox.selectItems: there is no option for value "+this._selectElement.options[e].value)},n.prototype._showValidationOverlay=function(){var t=this;autotask.globalValidationOverlay.show(this._selectElement,this.id,this._listBoxValidation.validationResult.message,!0,(function(){t._validationOverlayClosed()}),null)},n.prototype._validate=function(t){var e=this._listBoxValidation.validationResult.isValid;return this._isValidationOverdue&&this._isEnabled&&(e=this._listBoxValidation.validate(this._value,t,this._selectElement)),e?autotask.globalValidationOverlay.hide(this.id):this._showValidationOverlay(),e},n.prototype._validationCorrected=function(){this._selectElement.classList.remove(this._invalidCssClass)},n.prototype._validationFailed=function(){this._selectElement.classList.add(this._invalidCssClass),this._isValidationFrequencyElevated=!0},n.prototype._validationOverlayClosed=function(){this._isValidationOverlayDismissed=!0},n.prototype._validationRequiredStateChanged=function(){this.resetValidation(),this._isValidationFrequencyElevated&&this._validate(!0)},n}(AutotaskEditorSystem.Editor);t.ListBox=e}(AutotaskListBox||(AutotaskListBox={})),function(t){var e=function(t){function e(e,n,i){var o=t.call(this,e)||this;return o._requiredValidatorProvider=n,o._maximumCountValidator=i,o._requiredValidator=null,o}return __extends(e,t),Object.defineProperty(e.prototype,"_isRequired",{get:function(){return null!==this._requiredValidator},enumerable:!1,configurable:!0}),e.prototype.initialize=function(){var t=this;null!==this._requiredValidatorProvider&&(this._requiredValidatorProvider.initialize(),this._requiredValidatorProvider.addRequiredStateChangedHandler((function(){t._requiredStateChanged()})),this._requiredValidator=this._requiredValidatorProvider.createValidator())},e.prototype.resetValidationResult=function(t){this._updateValidationResult(new AutotaskEditorSystem.ValidResult,!1,t,!0)},e.prototype.validate=function(t,e,n){var i=new AutotaskEditorSystem.ValidResult;return null!==this._requiredValidator&&(i=this._requiredValidator.validate(t)),null!==this._maximumCountValidator&&(i=this._maximumCountValidator.validate(t)),this._updateValidationResult(i,e,n,!1),i.isValid},e.prototype._requiredStateChanged=function(){var t=this._requiredValidatorProvider;this._requiredValidator=t.createValidator(),this._raiseRequiredStateChanged()},e}(AutotaskEditorSystem.EditorValidation);t.ListBoxValidation=e}(AutotaskListBox||(AutotaskListBox={})),function(t){var e=function(){function t(t){this._editorInstance=t}return Object.defineProperty(t.prototype,"editorInstance",{get:function(){return this._editorInstance},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"instanceId",{get:function(){return this._editorInstance.id},enumerable:!1,configurable:!0}),t}();t.ChangeEventArgs=e}(AutotaskListMover||(AutotaskListMover={})),function(t){var e=function(){function t(t,e,n){this._editorInstance=t,this._previousValue=e,this._currentValue=n}return Object.defineProperty(t.prototype,"currentValue",{get:function(){return this._currentValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"editorInstance",{get:function(){return this._editorInstance},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"previousValue",{get:function(){return this._previousValue},enumerable:!1,configurable:!0}),t}();t.ImmediateChangeEventArgs=e}(AutotaskListMover||(AutotaskListMover={})),function(t){var e=function(e){function n(t,n,i,o,a,r,s,l,u,c,d){var h=e.call(this,t)||this;h._listMoverValidation=d,h._listMoverValidation.addRequiredStateChangedHandler((function(){h._validationRequiredStateChanged()})),h._listMoverValidation.addValidationCorrectedHandler((function(){h._validationCorrected()})),h._listMoverValidation.addValidationFailedHandler((function(){h._validationFailed()}));var _=AutotaskDomSystem.Document.getElementById(t),p=AutotaskDomSystem.Document.getChildElementByClassName(_,"Left");h._leftSelectElement=AutotaskDomSystem.Document.getFirstElementChild(p),h._leftSelectElement.addEventListener("dblclick",(function(){h._leftListDoubleClickListener()})),h._leftSelectElement.addEventListener("keyup",(function(t){h._leftListKeyUpListener(t)}));var m=AutotaskDomSystem.Document.getChildElementByClassName(_,"Right");return h._rightSelectElement=AutotaskDomSystem.Document.getFirstElementChild(m),h._rightSelectElement.addEventListener("dblclick",(function(){h._rightListDoubleClickListener()})),h._rightSelectElement.addEventListener("focus",(function(){h._focusListener()})),h._rightSelectElement.addEventListener("keyup",(function(t){h._rightListKeyUpListener(t)})),h._originalValue=h._createValue(),h._value=h._originalValue,h._isEnabled=r,h._changeHandlers=new Array,null!==u&&h._changeHandlers.push(u),h._moveRightButtonId=n,h._moveLeftButtonId=i,h._moveUpButtonId=o,h._moveDownButtonId=a,h._isReorderingEnabled=s,h._bindingPropertyName=c,h._arrayComparer=new AutotaskEditorSystem.ArrayComparer(null,null),h._dirtyStateChangeHandlers=[],h._immediateChangeHandlers=[],h._tabbingAwayHandlers=[],h._invalidCssClass="Invalid",h._isDirty=!1,h._isLeftListBoxInsertAplphbeticallyEnabled=l,h._isRightListBoxInsertAplphbeticallyEnabled=!h._isReorderingEnabled,h._moveLeftButton=null,h._moveRightButton=null,h._moveUpButton=null,h._moveDownButton=null,h._isValidationFrequencyElevated=!1,h._isValidationOverdue=!0,h._isValidationOverlayDismissed=!1,h}return __extends(n,e),Object.defineProperty(n.prototype,"isDirty",{get:function(){return this._isDirty},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isEnabled",{get:function(){return this._isEnabled},set:function(t){t!==this._isEnabled&&(this._isEnabled=t,this._applyEnabled(t),t?this._isValidationFrequencyElevated&&this._validate(!1):(this._isValidationOverdue=!this._listMoverValidation.validationResult.isValid,this._listMoverValidation.resetValidationResult(this._rightSelectElement)))},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"participantValidation",{get:function(){return this._listMoverValidation},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"textAndValues",{get:function(){return this._getTextAndValues()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"value",{get:function(){return this._value},enumerable:!1,configurable:!0}),n.prototype.addChangeHandler=function(t){this._changeHandlers.push(t)},n.prototype.addDirtyStateChangeHandler=function(t){this._dirtyStateChangeHandlers.push(t)},n.prototype.addImmediateChangeHandler=function(t){this._immediateChangeHandlers.push(t)},n.prototype.addOption=function(t,e){var i=n._findOptionIndex(this._leftSelectElement,t);null!==i&&this._leftSelectElement.remove(i),n._addOption(this._rightSelectElement,t,e,!1),this._value=this._createValue(),this._manageDirtyState(this._value)&&this._raiseDirtyStateChangeEvent(this._isDirty),this._isValidationOverdue=!0,this._isValidationFrequencyElevated&&this._validate(!1)},n.prototype.addTabbingAwayHandler=function(t){var e=this;this._tabbingAwayHandlers.push(t),1===this._tabbingAwayHandlers.length&&(this._leftSelectElement.addEventListener("keydown",(function(t){e._leftListKeyDownListener(t)})),this._rightSelectElement.addEventListener("keydown",(function(t){e._rightListKeyDownListener(t)})))},n.prototype.contains=function(t){return null!==n._findOptionElement(this._rightSelectElement,t)},n.prototype.createRequestData=function(){var t=null;if(null!==this._bindingPropertyName){t={};var e=null;this._isEnabled?e=null!==this._value?this._value.join(","):null:t[this._bindingPropertyName+"_IsDisabled"]=AutotaskRequestDataSystem.ValueSerializer.serializeBoolean(!0),t[this._bindingPropertyName]=e}return t},n.prototype.focus=function(){this._leftSelectElement.focus()},n.prototype.focusEnd=function(){this._rightSelectElement.focus()},n.prototype.focusStart=function(){this.focus()},n.prototype.isOptionLocked=function(t){var e=!1,i=n._findOptionElement(this._rightSelectElement,t);return null!==i?e=null!==i.getAttribute("data-visibility-locked"):autotask.throwException("ListBox.lockOption: there is no option for value "+t),e},n.prototype.lockOption=function(t){var e=n._findOptionElement(this._rightSelectElement,t);null!==e?e.setAttribute("data-visibility-locked","true"):autotask.throwException("ListBox.lockOption: there is no option for value "+t)},n.prototype.resetValidation=function(){this._isValidationOverdue=!0},n.prototype.unlockOption=function(t){var e=n._findOptionElement(this._rightSelectElement,t);null!==e?e.removeAttribute("data-visibility-locked"):autotask.throwException("ListBox.lockOption: there is no option for value "+t)},n.prototype.validate=function(){return this._validate(!1)},n.prototype.__initialize=function(){this._listMoverValidation.initialize(),this._moveLeftButton=autotask.find(this._moveLeftButtonId),this._moveRightButton=autotask.find(this._moveRightButtonId),null!==this._moveUpButtonId&&(this._moveUpButton=autotask.find(this._moveUpButtonId)),null!==this._moveDownButtonId&&(this._moveDownButton=autotask.find(this._moveDownButtonId)),this._registerEventHandlers()},n._addOption=function(t,e,i,o){var a=n._createOptionElement(e,i,o);t.add(a)},n._createOptionElement=function(t,e,n){var i=document.createElement("option");return i.selected=n,i.text=e,i.title=e,i.value=t,i},n._findOptionElement=function(t,e){for(var n=null,i=0;i<t.options.length;i++)if(t.options[i].value===e){n=t.options[i];break}return n},n._findOptionIndex=function(t,e){for(var n=null,i=0;i<t.options.length;i++)if(t.options[i].value===e){n=i;break}return n},n._insertOptionAlphabetically=function(t,e,i,o){for(var a=null,r=0;r<t.options.length;r++)if(t.options[r].text.toLowerCase()>i.toLowerCase()){a=t.options[r];break}null!==a?n._insertOptions(t,a,[n._createOptionElement(e,i,o)]):n._addOption(t,e,i,o)},n._insertOptions=function(t,e,n){for(var i=0,o=n;i<o.length;i++){var a=o[i];t.add(a,e)}},n._getSelectedOptions=function(t){for(var e=[],n=0;n<t.options.length;n++)t.options[n].selected&&e.push(t.options[n]);return e},n._getAllOptions=function(t){for(var e=[],n=0;n<t.options.length;n++)e.push(t.options[n]);return e},n._removeOptions=function(t,e){for(var n=t.options.length-1;n>=0;n--)e.indexOf(t.options[n].value)>=0&&t.remove(n)},n.prototype._applyEnabled=function(t){this._rightSelectElement.disabled=!t,this._leftSelectElement.disabled=!t,null!==this._moveLeftButton&&(this._moveLeftButton.isEnabled=t),null!==this._moveRightButton&&(this._moveRightButton.isEnabled=t),null!==this._moveUpButton&&(this._moveUpButton.isEnabled=t),null!==this._moveDownButton&&(this._moveDownButton.isEnabled=t)},n.prototype._createValue=function(){for(var t=[],e=0;e<this._rightSelectElement.options.length;e++)t.push(this._rightSelectElement.options[e].value);return t.length>0?t:null},n.prototype._focusListener=function(){this._isValidationOverlayDismissed||!this._isValidationFrequencyElevated||this._listMoverValidation.validationResult.isValid||this._showValidationOverlay()},n.prototype._getTextAndValues=function(){for(var t=[],e=0,i=n._getAllOptions(this._rightSelectElement);e<i.length;e++){var o=i[e];t.push({text:o.text,value:o.value})}return t},n.prototype._leftListKeyDownListener=function(t){AutotaskDomSystem.KeyCode.isTab(t.which)&&(t.shiftKey?this._raiseTabbingAwayEvent(t.shiftKey,(function(){t.preventDefault()})):this._rightSelectElement.focus())},n.prototype._leftListKeyUpListener=function(t){AutotaskDomSystem.KeyCode.isEnter(t.which)&&this._moveOptionsRight()},n.prototype._leftListDoubleClickListener=function(){this._moveOptionsRight()},n.prototype._manageDirtyState=function(t){var e=!1;return this._isDirty&&!this._arrayComparer.equals(t,this._originalValue,!0)||(this._isDirty=!this._isDirty,e=!0),e},n.prototype._moveDownButtonClickHandler=function(){this._moveSelectedOptionsDown()},n.prototype._moveLeftButtonClickHandler=function(){this._moveOptionsLeft()},n.prototype._moveOptionsLeft=function(){var t=n._getSelectedOptions(this._rightSelectElement);if(t.length>0){for(var e=[],i=[],o=0,a=t;o<a.length;o++){var r=a[o];null===r.getAttribute("data-visibility-locked")&&(e.push(r),i.push(r.value))}if(i.length>0){n._removeOptions(this._rightSelectElement,i);for(var s=0,l=e;s<l.length;s++){var u=l[s];this._isLeftListBoxInsertAplphbeticallyEnabled?n._insertOptionAlphabetically(this._leftSelectElement,u.value,u.text,!1):n._addOption(this._leftSelectElement,u.value,u.text,!1)}var c=this._value;this._value=this._createValue();var d=this._manageDirtyState(this._value);this._raiseImmediateChangeEvent(c,this._value),d&&this._raiseDirtyStateChangeEvent(this._isDirty),this._raiseChangeEvent(),this._isValidationOverdue=!0,this._validate(!0)}}},n.prototype._moveOptionsRight=function(){var t=n._getSelectedOptions(this._leftSelectElement);if(t.length>0){for(var e=[],i=0,o=t;i<o.length;i++){var a=o[i];e.push(a.value)}if(e.length>0){n._removeOptions(this._leftSelectElement,e);for(var r=0,s=t;r<s.length;r++){a=s[r];this._isRightListBoxInsertAplphbeticallyEnabled?n._insertOptionAlphabetically(this._rightSelectElement,a.value,a.text,!1):n._addOption(this._rightSelectElement,a.value,a.text,!1)}var l=this._value;this._value=this._createValue();var u=this._manageDirtyState(this._value);this._raiseImmediateChangeEvent(l,this._value),u&&this._raiseDirtyStateChangeEvent(this._isDirty),this._raiseChangeEvent(),this._isValidationOverdue=!0,this._validate(!0)}}},n.prototype._moveRightButtonClickHandler=function(){this._moveOptionsRight()},n.prototype._moveSelectedOptionsDown=function(){if(null!==this._value&&this._value.length>1){var t=n._getSelectedOptions(this._rightSelectElement);if(t.length>0){var e=t[t.length-1].nextElementSibling;if(null!==e)for(var i=t.length-1;i>=0;i--)e.insertAdjacentElement("afterend",t[i]);else for(i=0;i<t.length;i++)this._rightSelectElement.add(t[i]);var o=this._value;this._value=this._createValue();var a=this._manageDirtyState(this._value);this._raiseImmediateChangeEvent(o,this._value),a&&this._raiseDirtyStateChangeEvent(this._isDirty),this._raiseChangeEvent(),this._isValidationOverdue=!0,this._validate(!0)}}},n.prototype._moveSelectedOptionsUp=function(){if(null!==this._value&&this._value.length>1){var t=n._getSelectedOptions(this._rightSelectElement);if(t.length>0){var e=t[0].previousElementSibling;if(null!==e)for(var i=0;i<t.length;i++)e.insertAdjacentElement("beforebegin",t[i]);else for(i=t.length-1;i>=0;i--)this._rightSelectElement.add(t[i],0);var o=this._value;this._value=this._createValue();var a=this._manageDirtyState(this._value);this._raiseImmediateChangeEvent(o,this._value),a&&this._raiseDirtyStateChangeEvent(this._isDirty),this._raiseChangeEvent(),this._isValidationOverdue=!0,this._validate(!0)}}},n.prototype._moveUpButtonClickHandler=function(){this._moveSelectedOptionsUp()},n.prototype._raiseChangeEvent=function(){if(this._changeHandlers.length>0)for(var e=new t.ChangeEventArgs(this),n=0,i=this._changeHandlers;n<i.length;n++){(0,i[n])(e)}},n.prototype._raiseDirtyStateChangeEvent=function(t){if(this._dirtyStateChangeHandlers.length>0)for(var e=new AutotaskDirtyStateSystem.DirtyStateChangeEventArgs(t),n=0,i=this._dirtyStateChangeHandlers;n<i.length;n++){(0,i[n])(e)}},n.prototype._raiseImmediateChangeEvent=function(e,n){if(this._immediateChangeHandlers.length>0)for(var i=new t.ImmediateChangeEventArgs(this,e,n),o=0,a=this._immediateChangeHandlers;o<a.length;o++){(0,a[o])(i)}},n.prototype._raiseTabbingAwayEvent=function(t,e){if(this._tabbingAwayHandlers.length>0)for(var n=new AutotaskEditorSystem.TabbingAwayEventArgs(this.id,t,e),i=0,o=this._tabbingAwayHandlers;i<o.length;i++){(0,o[i])(n)}},n.prototype._registerEventHandlers=function(){var t=this;if(null!==this._moveLeftButton){var e=new AutotaskButtonSystem.ClickEventHandler((function(){t._moveLeftButtonClickHandler()}));this._moveLeftButton.addEventHandler(e)}if(null!==this._moveRightButton){var n=new AutotaskButtonSystem.ClickEventHandler((function(){t._moveRightButtonClickHandler()}));this._moveRightButton.addEventHandler(n)}if(null!==this._moveUpButton){var i=new AutotaskButtonSystem.ClickEventHandler((function(){t._moveUpButtonClickHandler()}));this._moveUpButton.addEventHandler(i)}if(null!==this._moveDownButton){var o=new AutotaskButtonSystem.ClickEventHandler((function(){t._moveDownButtonClickHandler()}));this._moveDownButton.addEventHandler(o)}},n.prototype._rightListKeyDownListener=function(t){AutotaskDomSystem.KeyCode.isTab(t.which)&&(t.shiftKey?this._leftSelectElement.focus():this._raiseTabbingAwayEvent(t.shiftKey,(function(){t.preventDefault()})))},n.prototype._rightListKeyUpListener=function(t){AutotaskDomSystem.KeyCode.isEnter(t.which)&&this._moveOptionsLeft()},n.prototype._rightListDoubleClickListener=function(){this._moveOptionsLeft()},n.prototype._showValidationOverlay=function(){var t=this;autotask.globalValidationOverlay.show(this._rightSelectElement,this.id,this._listMoverValidation.validationResult.message,!0,(function(){t._validationOverlayClosed()}),null)},n.prototype._validate=function(t){var e=this._listMoverValidation.validationResult.isValid;return this._isValidationOverdue&&this._isEnabled&&(e=this._listMoverValidation.validate(this._value,t,this._rightSelectElement)),e?autotask.globalValidationOverlay.hide(this.id):this._showValidationOverlay(),e},n.prototype._validationCorrected=function(){this._rightSelectElement.classList.remove(this._invalidCssClass)},n.prototype._validationFailed=function(){this._rightSelectElement.classList.add(this._invalidCssClass),this._isValidationFrequencyElevated=!0},n.prototype._validationOverlayClosed=function(){this._isValidationOverlayDismissed=!0},n.prototype._validationRequiredStateChanged=function(){this.resetValidation(),this._isValidationFrequencyElevated&&this._validate(!0)},n}(AutotaskEditorSystem.Editor);t.ListMover=e}(AutotaskListMover||(AutotaskListMover={})),function(t){var e=function(t){function e(e,n,i){var o=t.call(this,e)||this;return o._requiredValidatorProvider=n,o._maximumCountValidator=i,o._requiredValidator=null,o}return __extends(e,t),Object.defineProperty(e.prototype,"_isRequired",{get:function(){return null!==this._requiredValidator},enumerable:!1,configurable:!0}),e.prototype.initialize=function(){var t=this;null!==this._requiredValidatorProvider&&(this._requiredValidatorProvider.initialize(),this._requiredValidatorProvider.addRequiredStateChangedHandler((function(){t._requiredStateChanged()})),this._requiredValidator=this._requiredValidatorProvider.createValidator())},e.prototype.resetValidationResult=function(t){this._updateValidationResult(new AutotaskEditorSystem.ValidResult,!1,t,!0)},e.prototype.validate=function(t,e,n){var i=new AutotaskEditorSystem.ValidResult;return null!==this._requiredValidator&&(i=this._requiredValidator.validate(t)),null!==this._maximumCountValidator&&(i=this._maximumCountValidator.validate(t)),this._updateValidationResult(i,e,n,!1),i.isValid},e.prototype._requiredStateChanged=function(){var t=this._requiredValidatorProvider;this._requiredValidator=t.createValidator(),this._raiseRequiredStateChanged()},e}(AutotaskEditorSystem.EditorValidation);t.ListMoverValidation=e}(AutotaskListMover||(AutotaskListMover={})),function(t){var e=function(){function t(t){this._editorInstance=t}return Object.defineProperty(t.prototype,"editorInstance",{get:function(){return this._editorInstance},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"instanceId",{get:function(){return this._editorInstance.id},enumerable:!1,configurable:!0}),t}();t.ChangeEventArgs=e}(AutotaskMinutesBox||(AutotaskMinutesBox={})),function(t){var e=function(){function t(t,e,n){this._editorInstance=t,this._previousValue=e,this._currentValue=n}return Object.defineProperty(t.prototype,"currentValue",{get:function(){return this._currentValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"editorInstance",{get:function(){return this._editorInstance},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"previousValue",{get:function(){return this._previousValue},enumerable:!1,configurable:!0}),t}();t.ImmediateChangeEventArgs=e}(AutotaskMinutesBox||(AutotaskMinutesBox={})),function(t){var e=function(e){function n(t,n,i,o,a,r,s,l,u,c,d,h){var _=e.call(this,t)||this,p=AutotaskDomSystem.Document.getElementById(t);return _._polarityButtonElement=p.children[0],_._polarityButtonElement.addEventListener("blur",(function(t){_._blurListener(t)})),_._polarityButtonElement.addEventListener("click",(function(){_._buttonClickListener()})),_._polarityButtonElement.addEventListener("mouseenter",(function(){_._buttonMouseEnterListener()})),_._polarityButtonElement.addEventListener("mouseleave",(function(){_._buttonMouseLeaveListener()})),_._polarityButtonElement.addEventListener("keydown",(function(t){_._buttonKeyDownListener(t)})),_._polarityButtonElement.addEventListener("keyup",(function(t){_._buttonKeyUpListener(t)})),_._isPolarityButtonActive=!_._polarityButtonElement.classList.contains("Hidden"),_._hoursElement=p.children[1],_._hoursElement.addEventListener("blur",(function(t){_._blurListener(t)})),_._hoursElement.addEventListener("change",(function(){_._hoursChangeListener()})),_._hoursElement.addEventListener("focus",(function(){_._hoursFocusListener()})),_._hoursElement.addEventListener("input",(function(){_._hoursInputListener()})),_._hoursElement.addEventListener("keydown",(function(t){_._hoursKeyDownListener(t)})),_._hoursElement.addEventListener("keyup",(function(t){_._hoursKeyUpListener(t)})),_._minutesElement=p.children[3],_._minutesElement.addEventListener("blur",(function(t){_._blurListener(t)})),_._minutesElement.addEventListener("change",(function(){_._minutesChangeListener()})),_._minutesElement.addEventListener("focus",(function(){_._minutesFocusListener()})),_._minutesElement.addEventListener("input",(function(){_._minutesInputListener()})),_._minutesElement.addEventListener("keydown",(function(t){_._minutesKeyDownListener(t)})),_._minutesElement.addEventListener("keyup",(function(t){_._minutesKeyUpListener(t)})),_._originalValue=n,_._value=_._originalValue,_._intervalSize=i,_._maximumMinutes=o,_._minimumMinutes=a,_._areNegativeValuesAllowed=null===a||a<0,_._isDefaultPolarityPositive=r,_._isFormatValid=!0,_._isEnabled=s,_._hoursElement.disabled=!s,_._minutesElement.disabled=!s,_._changeHandlers=[],null!==l&&_._changeHandlers.push(l),_._immediateChangeHandlers=[],null!==u&&_._immediateChangeHandlers.push(u),_._bindingPropertyName=c,_._isRequestDataProvidedWhenDisabled=d,_._validation=h,_._validation.addRequiredStateChangedHandler((function(){_._validationRequiredStateChanged()})),_._validation.addValidationCorrectedHandler((function(){_._validationCorrected()})),_._validation.addValidationFailedHandler((function(){_._validationFailed()})),_._blurHandlers=[],_._dirtyStateChangeHandlers=[],_._tabbingAwayHandlers=[],_._hoverCssClass="HoverState",_._invalidCssClass="Invalid",_._plusSymbol="+",_._minusSymbol="−",_._isDirty=!1,_._isValidationFrequencyElevated=!1,_._isValidationOverdue=!0,_._isValidationOverlayDismissed=!1,_._changeTrackingValue=null,_._isValueNegative=!1,_}return __extends(n,e),Object.defineProperty(n.prototype,"isEnabled",{get:function(){return this._isEnabled},set:function(t){t!==this._isEnabled&&(this._isEnabled=t,this._hoursElement.disabled=!t,this._minutesElement.disabled=!t,this._polarityButtonElement.classList.toggle("DisabledState"),t||this._isRequestDataProvidedWhenDisabled?this._isValidationFrequencyElevated&&this._validate(!1):(this._isValidationOverdue=!this._validation.validationResult.isValid,this._validation.resetValidationResult(this._hoursElement)))},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isDirty",{get:function(){return this._isDirty},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"participantValidation",{get:function(){return this._validation},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"value",{get:function(){return this._value},set:function(t){this._isFormatValid=null===t||!isNaN(t)&&(this._areNegativeValuesAllowed||t>=0);var e=t;null!==t&&this._isFormatValid?(this._isValueNegative=t<0||0===t&&!this._isDefaultPolarityPositive,e=this._calculateNextBestInterval(t,0)):this._isValueNegative=!this._isDefaultPolarityPositive,e!==this._value&&(this._value=e,this._manageDirtyState(this._value)&&this._raiseDirtyStateChangeEvent(this._isDirty),this._isValidationOverdue=!0,this._isValidationFrequencyElevated&&this._validate(!1),this._applyValueChange(),null===this.value&&(this._hoursElement.value="",this._minutesElement.value=""))},enumerable:!1,configurable:!0}),n.prototype.addBlurHandler=function(t){this._blurHandlers.push(t)},n.prototype.addChangeHandler=function(t){this._changeHandlers.push(t)},n.prototype.addDirtyStateChangeHandler=function(t){this._dirtyStateChangeHandlers.push(t)},n.prototype.addImmediateChangeHandler=function(t){this._immediateChangeHandlers.push(t)},n.prototype.addTabbingAwayHandler=function(t){this._tabbingAwayHandlers.push(t)},n.prototype.clearValue=function(){this.value=null},n.prototype.createRequestData=function(){var t=null;if(null!==this._bindingPropertyName){var e=null;null!==this._value&&(this._isRequestDataProvidedWhenDisabled||this._isEnabled)&&(e=window.autotask.convert.integerToStringWithoutGroupSeparator(this._value)),(t={})[this._bindingPropertyName]=e}return t},n.prototype.focus=function(){this._hoursElement.focus()},n.prototype.focusEnd=function(){this._minutesElement.focus()},n.prototype.focusStart=function(){this._isPolarityButtonActive?this._polarityButtonElement.focus():this._hoursElement.focus()},n.prototype.removeFocus=function(){this._hoursElement.blur(),this._minutesElement.blur()},n.prototype.resetValidation=function(){this._isValidationOverdue=!0},n.prototype.resetValue=function(){this.value=this._originalValue},n.prototype.validate=function(){return this._validate(!1)},n.prototype.__initialize=function(){this._validation.initialize(),null===this._value||0===this._value?this._isValueNegative=this._areNegativeValuesAllowed&&!this._isDefaultPolarityPositive:this._isValueNegative=this._value<0,this._applyValueChange()},n.prototype._applyFocus=function(){this._isValidationOverlayDismissed||!this._isValidationFrequencyElevated||this._validation.validationResult.isValid||this._showValidationOverlay()},n.prototype._applyInputChange=function(t){var e=this._value;this._value=t;var n=this._manageDirtyState(this._value);this._raiseImmediateChangeEvent(e,this._value),n&&this._raiseDirtyStateChangeEvent(this._isDirty),this._isValidationOverdue=!0,this._isValidationFrequencyElevated&&this._validate(!0)},n.prototype._applyKeyDown=function(t){(AutotaskDomSystem.KeyCode.isUp(t.which)||AutotaskDomSystem.KeyCode.isDown(t.which))&&t.preventDefault()},n.prototype._applyKeyUp=function(t,e,n){AutotaskDomSystem.KeyCode.isUp(t.which)?(t.preventDefault(),this._applyMinutesFromKeyUp(e),n.select()):AutotaskDomSystem.KeyCode.isDown(t.which)&&(t.preventDefault(),this._applyMinutesFromKeyUp(-1*e),n.select())},n.prototype._applyMinutesFromKeyUp=function(t){null===this._value&&(this._value=0),this._applyInputChange(this._calculateNextBestInterval(this._value,t)),this._applyValueChange()},n.prototype._applyPolarityToggle=function(){if(this._isEnabled){var t=this._value;null!==this._value&&(this._isValueNegative=!this._isValueNegative,this._value*=-1,this._raiseImmediateChangeEvent(t,this._value),this._raiseChangeEvent()),this._applyValueChange()}},n.prototype._applyValidFormatHoursInputChange=function(t,e){if(t.hasValue||e.hasValue){var i=0;t.hasValue?(i=t.value*n._minutesInHour)%n._minutesInHour==0&&e.hasValue&&(i+=e.value):i=e.value,this._isValueNegative&&(i*=-1),null!==this._value&&this._value===i||this._applyInputChange(i)}else null!==this._value&&this._applyInputChange(null)},n.prototype._applyValidFormatMinutesInputChange=function(t,e){if(t.hasValue||e.hasValue){var i=0;e.hasValue?(i=e.value)<n._minutesInHour&&t.hasValue&&(i+=t.value*n._minutesInHour):i=t.value*n._minutesInHour,this._isValueNegative&&(i*=-1),null!==this._value&&this._value===i||this._applyInputChange(i)}else null!==this._value&&this._applyInputChange(null)},n.prototype._applyValueChange=function(){(null!==this._value&&(this._hoursElement.value=window.autotask.convert.integerToStringWithoutGroupSeparator(Math.floor(Math.abs(this._value)/n._minutesInHour)),this._minutesElement.value=window.autotask.convert.integerToStringWithoutGroupSeparator(Math.abs(this._value)%n._minutesInHour)),this._areNegativeValuesAllowed)&&(this._polarityButtonElement.childNodes[0].innerText=this._isValueNegative?this._minusSymbol:this._plusSymbol)},n.prototype._blurListener=function(t){var e=t.relatedTarget===this._hoursElement||t.relatedTarget===this._minutesElement,n=!e&&t.relatedTarget!==this._polarityButtonElement;e||(this._applyValueChange(),this._changeTrackingValue!==this._value&&this._raiseChangeEvent()),n&&this._raiseBlurEvent()},n.prototype._buttonClickListener=function(){this._applyPolarityToggle()},n.prototype._buttonKeyDownListener=function(t){AutotaskDomSystem.KeyCode.isTab(t.which)&&(t.shiftKey?this._raiseTabbingAwayEvent(t.shiftKey,(function(){t.preventDefault()})):(this._hoursElement.focus(),t.preventDefault()))},n.prototype._buttonKeyUpListener=function(t){AutotaskDomSystem.KeyCode.isEnter(t.which)&&this._applyPolarityToggle()},n.prototype._buttonMouseEnterListener=function(){this._polarityButtonElement.classList.add(this._hoverCssClass)},n.prototype._buttonMouseLeaveListener=function(){this._polarityButtonElement.classList.remove(this._hoverCssClass)},n.prototype._calculateNextBestInterval=function(t,e){var n=Math.abs(t)+e;n<0&&(n=0);var i=this._intervalSize*Math.ceil(n/this._intervalSize);return this._isValueNegative&&(i*=-1),null!==this._minimumMinutes&&i<this._minimumMinutes?i=this._minimumMinutes:null!==this._maximumMinutes&&i>this._maximumMinutes&&(i=this._maximumMinutes),i},n.prototype._hoursChangeListener=function(){var e=new t.ValueInformation(this._hoursElement.value),n=new t.ValueInformation(this._minutesElement.value);this._isFormatValid=e.isFormatValid&&n.isFormatValid,this._validate(!0)&&!e.isEmpty&&this._applyValueChange()},n.prototype._hoursFocusListener=function(){this._changeTrackingValue=this._value,this._hoursElement.select(),this._applyFocus()},n.prototype._hoursInputListener=function(){this._isValidationOverdue=!0;var e=new t.ValueInformation(this._hoursElement.value),n=new t.ValueInformation(this._minutesElement.value);this._isFormatValid=e.isFormatValid&&n.isFormatValid,this._isFormatValid?this._applyValidFormatHoursInputChange(e,n):(this._value=null,this._validate(!0))},n.prototype._hoursKeyDownListener=function(t){AutotaskDomSystem.KeyCode.isTab(t.which)?t.shiftKey?this._isPolarityButtonActive?(this._polarityButtonElement.focus(),t.preventDefault()):this._raiseTabbingAwayEvent(t.shiftKey,(function(){t.preventDefault()})):(this._minutesElement.focus(),t.preventDefault()):this._applyKeyDown(t)},n.prototype._hoursKeyUpListener=function(t){this._applyKeyUp(t,n._minutesInHour,this._hoursElement)},n.prototype._minutesChangeListener=function(){var e=new t.ValueInformation(this._hoursElement.value),n=new t.ValueInformation(this._minutesElement.value);this._isValidationOverdue=!0,this._isFormatValid=e.isFormatValid&&n.isFormatValid,this._isFormatValid&&!n.isEmpty&&(null===this._value&&(this._value=0),this._value=this._calculateNextBestInterval(this._value,0),this._applyValueChange()),this._validate(!0)},n.prototype._minutesFocusListener=function(){this._changeTrackingValue=this._value,this._minutesElement.select(),this._applyFocus()},n.prototype._minutesInputListener=function(){this._isValidationOverdue=!0;var e=new t.ValueInformation(this._hoursElement.value),n=new t.ValueInformation(this._minutesElement.value);this._isFormatValid=e.isFormatValid&&n.isFormatValid,this._isFormatValid?this._applyValidFormatMinutesInputChange(e,n):(this._value=null,this._validate(!0))},n.prototype._minutesKeyDownListener=function(t){AutotaskDomSystem.KeyCode.isTab(t.which)?t.shiftKey?(this._hoursElement.focus(),t.preventDefault()):this._raiseTabbingAwayEvent(t.shiftKey,(function(){t.preventDefault()})):this._applyKeyDown(t)},n.prototype._minutesKeyUpListener=function(t){this._applyKeyUp(t,this._intervalSize,this._minutesElement)},n.prototype._manageDirtyState=function(t){var e=!1;return this._isDirty&&t!==this._originalValue||(this._isDirty=!this._isDirty,e=!0),e},n.prototype._raiseBlurEvent=function(){for(var t=0,e=this._blurHandlers;t<e.length;t++){(0,e[t])()}},n.prototype._raiseChangeEvent=function(){if(this._changeHandlers.length>0)for(var e=new t.ChangeEventArgs(this),n=0,i=this._changeHandlers;n<i.length;n++){(0,i[n])(e)}},n.prototype._raiseDirtyStateChangeEvent=function(t){if(this._dirtyStateChangeHandlers.length>0)for(var e=new AutotaskDirtyStateSystem.DirtyStateChangeEventArgs(t),n=0,i=this._dirtyStateChangeHandlers;n<i.length;n++){(0,i[n])(e)}},n.prototype._raiseImmediateChangeEvent=function(e,n){if(this._immediateChangeHandlers.length>0)for(var i=new t.ImmediateChangeEventArgs(this,e,n),o=0,a=this._immediateChangeHandlers;o<a.length;o++){(0,a[o])(i)}},n.prototype._raiseTabbingAwayEvent=function(t,e){if(this._tabbingAwayHandlers.length>0)for(var n=new AutotaskEditorSystem.TabbingAwayEventArgs(this.id,t,e),i=0,o=this._tabbingAwayHandlers;i<o.length;i++){(0,o[i])(n)}},n.prototype._showValidationOverlay=function(){var t=this;autotask.globalValidationOverlay.show(this._hoursElement,this.id,this._validation.validationResult.message,!0,(function(){t._validationOverlayClosed()}),null)},n.prototype._validate=function(t){var e=this._validation.validationResult.isValid;return this._isValidationOverdue&&(this._isRequestDataProvidedWhenDisabled||this._isEnabled)&&(e=this._validation.validate(this._value,this._isFormatValid,t,this._hoursElement),this._isValidationOverdue=!1),e?autotask.globalValidationOverlay.hide(this.id):this._showValidationOverlay(),e},n.prototype._validationCorrected=function(){this._hoursElement.classList.remove(this._invalidCssClass),this._minutesElement.classList.remove(this._invalidCssClass)},n.prototype._validationFailed=function(){this._hoursElement.classList.add(this._invalidCssClass),this._minutesElement.classList.add(this._invalidCssClass),this._isValidationFrequencyElevated=!0},n.prototype._validationOverlayClosed=function(){this._isValidationOverlayDismissed=!0},n.prototype._validationRequiredStateChanged=function(){this.resetValidation(),this._isValidationFrequencyElevated&&this._validate(!0)},n._minutesInHour=60,n}(AutotaskEditorSystem.Editor);t.MinutesBox=e}(AutotaskMinutesBox||(AutotaskMinutesBox={})),function(t){var e=function(t){function e(e,n,i,o){var a=t.call(this,e)||this;return a._invalidNumberMessage=n,a._requiredValidatorProvider=i,a._requiredValidator=null,a._rangeValidator=o,a}return __extends(e,t),Object.defineProperty(e.prototype,"_isRequired",{get:function(){return null!==this._requiredValidator},enumerable:!1,configurable:!0}),e.prototype.initialize=function(){var t=this;null!==this._requiredValidatorProvider&&(this._requiredValidatorProvider.initialize(),this._requiredValidatorProvider.addRequiredStateChangedHandler((function(){t._requiredStateChanged()})),this._requiredValidator=this._requiredValidatorProvider.createValidator())},e.prototype.resetValidationResult=function(t){this._updateValidationResult(new AutotaskEditorSystem.ValidResult,!1,t,!0)},e.prototype.validate=function(t,e,n,i){var o=new AutotaskEditorSystem.ValidResult;return e||(o=new AutotaskEditorSystem.InvalidResult(this._invalidNumberMessage,null)),o.isValid&&null!==this._requiredValidator&&(o=this._requiredValidator.validate(t)),o.isValid&&null!==this._rangeValidator&&(o=this._rangeValidator.validate(t)),this._updateValidationResult(o,n,i,!0),o.isValid},e.prototype._requiredStateChanged=function(){var t=this._requiredValidatorProvider;this._requiredValidator=t.createValidator(),this._raiseRequiredStateChanged()},e}(AutotaskEditorSystem.EditorValidation);t.MinutesBoxValidation=e}(AutotaskMinutesBox||(AutotaskMinutesBox={})),function(t){var e=function(){function t(t){this._value=0,0===t.length?(this._hasValue=!1,this._isFormatValid=!0):(this._value=window.autotask.convert.stringToDecimal(t,4),this._isFormatValid=!isNaN(this._value)&&this._value>=0,this._isFormatValid?this._hasValue=!0:(this._hasValue=!1,this._value=0))}return Object.defineProperty(t.prototype,"hasValue",{get:function(){return this._hasValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isEmpty",{get:function(){return this._isFormatValid&&!this._hasValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isFormatValid",{get:function(){return this._isFormatValid},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return this._value},enumerable:!1,configurable:!0}),t}();t.ValueInformation=e}(AutotaskMinutesBox||(AutotaskMinutesBox={})),function(t){var e=function(){function t(t,e,n,i){var o=this;this._autoCompleteRoute=e,this._overlay=t,this._overlayLaunchingElement=n,this._applyFiltersHandler=i,this._ajaxRequestCanceler=null,this._timeoutDuration=300,this._timeoutId=null,this._overlay.addHideCompletedHandler((function(){o._overlayHideCompletedHandler()}))}return Object.defineProperty(t.prototype,"isOverlayVisible",{get:function(){return this._overlay.isVisible},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isSearchInProgress",{get:function(){return null!==this._ajaxRequestCanceler},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"itemSet",{get:function(){return this._overlay.itemSet},enumerable:!1,configurable:!0}),t.prototype.autoComplete=function(t,e){var n=this;this._cancelTimer(),this._startTimer((function(){null!==n._timeoutId&&(n._timeoutId=null,n._cancelAutoCompleteRequest(),n._overlay.show(n._overlayLaunchingElement),n._overlay.clearItemSet(),n._overlay.showLoadingIndicator(),n._autoComplete(t,e))}))},t.prototype.cancelAutoComplete=function(){this._cancelTimer(),this._cancelAutoCompleteRequest()},t.prototype.hideOverlay=function(){this._hideOverlay()},t.prototype.setItemClickHandler=function(t){this._overlay.setItemClickHandler(t)},t.prototype.setOverlayHideCompletedHandler=function(t){this._overlay.setHideCompletedHandler(t)},t.prototype.setOverlayMouseDownHandler=function(t){this._overlay.setMouseDownHandler(t)},t.prototype.setOverlayMouseLeaveHandler=function(t){this._overlay.setMouseDownHandler(t)},t.prototype.showOverlay=function(){this._overlay.show(this._overlayLaunchingElement)},t.prototype._autoComplete=function(t,e){var n=this,i=new AutotaskDataSelector.ApplyFiltersEventArgs,o=this._autoCompleteRoute.get_searchCriteriaParameterName();i.addString(o,t),this._applyFiltersHandler(i);this._ajaxRequestCanceler=this._autoCompleteRoute.autoComplete(i.data,(function(i,o){n._autoCompleteSuccessHandler(i,o,t,e)}))},t.prototype._autoCompleteSuccessHandler=function(t,e,n,i){if(this._ajaxRequestCanceler=null,this._overlay.isVisible)if(null!==t&&null!==e){if(this._overlay.hideLoadingIndicator(),this._overlay.applyItemSetHtml(t,e),null!==this._overlay.itemSet){for(var o=0,a=i;o<a.length;o++){var r=a[o];this._overlay.itemSet.selectItemByValue(r)}this._overlay.itemSet.search(n)}}else this._hideOverlay()},t.prototype._cancelAutoCompleteRequest=function(){null!==this._ajaxRequestCanceler&&(this._ajaxRequestCanceler.__cancelRequest(),this._ajaxRequestCanceler=null)},t.prototype._cancelTimer=function(){null!==this._timeoutId&&(window.clearTimeout(this._timeoutId),this._timeoutId=null)},t.prototype._hideOverlay=function(){this._overlay.hide()},t.prototype._overlayHideCompletedHandler=function(){this._cancelAutoCompleteRequest(),this._cancelTimer(),null!==this._overlay.itemSet&&this._overlay.clearItemSet()},t.prototype._startTimer=function(t){this._timeoutId=window.setTimeout(t,this._timeoutDuration)},t}();t.AutoCompleteCoordinator=e}(AutotaskMultipleDataSelector||(AutotaskMultipleDataSelector={})),function(t){var e=function(e){function n(t){var i=e.call(this,t,!1)||this,o=AutotaskDomSystem.Document.getElementById(t).firstElementChild;return i._contentElement=o.firstElementChild,i._loadingIndicatorElement=i._contentElement.firstElementChild,i._contentElement.style.minHeight=n._defaultContentMinHeight.toString()+"px",i._contentElement.style.maxHeight=n._contentMaxHeight.toString()+"px",i._defaultStyleCoordinator=new AutotaskOverlaySystem.DefaultStyleCoordinator(i._overlayElementStyleApplicator),i._itemClickHandler=null,i._itemSet=null,i._mouseDownHandler=null,i._mouseLeaveHandler=null,i._scrollCoordinator=new AutotaskEditorSystem.ItemOverlayScrollCoordinator(i),i._contentElement.addEventListener("mousedown",(function(t){i._mouseDownListener(t)})),i._contentElement.addEventListener("mouseleave",(function(){i._mouseLeaveListener()})),i._contentElement.addEventListener("wheel",(function(t){i._mouseWheelListener(t)})),i._launchingElementHeight=null,i}return __extends(n,e),Object.defineProperty(n.prototype,"contentHeight",{get:function(){return this._contentElement.clientHeight},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"contentScrollTop",{get:function(){return this._contentElement.scrollTop},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"itemSet",{get:function(){return this._itemSet},enumerable:!1,configurable:!0}),n.prototype.applyItemSetHtml=function(t,e){if(this.clearItemSet(),null!==t&&null!==e){this._contentElement.insertAdjacentHTML("beforeend",t);var n=AutotaskDomSystem.Document.getChildElementByClassName(this._contentElement,"ItemSet");this._intitalizeItemSet(n,e)}this.__reposition()},n.prototype.applySize=function(t){this._contentElement.style.minHeight=t.minimumHeightValue.toString()+"px",this._contentElement.style.maxHeight=(t.maximumHeightValue-6).toString()+"px",this._contentElement.style.minWidth=t.minimumWidthValue.toString()+"px",this._contentElement.style.maxWidth=t.maximumWidthValue.toString()+"px"},n.prototype.clearItemSet=function(){null!==this._itemSet&&(null!==this._contentElement.lastChild&&this._contentElement.removeChild(this._contentElement.lastChild),this._itemSet.dispose(),this._itemSet=null)},n.prototype.hideLoadingIndicator=function(){this._loadingIndicatorElement.classList.remove("Active")},n.prototype.scrollContent=function(t){this._contentElement.scrollTop=t},n.prototype.setHideCompletedHandler=function(t){this.addHideCompletedHandler(t)},n.prototype.setItemClickHandler=function(t){this._itemClickHandler=t},n.prototype.setMouseDownHandler=function(t){this._mouseDownHandler=t},n.prototype.setMouseLeaveHandler=function(t){this._mouseLeaveHandler=t},n.prototype.show=function(t){this.showLoadingIndicator(),this._clearSizeStyles(),this._launchingElementHeight=t.clientHeight,this._show(t)},n.prototype.showLoadingIndicator=function(){this._loadingIndicatorElement.classList.add("Active")},Object.defineProperty(n.prototype,"_delayBeforeHiding",{get:function(){return 0},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"_delayBeforeShowing",{get:function(){return 0},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"_styleCoordinator",{get:function(){return this._defaultStyleCoordinator},enumerable:!1,configurable:!0}),n.prototype._createPositionCoordinator=function(t){var e=this._calculateMinimumHeight(),i=n._contentMaxHeight,o=new AutotaskEditorSystem.DropDownOverlayPositionCoordinator(e,i,this),a=new AutotaskPositionApplicatorSystem.Default(this._defaultStyleCoordinator,t,null,null),r=-1*(this._launchingElementHeight-31);o.addPositionAndApplicator(new AutotaskEditorSystem.DropDownOverlayBottomAlignedLeftPosition(0,r),a);var s=new AutotaskPositionApplicatorSystem.Default(this._defaultStyleCoordinator,t,null,"Top");return o.addPositionAndApplicator(new AutotaskEditorSystem.DropDownOverlayTopAlignedLeftPosition(0,1),s),o},n.prototype._calculateMinimumHeight=function(){var t=n._defaultContentMinHeight;if(null!==this._itemSet){var e=this._itemSet.itemCount;e>0&&e<6&&(t=this._itemSet.itemCount*this._itemSet.itemDisplayHeight)}return t},n.prototype._clearSizeStyles=function(){this._contentElement.style.minHeight="",this._contentElement.style.maxHeight="",this._contentElement.style.minWidth="",this._contentElement.style.maxWidth=""},n.prototype._intitalizeItemSet=function(e,n){var i=this;this._itemSet=new t.ItemSet(e,n,this._scrollCoordinator),this._itemSet.targetFirstItem(),this._itemSet.setItemClickHandler((function(t){i._itemSetItemClickHandler(t)}))},n.prototype._itemSetItemClickHandler=function(t){null!==this._itemClickHandler&&this._itemClickHandler(t)},n.prototype._mouseDownListener=function(t){t.preventDefault(),null!==this._mouseDownHandler&&this._mouseDownHandler()},n.prototype._mouseLeaveListener=function(){null!==this._mouseLeaveHandler&&this._mouseLeaveHandler()},n.prototype._mouseWheelListener=function(t){var e=this._contentElement.scrollTop,n=this._contentElement.scrollHeight,i=this._contentElement.clientHeight;!1===(t.deltaY<0?e>0:e+i<n)&&t.preventDefault()},n._contentMaxHeight=364,n._defaultContentMinHeight=106,n}(AutotaskOverlaySystem.ContextOverlay);t.AutoCompleteOverlay=e}(AutotaskMultipleDataSelector||(AutotaskMultipleDataSelector={})),function(t){var e=function(){function t(t){this._editorInstance=t}return Object.defineProperty(t.prototype,"editorInstance",{get:function(){return this._editorInstance},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"instanceId",{get:function(){return this._editorInstance.id},enumerable:!1,configurable:!0}),t}();t.ChangeEventArgs=e}(AutotaskMultipleDataSelector||(AutotaskMultipleDataSelector={})),function(t){var e=function(t){function e(e,n,i,o){var a=t.call(this,e,n,i,o)||this;return a._chipInformation=i,a._contextOverlayRoute=null,a}return __extends(e,t),Object.defineProperty(e.prototype,"chipInformation",{get:function(){return AutotaskEditorSystem.ArrayCopier.copy(this._chipInformation,(function(t){return t.copy()}))},set:function(t){this._clear();for(var e=0,n=t;e<n.length;e++){var i=n[e];this.insert(i.copy())}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"count",{get:function(){return this._chipInformation.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return this.values},enumerable:!1,configurable:!0}),e.prototype.enableContextOverlay=function(t){this._contextOverlayRoute=t,this._enableContextOverlay()},e.prototype.getChipInformationByValue=function(t){for(var e=null,n=0,i=this._chipInformation;n<i.length;n++){var o=i[n];if(AutotaskItemSelectionSystem.ItemValueComparer.equals(t,o.value)){e=o.copy();break}}return e},e.prototype.insert=function(t){var e=t.copy();this._insert(e),this._chipInformation.push(e)},e.prototype._clear=function(){t.prototype._clear.call(this),this._chipInformation.splice(0)},e.prototype._determineContextOverlayRoute=function(t){return null===this._contextOverlayRoute?autotask.throwException("The context overlay route is null."):this._contextOverlayRoute},e.prototype._removeByIndex=function(e){t.prototype._removeByIndex.call(this,e),this._chipInformation.splice(e,1)},e}(AutotaskEditorSystem.ChipList);t.ChipList=e}(AutotaskMultipleDataSelector||(AutotaskMultipleDataSelector={})),function(t){var e=function(){function t(t){this._chipInformation=t}return Object.defineProperty(t.prototype,"chipInformation",{get:function(){return this._chipInformation},enumerable:!1,configurable:!0}),t}();t.DialogSelectedEventArgs=e}(AutotaskMultipleDataSelector||(AutotaskMultipleDataSelector={})),function(t){var e=function(){function t(t,e){this._overlay=t,this._overlayLaunchingElement=e}return Object.defineProperty(t.prototype,"isOverlayVisible",{get:function(){return this._overlay.isVisible},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"itemSet",{get:function(){return this._overlay.itemSet},enumerable:!1,configurable:!0}),t.prototype.applyItemSetHtml=function(t,e){this._overlay.applyItemSetHtml(t,e)},t.prototype.clearItemSet=function(){this._overlay.clearItemSet()},t.prototype.hideOverlay=function(){this._overlay.hide()},t.prototype.setItemClickHandler=function(t){this._overlay.setItemClickHandler(t)},t.prototype.setOverlayHideCompletedHandler=function(t){this._overlay.setHideCompletedHandler(t)},t.prototype.setOverlayMouseDownHandler=function(t){this._overlay.setMouseDownHandler(t)},t.prototype.setOverlayMouseLeaveHandler=function(t){this._overlay.setMouseDownHandler(t)},t.prototype.showOverlay=function(){this._overlay.show(this._overlayLaunchingElement)},t}();t.DropDownCoordinator=e}(AutotaskMultipleDataSelector||(AutotaskMultipleDataSelector={})),function(t){var e=function(e){function n(t,n){var i=e.call(this,t,!1)||this,o=AutotaskDomSystem.Document.getElementById(t).firstElementChild;return i._contentElement=o.firstElementChild,i._defaultStyleCoordinator=new AutotaskOverlaySystem.DefaultStyleCoordinator(i._overlayElementStyleApplicator),i._itemSet=null,i._itemClickHandler=null,i._mouseDownHandler=null,i._mouseLeaveHandler=null,i._scrollCoordinator=new AutotaskEditorSystem.ItemOverlayScrollCoordinator(i),i._contentElement.addEventListener("mousedown",(function(t){i._mouseDownListener(t)})),i._contentElement.addEventListener("mouseleave",(function(){i._mouseLeaveListener()})),i._contentElement.addEventListener("wheel",(function(t){i._mouseWheelListener(t)})),i._itemSet=null,null!==i._contentElement.firstElementChild&&null!==n&&i._intitalizeItemSet(i._contentElement.firstElementChild,n),i._launchingElementHeight=null,i}return __extends(n,e),Object.defineProperty(n.prototype,"contentHeight",{get:function(){return this._contentElement.clientHeight},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"contentScrollTop",{get:function(){return this._contentElement.scrollTop},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"itemSet",{get:function(){return this._itemSet},enumerable:!1,configurable:!0}),n.prototype.applyItemSetHtml=function(t,e){if(this.clearItemSet(),null!==t&&null!==e){this._contentElement.insertAdjacentHTML("beforeend",t);var n=AutotaskDomSystem.Document.getChildElementByClassName(this._contentElement,"ItemSet");this._intitalizeItemSet(n,e)}},n.prototype.applySize=function(t){this._contentElement.style.minHeight=t.minimumHeightValue.toString()+"px",this._contentElement.style.maxHeight=(t.maximumHeightValue-6).toString()+"px",this._contentElement.style.minWidth=t.minimumWidthValue.toString()+"px",this._contentElement.style.maxWidth=t.maximumWidthValue.toString()+"px"},n.prototype.clearItemSet=function(){if(null!==this._itemSet){var t=this._contentElement.getElementsByClassName("ItemSet");t.length>0&&(this._contentElement.removeChild(t[0]),this._itemSet.dispose(),this._itemSet=null)}},n.prototype.scrollContent=function(t){this._contentElement.scrollTop=t},n.prototype.setHideCompletedHandler=function(t){this.addHideCompletedHandler(t)},n.prototype.setItemClickHandler=function(t){this._itemClickHandler=t},n.prototype.setMouseDownHandler=function(t){this._mouseDownHandler=t},n.prototype.setMouseLeaveHandler=function(t){this._mouseLeaveHandler=t},n.prototype.show=function(t){this._clearSizeStyles(),this._launchingElementHeight=t.clientHeight,this._show(t)},Object.defineProperty(n.prototype,"_delayBeforeHiding",{get:function(){return 0},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"_delayBeforeShowing",{get:function(){return 0},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"_styleCoordinator",{get:function(){return this._defaultStyleCoordinator},enumerable:!1,configurable:!0}),n.prototype._createPositionCoordinator=function(t){var e=this._calculateMinimumHeight(),i=n._contentMaxHeight,o=new AutotaskEditorSystem.DropDownOverlayPositionCoordinator(e,i,this),a=new AutotaskPositionApplicatorSystem.Default(this._defaultStyleCoordinator,t,null,null),r=-1*(this._launchingElementHeight-31);o.addPositionAndApplicator(new AutotaskEditorSystem.DropDownOverlayBottomAlignedLeftPosition(0,r),a);var s=new AutotaskPositionApplicatorSystem.Default(this._defaultStyleCoordinator,t,null,"Top");return o.addPositionAndApplicator(new AutotaskEditorSystem.DropDownOverlayTopAlignedLeftPosition(0,1),s),o},n.prototype._calculateMinimumHeight=function(){var t=n._defaultContentMinHeight;if(null!==this._itemSet){var e=this._itemSet.itemCount;e>0&&e<6&&(t=this._itemSet.itemCount*this._itemSet.itemDisplayHeight)}return t},n.prototype._clearSizeStyles=function(){this._contentElement.style.minHeight="",this._contentElement.style.maxHeight="",this._contentElement.style.minWidth="",this._contentElement.style.maxWidth=""},n.prototype._intitalizeItemSet=function(e,n){var i=this;this._itemSet=new t.ItemSet(e,n,this._scrollCoordinator),this._itemSet.targetFirstItem(),this._itemSet.setItemClickHandler((function(t){i._itemSetItemClickHandler(t)}))},n.prototype._itemSetItemClickHandler=function(t){null!==this._itemClickHandler&&this._itemClickHandler(t)},n.prototype._mouseDownListener=function(t){t.preventDefault(),null!==this._mouseDownHandler&&this._mouseDownHandler()},n.prototype._mouseLeaveListener=function(){null!==this._mouseLeaveHandler&&this._mouseLeaveHandler()},n.prototype._mouseWheelListener=function(t){var e=this._contentElement.scrollTop,n=this._contentElement.scrollHeight,i=this._contentElement.clientHeight;!1===(t.deltaY<0?e>0:e+i<n)&&t.preventDefault()},n._contentMaxHeight=364,n._defaultContentMinHeight=106,n}(AutotaskOverlaySystem.ContextOverlay);t.DropDownOverlay=e}(AutotaskMultipleDataSelector||(AutotaskMultipleDataSelector={})),function(t){var e=function(){function t(t,e,n){this._editorInstance=t,this._previousValue=e,this._currentValue=n}return Object.defineProperty(t.prototype,"currentValue",{get:function(){return new AutotaskItemSelectionSystem.ItemValueCollection(this._currentValue)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"editorInstance",{get:function(){return this._editorInstance},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"previousValue",{get:function(){return new AutotaskItemSelectionSystem.ItemValueCollection(this._previousValue)},enumerable:!1,configurable:!0}),t}();t.ImmediateChangeEventArgs=e}(AutotaskMultipleDataSelector||(AutotaskMultipleDataSelector={})),function(t){var e=function(){function e(e,n,i){var o=this;this._itemListElement=e,this._items=this._createItems(e,n),this._targetCoordinator=new AutotaskDataSelector.ItemListTargetCoordinator(this._items,i),this._searchCoordinator=new AutotaskDataSelector.ItemListSearchCoordinator(this._items),this._selectionCoordinator=new t.ItemListSelectionCoordinator(this._items),this._itemClickDelegate=null,this._isMouseOverTargetingEnabled=!0,this._mouseMoveDelegate=function(t){o._itemListMouseMoveListener(t)},this._mouseMoveInitialPositionX=null,this._mouseMoveInitialPositionY=null}return Object.defineProperty(e.prototype,"isTargetedItemSelected",{get:function(){var t=this._targetCoordinator.targetedItemIndex,e=!1;return null!==t&&(e=this._selectionCoordinator.isItemSelected(t)),e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"itemCount",{get:function(){return this._items.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"itemDisplayHeight",{get:function(){return this._items[0].displayHeight},enumerable:!1,configurable:!0}),e.prototype.containsItem=function(t){for(var e=!1,n=0,i=this._items;n<i.length;n++){var o=i[n];if(AutotaskItemSelectionSystem.ItemValueComparer.equals(o.value,t)){e=!0;break}}return e},e.prototype.createChipInformationForTargetedItem=function(){var t=null;return null!==this._targetCoordinator.targetedItemIndex&&(t=this._items[this._targetCoordinator.targetedItemIndex].chipInformation),t},e.prototype.dispose=function(){for(var t=0,e=this._items;t<e.length;t++){e[t].dispose()}this._items.length=0},e.prototype.enableMouseOverTargeting=function(){this._isMouseOverTargetingEnabled||this._enableMouseOverTargeting()},e.prototype.getTargetedItemValue=function(){var t=null,e=this._targetCoordinator.targetedItem;return null!==e&&(t=e.value),t},e.prototype.moveTargetDown=function(){this._isMouseOverTargetingEnabled&&this._disableMouseOverTargeting(),this._targetCoordinator.moveTargetDown()},e.prototype.moveTargetUp=function(){this._isMouseOverTargetingEnabled&&this._disableMouseOverTargeting(),this._targetCoordinator.moveTargetUp()},e.prototype.search=function(t){return this._searchCoordinator.search(t)},e.prototype.selectItemByIndex=function(t){this._selectionCoordinator.selectItemByIndex(t)},e.prototype.selectItemByValue=function(t){this._selectionCoordinator.selectItemByValue(t)},e.prototype.selectTargetedItem=function(){var t=this._targetCoordinator.targetedItemIndex;null!==t&&this._selectionCoordinator.selectItemByIndex(t)},e.prototype.setItemClickHandler=function(t){this._itemClickDelegate=t},e.prototype.targetFirstItem=function(){this._targetCoordinator.targetFirstItem()},e.prototype.unselectAllItems=function(){this._selectionCoordinator.unselectAllItems()},e.prototype.unselectItemByIndex=function(t){this._selectionCoordinator.unselectItemByIndex(t)},e.prototype.unselectItemByValue=function(t){this._selectionCoordinator.unselectItemByValue(t)},e.prototype.unselectTargetedItem=function(){var t=this._targetCoordinator.targetedItemIndex;null!==t&&this._selectionCoordinator.unselectItemByIndex(t)},e.prototype._createItems=function(t,e){for(var n=this,i=[],o=t.firstElementChild,a=0;null!==o;){var r=e[a];if(null!==r){var s=r.create(o,(function(t){n._itemClickHandler(t)}),(function(t){n._itemMouseOverHandler(t)}));i.push(s)}a++,o=o.nextElementSibling}return i},e.prototype._enableMouseOverTargeting=function(){this._isMouseOverTargetingEnabled=!0,this._itemListElement.removeEventListener("mousemove",this._mouseMoveDelegate)},e.prototype._disableMouseOverTargeting=function(){this._mouseMoveInitialPositionX=null,this._mouseMoveInitialPositionY=null,this._isMouseOverTargetingEnabled=!1,this._itemListElement.addEventListener("mousemove",this._mouseMoveDelegate)},e.prototype._findItemElement=function(t){var e=null;if(t.classList.contains("Item"))e=t;else for(var n=t.parentElement;null!==n;){if(n.classList.contains("Item")){e=n;break}n=n.parentElement}return e},e.prototype._itemClickHandler=function(t){null!==this._itemClickDelegate&&this._itemClickDelegate(t,this._items[t],this._items[t].chipInformation)},e.prototype._itemListMouseMoveListener=function(t){if(null===this._mouseMoveInitialPositionX&&null===this._mouseMoveInitialPositionY)this._mouseMoveInitialPositionX=t.clientX,this._mouseMoveInitialPositionY=t.clientY;else if(null!==this._mouseMoveInitialPositionX&&null!==this._mouseMoveInitialPositionY&&(this._mouseMoveInitialPositionX-t.clientX!=0||this._mouseMoveInitialPositionY-t.clientY!=0)){this._enableMouseOverTargeting();var e=this._findItemElement(t.srcElement);if(null!==e){var n=parseInt(e.dataset.index,0);this._targetCoordinator.targetItemByIndex(n)}}},e.prototype._itemMouseOverHandler=function(t){this._isMouseOverTargetingEnabled&&this._targetCoordinator.targetItemByIndex(t)},e}();t.ItemList=e}(AutotaskMultipleDataSelector||(AutotaskMultipleDataSelector={})),function(t){var e=function(){function t(t){this._items=t,this._selectedItemIndexes=[]}return t.prototype.isItemSelected=function(t){for(var e=!1,n=0,i=this._selectedItemIndexes;n<i.length;n++){if(i[n]===t){e=!0;break}}return e},t.prototype.selectItemByIndex=function(t){this.isItemSelected(t)||(this._items[t].select(),this._selectedItemIndexes.push(t))},t.prototype.selectItemByValue=function(t){for(var e=0;e<this._items.length;e++){var n=this._items[e];if(AutotaskItemSelectionSystem.ItemValueComparer.equals(n.value,t)){this.selectItemByIndex(e);break}}},t.prototype.unselectAllItems=function(){for(var t=0,e=this._items;t<e.length;t++){e[t].unselect()}this._selectedItemIndexes=[]},t.prototype.unselectItemByIndex=function(t){for(var e=0;e<this._selectedItemIndexes.length;e++)if(t===this._selectedItemIndexes[e]){this._items[t].unselect(),this._selectedItemIndexes.splice(e,1);break}},t.prototype.unselectItemByValue=function(t){for(var e=0;e<this._items.length;e++){var n=this._items[e];if(AutotaskItemSelectionSystem.ItemValueComparer.equals(n.value,t)){this.unselectItemByIndex(e);break}}},t}();t.ItemListSelectionCoordinator=e}(AutotaskMultipleDataSelector||(AutotaskMultipleDataSelector={})),function(t){var e=function(){function e(e,n,i){var o=this,a=e.firstElementChild;this._itemList=new t.ItemList(a,n,i),this._itemList.setItemClickHandler((function(t,e,n){o._itemClick(t,e,n)})),this._itemClickDelegate=null}return Object.defineProperty(e.prototype,"isTargetedItemSelected",{get:function(){return this._itemList.isTargetedItemSelected},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"itemCount",{get:function(){return this._itemList.itemCount},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"itemDisplayHeight",{get:function(){return this._itemList.itemDisplayHeight},enumerable:!1,configurable:!0}),e.prototype.containsItem=function(t){return this._itemList.containsItem(t)},e.prototype.createChipInformationForTargetedItem=function(){return this._itemList.createChipInformationForTargetedItem()},e.prototype.dispose=function(){this._itemList.dispose()},e.prototype.enableMouseOverTargeting=function(){this._itemList.enableMouseOverTargeting()},e.prototype.getTargetedItemValue=function(){return this._itemList.getTargetedItemValue()},e.prototype.moveTargetDown=function(){this._itemList.moveTargetDown()},e.prototype.moveTargetUp=function(){this._itemList.moveTargetUp()},e.prototype.search=function(t){return this._itemList.search(t)},e.prototype.selectItemByValue=function(t){this._itemList.selectItemByValue(t)},e.prototype.selectTargetedItem=function(){this._itemList.selectTargetedItem()},e.prototype.setItemClickHandler=function(t){this._itemClickDelegate=t},e.prototype.targetFirstItem=function(){this._itemList.targetFirstItem()},e.prototype.unselectAllItems=function(){this._itemList.unselectAllItems()},e.prototype.unselectItemByValue=function(t){this._itemList.unselectItemByValue(t)},e.prototype.unselectTargetedItem=function(){this._itemList.unselectTargetedItem()},e.prototype._itemClick=function(t,e,n){var i=this;if(null!==this._itemClickDelegate){var o=new AutotaskDataSelector.ItemClickEventArgs(e,n,(function(){i._itemList.selectItemByIndex(t)}),(function(){i._itemList.unselectItemByIndex(t)}));this._itemClickDelegate(o)}},e}();t.ItemSet=e}(AutotaskMultipleDataSelector||(AutotaskMultipleDataSelector={})),function(t){var e=function(t){function e(e,n,i,o,a,r,s){var l=t.call(this,e,i,o)||this;return l._backingEditorId=n,l._buttonId=a,l._dialogRoute=r,l._populateRoute=s,l._backingMultipleDataSelectorEditor=void 0,l._button=null,l._tabbingAwayHandlers=[],l}return __extends(e,t),Object.defineProperty(e.prototype,"isDirty",{get:function(){return this._backingEditor.isDirty},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isEnabled",{get:function(){return this._backingEditor.isEnabled},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"participantValidation",{get:function(){return this._backingEditor.participantValidation},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_backingEditor",{get:function(){return void 0===this._backingMultipleDataSelectorEditor?autotask.throwException("_backingMultipleDataSelectorEditor is undefined."):this._backingMultipleDataSelectorEditor},enumerable:!1,configurable:!0}),e.prototype.addTabbingAwayHandler=function(t){this._tabbingAwayHandlers.push(t)},e.prototype.createRequestData=function(){return this._createRequestData(this._backingEditor,"8",!this._backingEditor.isEnabled&&!this._backingEditor.isBrowseOnly)},e.prototype.focus=function(){this._backingEditor.focus()},e.prototype.focusEnd=function(){null!==this._button&&this._button.isEnabled?this._button.focusEnd():this._backingEditor.focusEnd()},e.prototype.focusStart=function(){this._backingEditor.focusStart()},e.prototype.resetValidation=function(){this._backingEditor.resetValidation()},e.prototype.validate=function(){return this._backingEditor.validate()},e.prototype.__initialize=function(){var t=this;this._backingMultipleDataSelectorEditor=autotask.find(this._backingEditorId),this._backingMultipleDataSelectorEditor.addTabbingAwayHandler((function(e){t._dataSelectorTabbingAwayHandler(e)})),null!==this._buttonId&&(this._button=autotask.find(this._buttonId),this._button.addEventHandler(new AutotaskButtonSystem.ClickEventHandler((function(){t._buttonClickEventHandler()}))),this._button.addTabbingAwayHandler((function(e){t._buttonTabbingAwayHandler(e)})))},e.prototype._buttonClickEventHandler=function(){var t=this;null!==this._dialogRoute&&this._dialogRoute.makeRequest((function(e){t._dialogRouteSuccessHandler(e)}))},e.prototype._buttonTabbingAwayHandler=function(t){t.isShiftKeyPressed?this._backingEditor.focusEnd():this._raiseTabbingAwayEvent(t.isShiftKeyPressed,(function(){t.cancel()}))},e.prototype._dataSelectorTabbingAwayHandler=function(t){!t.isShiftKeyPressed&&null!==this._button&&this._button.isEnabled?this._button.focusStart():this._raiseTabbingAwayEvent(t.isShiftKeyPressed,(function(){t.cancel()}))},e.prototype._dialogRouteSuccessHandler=function(t){var e=this,n=autotask.find(t);n.configure((function(t){e._dialogSaveHandler(t,n)}))},e.prototype._dialogSaveHandler=function(t,e){var n=this,i=this._populateRoute,o=new AutotaskRequestDataSystem.RequestData;o.addFieldData(i.get_modelParameterName(),t),this._backingEditor.populate(i,o.__data,(function(t){n._populateSuccessHandler(t,e)}))},e.prototype._populateSuccessHandler=function(t,e){null!==t.data.errorMessage?e.showErrorMessage(t.data.errorMessage):e.hide(),this._button.isEnabled=t.data.isButtonEnabled},e.prototype._raiseTabbingAwayEvent=function(t,e){for(var n=new AutotaskEditorSystem.TabbingAwayEventArgs(this.id,t,e),i=0,o=this._tabbingAwayHandlers;i<o.length;i++){(0,o[i])(n)}},e}(AutotaskEditorSystem.UserDefinedField);t.ListValueUserDefinedField=e}(AutotaskMultipleDataSelector||(AutotaskMultipleDataSelector={})),function(t){var e=function(t){function e(e,n){var i=t.call(this,e)||this;return i._chipInformation=n,i}return __extends(e,t),Object.defineProperty(e.prototype,"chipInformation",{get:function(){return this._chipInformation},enumerable:!1,configurable:!0}),e}(Autotask.LifecycleObject);t.MultipleDataSelection=e}(AutotaskMultipleDataSelector||(AutotaskMultipleDataSelector={})),function(t){var e=function(e){function n(n,i,o,a,r,s,l,u,c,d,h,_,p,m,f,y,g,v,b,E,S,k){var C=e.call(this,n)||this;C._editorElement=AutotaskDomSystem.Document.getElementById(n);var A=C._editorElement;C._isEnabled=i,C._isLocked=o,C._isBrowseOnly=a,C._bindingPropertyName=l,C._searchBox=u,C._chipList=c,C._dialogButtonId=m,C._dialogCoordinator=f,C._selectedValuesParameterName=y,C._maximumSelectionCount=g,C._maximumSelectionCountExceededMessage=v,C._selectionButtonId=b,C._selectionButtonHandler=E,C._multipleDataSelectorValidation=k,C._applyFiltersHandlers=[],C._broadcastKeyUpHandlers=[],C._changeHandlers=[],C._dialogButton=null,C._dirtyStateChangeHandlers=[],C._immediateChangeHandlers=[],C._invalidCssClass="Invalid",C._isDirty=!1,C._isValidationFrequencyElevated=!1,C._isValidationOverdue=!0,C._isValidationOverlayDismissed=!1,C._originalValue=C._copyValue(C._chipList.value),C._selectionButton=null,C._tabbedAwayHandlers=[],C._tabbingAwayHandlers=[],C._value=C._copyValue(C._originalValue),C._valueWhenFocused=[];if(C._arrayComparer=new AutotaskEditorSystem.ArrayComparer((function(t,e){return AutotaskItemSelectionSystem.ItemValueComparer.equals(t,e)}),AutotaskItemSelectionSystem.ItemValueSorter.compare),C._dropDownCoordinator=new t.DropDownCoordinator(h,A),null!==C._dropDownCoordinator.itemSet)for(var D=0,I=C._value;D<I.length;D++){var w=I[D];C._dropDownCoordinator.itemSet.selectItemByValue(w)}return C._autoCompleteCoordinator=new t.AutoCompleteCoordinator(_,p,A,(function(t){return C._applyFiltersHandler(t)})),C._chipListContextOverlayRoute=d,null!==C._chipListContextOverlayRoute&&c.enableContextOverlay(C._chipListContextOverlayRoute),C._userInteractionCoordinator=new t.UserInteractionCoordinator(u,c,C._dropDownCoordinator,C._autoCompleteCoordinator,(function(t){C._valueChangedHandler(t)}),(function(){C._focusHandler()}),(function(){C._focusLostHandler()}),(function(){C._openDialog()}),S,C._maximumSelectionCount,C._maximumSelectionCountExceededMessage,C._isBrowseOnly),C._multipleDataSelectorValidation.addValidationCorrectedHandler((function(){C._validationCorrected()})),C._multipleDataSelectorValidation.addValidationFailedHandler((function(){C._validationFailed()})),C._chipList.addAllowedConcurrentlyVisibleOverlay(h),C._chipList.addAllowedConcurrentlyVisibleOverlay(_),null!==r&&C._changeHandlers.push(r),null!==s&&C._immediateChangeHandlers.push(s),C}return __extends(n,e),Object.defineProperty(n.prototype,"isBrowseOnly",{get:function(){return this._isBrowseOnly},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isDirty",{get:function(){return this._isDirty},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isEnabled",{get:function(){return this._isEnabled},set:function(t){t!==this._isEnabled&&(this._isEnabled=t,this._searchBox.isEnabled=t,this._chipList.isEnabled=t,this._dialogButton.isEnabled=t,t?(this._editorElement.classList.remove("Disabled"),this._isValidationFrequencyElevated&&this._validate(!1)):(this._editorElement.classList.add("Disabled"),this._isValidationOverdue=!this._multipleDataSelectorValidation.validationResult.isValid,this._multipleDataSelectorValidation.resetValidationResult(this._editorElement)))},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isLocked",{get:function(){return this._isLocked},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"participantValidation",{get:function(){return this._multipleDataSelectorValidation},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"value",{get:function(){return new AutotaskItemSelectionSystem.ItemValueCollection(this._value)},enumerable:!1,configurable:!0}),n.prototype.add=function(t){this._add([t]),this._value=this._copyValue(this._chipList.value),this._manageDirtyState(this._value)&&this._raiseDirtyStateChangeEvent(this._isDirty),this._isValidationOverdue=!0,this._isValidationFrequencyElevated&&this._validate(!1)},n.prototype.addApplyFiltersHandler=function(t){this._applyFiltersHandlers.push(t)},n.prototype.addBroadcastKeyUpHandler=function(t){var e=this;this._broadcastKeyUpHandlers.push(t),this._searchBox.broadcastKeyUpHandler=function(t){e._broadcastKeyUpHandler(t)}},n.prototype.addChangeHandler=function(t){this._changeHandlers.push(t)},n.prototype.addDirtyStateChangeHandler=function(t){this._dirtyStateChangeHandlers.push(t)},n.prototype.addImmediateChangeHandler=function(t){this._immediateChangeHandlers.push(t)},n.prototype.addTabbedAwayHandler=function(t){var e=this;this._tabbedAwayHandlers.push(t),this._searchBox.tabbedAwayHandler=function(t){e._tabbedAwayHandler(t)}},n.prototype.addTabbingAwayHandler=function(t){var e=this;this._tabbingAwayHandlers.push(t),this._searchBox.tabbingAwayHandler=function(t,n){e._searchBoxTabbingAwayHandler(t,n)},this._dialogButton.addTabbingAwayHandler((function(t){e._dialogButtonTabbingAwayHandler(t)})),null!==this._selectionButton&&this._selectionButton.addTabbingAwayHandler((function(t){e._selectionButtonTabbingAwayHandler(t)}))},n.prototype.addMultiple=function(t){this._add(t),this._value=this._copyValue(this._chipList.value),this._manageDirtyState(this._value)&&this._raiseDirtyStateChangeEvent(this._isDirty),this._isValidationOverdue=!0,this._isValidationFrequencyElevated&&this._validate(!1)},n.prototype.applyItemSetHtml=function(t,e){if(this._searchBox.resetPlaceholderText(),this._dropDownCoordinator.applyItemSetHtml(t,e),this._isLocked&&this._unlock(),this._isBrowseOnly&&(this._isBrowseOnly=!1,this._userInteractionCoordinator.isBrowseOnly=!1,this.isEnabled=!0,this._editorElement.classList.remove("BrowseOnly"),this._searchBox.isEnabled=!0),null!==this._dropDownCoordinator.itemSet)for(var n=0,i=this._chipList.value;n<i.length;n++){var o=i[n];this._dropDownCoordinator.itemSet.selectItemByValue(o)}},n.prototype.clearSelection=function(){null!==this._dropDownCoordinator.itemSet&&this._dropDownCoordinator.itemSet.unselectAllItems(),this._chipList.clear(),this._value=[],this._manageDirtyState(this._value)&&this._raiseDirtyStateChangeEvent(this._isDirty),this._isValidationOverdue=!0,this._isValidationFrequencyElevated&&this._validate(!1)},n.prototype.clearValue=function(){this.clearSelection()},n.prototype.contains=function(t){return this._chipList.contains(t)},n.prototype.createRequestData=function(){var t=null;null!==this._bindingPropertyName&&((this._isEnabled||this._isBrowseOnly)&&this._value.length>0?t=new AutotaskItemSelectionSystem.ItemValueCollection(this._value).__createRequestData(this._bindingPropertyName):(t={})[this._bindingPropertyName]=null);return t},n.prototype.enableBrowseOnlyState=function(t){this._searchBox.placeholderText=t,this._isLocked?this._unlock():this._isEnabled||(this.isEnabled=!0),this._isBrowseOnly||(this._isBrowseOnly=!0,this._userInteractionCoordinator.isBrowseOnly=!0,this._editorElement.classList.add("BrowseOnly"),this._searchBox.isEnabled=!1,this._chipList.isEnabled=!0)},n.prototype.enableLockedState=function(t){this._searchBox.placeholderText=t,this._isBrowseOnly&&(this._isBrowseOnly=!1,this._userInteractionCoordinator.isBrowseOnly=!1,this._editorElement.classList.remove("BrowseOnly")),this._isLocked||this._lock()},n.prototype.focus=function(){this._searchBox.isFocused||(this._valueWhenFocused=this._copyValue(this._chipList.value),this._searchBox.isBlurEnabled=!0,this._searchBox.focus(),this._editorElement.classList.add("Focused"))},n.prototype.focusEnd=function(){null!==this._selectionButton?this._selectionButton.focus():this._dialogButton.focus()},n.prototype.focusStart=function(){this.focus()},n.prototype.getSelection=function(t){return this._chipList.getChipInformationByValue(t)},n.prototype.getSelectionTextByValue=function(t){return this._chipList.getTextByValue(t)},n.prototype.populate=function(t,e,n){var i=this;t.sendPopulateRequest(e,(function(t,e,o,a,r,s,l){i._populateResponseHandler(t,e,o,a,r,s,l,n)}))},n.prototype.showDialog=function(){this.isEnabled&&!this.isLocked||autotask.throwException('The "showDialog" method on Autotask.MultipleDataSelector should not be called when the selector is disabled or locked.'),this._openDialog()},n.prototype.removeFocus=function(){this._searchBox.blur()},n.prototype.removeSelectionByValue=function(t){this._chipList.removeByValue(t),null!==this._dropDownCoordinator.itemSet&&this._dropDownCoordinator.itemSet.unselectItemByValue(t),this._value=this._copyValue(this._chipList.value),this._manageDirtyState(this._value)&&this._raiseDirtyStateChangeEvent(this._isDirty),this._isValidationOverdue=!0,this._isValidationFrequencyElevated&&this._validate(!1)},n.prototype.resetValidation=function(){this._isValidationOverdue=!0},n.prototype.validate=function(){return this._validate(!1)},n.prototype.__initialize=function(){var t=this;this._dialogButton=autotask.find(this._dialogButtonId);var e=new AutotaskButtonSystem.ClickEventHandler((function(){t._dialogButtonClickHandler()}));if(this._dialogButton.addEventHandler(e),null!==this._selectionButtonId){this._selectionButton=autotask.find(this._selectionButtonId);var n=new AutotaskButtonSystem.ClickEventHandler((function(){t._selectionButtonClickHandler()}));this._selectionButton.addEventHandler(n),this._chipList.isSelectionEnabled=!0,this._chipList.addSelectionChangedHandler((function(e){t._chipListSelectionChangedHandler(e)}))}this._userInteractionCoordinator.initialize()},n.prototype._add=function(t){for(var e=0,n=t;e<n.length;e++){var i=n[e];this._chipList.insert(i),null!==this._dropDownCoordinator.itemSet&&this._dropDownCoordinator.itemSet.selectItemByValue(i.value)}},n.prototype._applyFiltersHandler=function(t){for(var e=0,n=this._applyFiltersHandlers;e<n.length;e++){(0,n[e])(t)}},n.prototype._broadcastKeyUpHandler=function(t){this._raiseBroadcastKeyUpEvent(t)},n.prototype._chipListSelectionChangedHandler=function(t){null!==this._selectionButton&&(this._selectionButton.isEnabled=null!==t.value)},n.prototype._copyValue=function(t){for(var e=[],n=0,i=t;n<i.length;n++){var o=i[n];e.push(o)}return e},n.prototype._dialogButtonClickHandler=function(){this._openDialog()},n.prototype._dialogButtonTabbingAwayHandler=function(t){t.isShiftKeyPressed?this.focus():null!==this._selectionButton?this._selectionButton.focus():this._raiseTabbingAwayEvent(t.isShiftKeyPressed,(function(){t.cancel()}))},n.prototype._dialogSelectionHandler=function(t){for(var e=[],n=0,i=t.chipInformation;n<i.length;n++){var o=i[n];e.push(o.value)}if(!this._arrayComparer.equals(this._value,e,!1)){var a=this._value;if(this._chipList.clear(),this._chipList.chipInformation=t.chipInformation,null!==this._dropDownCoordinator.itemSet){this._dropDownCoordinator.itemSet.unselectAllItems();for(var r=0,s=e;r<s.length;r++){var l=s[r];this._dropDownCoordinator.itemSet.selectItemByValue(l)}}this._value=this._copyValue(this._chipList.value),this._raiseImmediateChangeEvent(a,this._value),this._manageDirtyState(this._value)&&this._raiseDirtyStateChangeEvent(this._isDirty),this._isValidationOverdue=!0,this._validate(!1),this._raiseChangeEvent()}},n.prototype._focusHandler=function(){this._valueWhenFocused=this._copyValue(this._chipList.value),this._editorElement.classList.add("Focused"),this._isValidationOverlayDismissed||!this._isValidationFrequencyElevated||this._multipleDataSelectorValidation.validationResult.isValid||this._showValidationOverlay()},n.prototype._focusLostHandler=function(){this._editorElement.classList.remove("Focused"),this._arrayComparer.equals(this._value,this._valueWhenFocused,!1)||(this._raiseChangeEvent(),this._valueWhenFocused=null)},n.prototype._lock=function(){this._isLocked||(this._dropDownCoordinator.clearItemSet(),this.isEnabled=!1,this._isLocked=!0,this._editorElement.classList.add("Locked"))},n.prototype._manageDirtyState=function(t){var e=!1;return this._isDirty&&!this._arrayComparer.equals(t,this._originalValue,!1)||(this._isDirty=!this._isDirty,e=!0),e},n.prototype._openDialog=function(){var t=this,e=new AutotaskDataSelector.ApplyFiltersEventArgs;this._chipList.value.length>0&&e.addItemValueCollection(this._selectedValuesParameterName,new AutotaskItemSelectionSystem.ItemValueCollection(this._chipList.value)),this._applyFiltersHandler(e),this._searchBox.blur(),this._dialogCoordinator.showDialog(e.data,(function(e){t._dialogSelectionHandler(e)}),this._chipListContextOverlayRoute,this._maximumSelectionCount,this._maximumSelectionCountExceededMessage)},n.prototype._populateResponseHandler=function(t,e,n,i,o,a,r,s){if(this._chipList.clear(),e?this.enableLockedState(i):n?this.enableBrowseOnlyState(i):null!==a&&null!==r&&this.applyItemSetHtml(a,r),null!==o)for(var l=0,u=o;l<u.length;l++){var c=u[l];this._chipList.insert(c)}this._value=this._copyValue(this._chipList.value),this._manageDirtyState(this._value)&&this._raiseDirtyStateChangeEvent(this._isDirty),this._isValidationOverdue=!0,this._isValidationFrequencyElevated&&this._validate(!1),null!==s&&s(t)},n.prototype._raiseBroadcastKeyUpEvent=function(t){if(this._broadcastKeyUpHandlers.length>0)for(var e=new AutotaskEditorSystem.BroadcastKeyUpEventArgs(this.id,t),n=0,i=this._broadcastKeyUpHandlers;n<i.length;n++){(0,i[n])(e)}},n.prototype._raiseChangeEvent=function(){if(this._changeHandlers.length>0)for(var e=new t.ChangeEventArgs(this),n=0,i=this._changeHandlers;n<i.length;n++){(0,i[n])(e)}},n.prototype._raiseDirtyStateChangeEvent=function(t){if(this._dirtyStateChangeHandlers.length>0)for(var e=new AutotaskDirtyStateSystem.DirtyStateChangeEventArgs(t),n=0,i=this._dirtyStateChangeHandlers;n<i.length;n++){(0,i[n])(e)}},n.prototype._raiseImmediateChangeEvent=function(e,n){if(this._immediateChangeHandlers.length>0)for(var i=new t.ImmediateChangeEventArgs(this,e,n),o=0,a=this._immediateChangeHandlers;o<a.length;o++){(0,a[o])(i)}},n.prototype._raiseTabbedAwayEvent=function(t){if(this._tabbedAwayHandlers.length>0)for(var e=new AutotaskEditorSystem.TabbedAwayEventArgs(this.id,t,!0),n=0,i=this._tabbedAwayHandlers;n<i.length;n++){(0,i[n])(e)}},n.prototype._raiseTabbingAwayEvent=function(t,e){if(this._tabbingAwayHandlers.length>0)for(var n=new AutotaskEditorSystem.TabbingAwayEventArgs(this.id,t,e),i=0,o=this._tabbingAwayHandlers;i<o.length;i++){(0,o[i])(n)}},n.prototype._searchBoxTabbingAwayHandler=function(t,e){t?this._raiseTabbingAwayEvent(t,e):this._dialogButton.focus()},n.prototype._selectionButtonClickHandler=function(){null!==this._selectionButtonHandler&&null!==this._chipList.selectedChipValue&&this._selectionButtonHandler(this._chipList.selectedChipValue)},n.prototype._selectionButtonTabbingAwayHandler=function(t){t.isShiftKeyPressed?this._dialogButton.focus():this._raiseTabbingAwayEvent(t.isShiftKeyPressed,(function(){t.cancel()}))},n.prototype._showValidationOverlay=function(){var t=this;autotask.globalValidationOverlay.show(this._editorElement,this.id,this._multipleDataSelectorValidation.validationResult.message,!0,(function(){t._validationOverlayClosed()}),null)},n.prototype._tabbedAwayHandler=function(t){this._raiseTabbedAwayEvent(t)},n.prototype._unlock=function(){this._isLocked=!1,this._editorElement.classList.remove("Locked"),this.isEnabled=!0},n.prototype._validate=function(t){var e=this._multipleDataSelectorValidation.validationResult.isValid;return this._isValidationOverdue&&this._isEnabled&&(e=this._multipleDataSelectorValidation.validate(this._value,t,this._editorElement)),e?autotask.globalValidationOverlay.hide(this.id):this._showValidationOverlay(),e},n.prototype._validationCorrected=function(){this._editorElement.classList.remove(this._invalidCssClass)},n.prototype._validationFailed=function(){this._editorElement.classList.add(this._invalidCssClass),this._isValidationFrequencyElevated=!0},n.prototype._validationOverlayClosed=function(){this._isValidationOverlayDismissed=!0},n.prototype._valueChangedHandler=function(t){if(!this._arrayComparer.equals(this._value,t,!1)){var e=this._value;this._value=this._copyValue(t);var n=this._manageDirtyState(this._value);this._raiseImmediateChangeEvent(e,this._value),n&&this._raiseDirtyStateChangeEvent(this._isDirty)}},n}(AutotaskEditorSystem.Editor);t.MultipleDataSelector=e}(AutotaskMultipleDataSelector||(AutotaskMultipleDataSelector={})),function(t){var e=function(t){function e(e,n){var i=t.call(this,e)||this;return i._requiredValidator=n,i}return __extends(e,t),Object.defineProperty(e.prototype,"_isRequired",{get:function(){return null!==this._requiredValidator},enumerable:!1,configurable:!0}),e.prototype.resetValidationResult=function(t){this._updateValidationResult(new AutotaskEditorSystem.ValidResult,!1,t,!1)},e.prototype.validate=function(t,e,n){var i=new AutotaskEditorSystem.ValidResult;return null!==this._requiredValidator&&(i=this._requiredValidator.validate(t)),this._updateValidationResult(i,e,n,!1),i.isValid},e}(AutotaskEditorSystem.EditorValidation);t.MultipleDataSelectorValidation=e}(AutotaskMultipleDataSelector||(AutotaskMultipleDataSelector={})),function(t){var e=function(t){function e(e,n,i,o){var a=t.call(this,e,i,o)||this;return a._backingEditorId=n,a._backingMultipleDataSelectorEditor=void 0,a}return __extends(e,t),Object.defineProperty(e.prototype,"isDirty",{get:function(){return this._backingEditor.isDirty},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isEnabled",{get:function(){return this._backingEditor.isEnabled},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"participantValidation",{get:function(){return this._backingEditor.participantValidation},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_backingEditor",{get:function(){return void 0===this._backingMultipleDataSelectorEditor?autotask.throwException("_backingMultipleDataSelectorEditor is undefined."):this._backingMultipleDataSelectorEditor},enumerable:!1,configurable:!0}),e.prototype.addTabbingAwayHandler=function(t){var e=this;this._backingEditor.addTabbingAwayHandler((function(n){t(new AutotaskEditorSystem.TabbingAwayEventArgs(e.id,n.isShiftKeyPressed,(function(){n.cancel()})))}))},e.prototype.createRequestData=function(){return this._createRequestData(this._backingEditor,"8",!this._backingEditor.isEnabled&&!this._backingEditor.isBrowseOnly)},e.prototype.focus=function(){this._backingEditor.focus()},e.prototype.focusEnd=function(){this._backingEditor.focusEnd()},e.prototype.focusStart=function(){this._backingEditor.focusStart()},e.prototype.resetValidation=function(){this._backingEditor.resetValidation()},e.prototype.validate=function(){return this._backingEditor.validate()},e.prototype.__initialize=function(){this._backingMultipleDataSelectorEditor=autotask.find(this._backingEditorId)},e}(AutotaskEditorSystem.UserDefinedField);t.ReferenceUserDefinedField=e}(AutotaskMultipleDataSelector||(AutotaskMultipleDataSelector={})),function(t){var e=function(){function t(t,e,n){var i=this;this._searchBoxElement=AutotaskDomSystem.Document.getElementById(t),this._placeholderElement=this._searchBoxElement.children[0],this._inputElement=this._searchBoxElement.children[1],this._inputElement.addEventListener("blur",(function(t){i._blurListener(t)})),this._inputElement.addEventListener("focus",(function(){i._focusListener()})),this._inputElement.addEventListener("input",(function(){i._inputListener()})),this._inputElement.addEventListener("keydown",(function(t){i._keyDownListener(t)})),this._inputElement.addEventListener("keyup",(function(t){i._keyUpListener(t)})),this._inputElement.addEventListener("mousedown",(function(){i._mouseDownListener()})),this._isEnabled=e,this._defaultPlaceholderText=n,this._broadcastKeyUpHandler=null,this._blurHandler=null,this._enterKeyHandler=null,this._escapeKeyHandler=null,this._focusHandler=null,this._isAlertDialogTriggeringEvent=!1,this._isBlurEnabled=!0,this._isFocused=!1,this._isTabKeyDownHandled=!1,this._isTabKeyTrggeringBlur=!1,this._keyUpHandler=null,this._mouseDownHandler=null,this._navigationKeyHandler=null,this._searchTextChangedHandler=null,this._tabbedAwayHandler=null,this._tabbingAwayHandler=null}return Object.defineProperty(t.prototype,"broadcastKeyUpHandler",{set:function(t){this._broadcastKeyUpHandler=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"inputElement",{get:function(){return this._inputElement},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isAlertDialogTriggeringEvent",{set:function(t){this._isAlertDialogTriggeringEvent=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isBlurEnabled",{get:function(){return this._isBlurEnabled},set:function(t){this._isBlurEnabled=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isEnabled",{get:function(){return this._isEnabled},set:function(t){this._isEnabled!==t&&(this._isEnabled=t,this._isEnabled?(this._inputElement.removeAttribute("disabled"),this._searchBoxElement.classList.remove("Disabled")):(this._inputElement.setAttribute("disabled","true"),this._searchBoxElement.classList.add("Disabled")))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"keyUpHandler",{set:function(t){this._keyUpHandler=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"placeholderText",{set:function(t){this._placeholderElement.textContent=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"searchText",{get:function(){return this._inputElement.value},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tabbedAwayHandler",{set:function(t){this._tabbedAwayHandler=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tabbingAwayHandler",{set:function(t){this._tabbingAwayHandler=t},enumerable:!1,configurable:!0}),t.prototype.blur=function(){this._inputElement.blur(),this._isFocused=!1},t.prototype.clearSearchText=function(){this._inputElement.value=""},t.prototype.focus=function(){this._inputElement.focus(),this._isFocused=!0},t.prototype.focusWithEvent=function(){this.focus(),this._raiseFocusEvent()},t.prototype.hidePlaceholderText=function(){this._placeholderElement.classList.add("Inactive")},t.prototype.initialize=function(t,e,n,i,o,a,r){this._searchTextChangedHandler=t,this._focusHandler=e,this._blurHandler=n,this._enterKeyHandler=i,this._escapeKeyHandler=o,this._navigationKeyHandler=a,this._mouseDownHandler=r},t.prototype.resetPlaceholderText=function(){this._placeholderElement.textContent=this._defaultPlaceholderText},t.prototype.showPlaceholderText=function(){this._placeholderElement.classList.remove("Inactive")},t.prototype._blurListener=function(t){this._isBlurEnabled?(this._isAlertDialogTriggeringEvent||(this._isFocused=!1,this._raiseBlurEvent(this._isTabKeyTrggeringBlur),this._isTabKeyTrggeringBlur=!1),this._isTabKeyDownHandled=!1):(t.preventDefault(),this._inputElement.focus())},t.prototype._focusListener=function(){this._isAlertDialogTriggeringEvent||(this._isFocused=!0,this._raiseFocusEvent())},t.prototype._inputListener=function(){this._raiseSearchTextChangedEvent(this._inputElement.value)},t.prototype._keyDownListener=function(t){if(AutotaskDomSystem.KeyCode.isTab(t.keyCode))this._isTabKeyTrggeringBlur=!0,this._isTabKeyDownHandled=!0,this._raiseTabbingAwayEvent(t.shiftKey,(function(){t.preventDefault()}));else if(AutotaskDomSystem.KeyCode.isEnter(t.keyCode))this._raiseEnterKeyEvent();else if(AutotaskDomSystem.KeyCode.isEscape(t.keyCode)){t.preventDefault();this._raiseEscapeKeyEvent((function(){t.preventDefault()}),(function(){t.stopPropagation()}))}else(AutotaskDomSystem.KeyCode.isDown(t.keyCode)||AutotaskDomSystem.KeyCode.isUp(t.keyCode))&&(t.preventDefault(),this._raiseNavigationKeyEvent(t.keyCode))},t.prototype._keyUpListener=function(t){AutotaskDomSystem.KeyCode.isEscape(t.which)?this._raiseBroadcastKeyUpEvent(t.which):AutotaskDomSystem.KeyCode.isTab(t.which)&&this._isTabKeyDownHandled&&(this._isTabKeyDownHandled=!1,this._raiseTabbedAwayEvent(t.shiftKey)),null!==this._keyUpHandler&&this._keyUpHandler()},t.prototype._mouseDownListener=function(){this._raiseMouseDownEvent()},t.prototype._raiseBroadcastKeyUpEvent=function(t){null!==this._broadcastKeyUpHandler&&this._broadcastKeyUpHandler(t)},t.prototype._raiseBlurEvent=function(t){null!==this._blurHandler&&this._blurHandler(t)},t.prototype._raiseEnterKeyEvent=function(){null!==this._enterKeyHandler&&this._enterKeyHandler()},t.prototype._raiseEscapeKeyEvent=function(t,e){null!==this._escapeKeyHandler&&this._escapeKeyHandler(t,e)},t.prototype._raiseFocusEvent=function(){null!==this._focusHandler&&this._focusHandler()},t.prototype._raiseMouseDownEvent=function(){null!==this._mouseDownHandler&&this._mouseDownHandler()},t.prototype._raiseNavigationKeyEvent=function(t){null!==this._navigationKeyHandler&&this._navigationKeyHandler(t)},t.prototype._raiseSearchTextChangedEvent=function(t){null!==this._searchTextChangedHandler&&this._searchTextChangedHandler(t)},t.prototype._raiseTabbedAwayEvent=function(t){null!==this._tabbedAwayHandler&&this._tabbedAwayHandler(t)},t.prototype._raiseTabbingAwayEvent=function(t,e){null!==this._tabbingAwayHandler&&this._tabbingAwayHandler(t,e)},t}();t.SearchBox=e}(AutotaskMultipleDataSelector||(AutotaskMultipleDataSelector={})),function(t){var e=function(){function t(t,e,n,i,o,a,r,s,l,u,c,d){var h=this;this._searchBox=t,this._chipList=e,this._dropDownCoordinator=n,this._autoCompleteCoordinator=i,this._valueChangedHandler=o,this._focusHandler=a,this._focusLostHandler=r,this._openDialogDelegate=s,this._alertDialog=l,this._maximumSelectionCount=u,this._maximumSelectionCountExceededMessage=c,this._isBrowseOnly=d,this._searchBox.initialize((function(t){h._searchBoxTextChangedHandler(t)}),(function(){h._searchBoxFocusHandler()}),(function(t){h._searchBoxBlurHandler(t)}),(function(){h._searchBoxEnterKeyHandler()}),(function(t,e){h._searchBoxEscapeKeyHandler(t,e)}),(function(t){h._searchBoxNavigationKeyHandler(t)}),(function(){h._searchBoxMouseDownHandler()})),this._chipList.addChipRemovedHandler((function(t){h._chipListChipRemovedHandler(t)})),this._chipList.setMouseDownHandler((function(){h._chipListMouseDownHandler()})),this._dropDownCoordinator.setItemClickHandler((function(t){h._dropDownOverlayItemClickedHandler(t)})),this._dropDownCoordinator.setOverlayHideCompletedHandler((function(){h._dropDownOverlayHideCompletedHandler()})),this._dropDownCoordinator.setOverlayMouseDownHandler((function(){h._overlayMouseDownHandler()})),this._dropDownCoordinator.setOverlayMouseLeaveHandler((function(){h._overlayMouseLeaveHandler()})),this._autoCompleteCoordinator.setItemClickHandler((function(t){h._autoCompleteOverlayItemClickedHandler(t)})),this._autoCompleteCoordinator.setOverlayHideCompletedHandler((function(){h._autoCompleteOverlayHideCompletedHandler()})),this._autoCompleteCoordinator.setOverlayMouseDownHandler((function(){h._overlayMouseDownHandler()})),this._autoCompleteCoordinator.setOverlayMouseLeaveHandler((function(){h._overlayMouseLeaveHandler()})),this._openDialogItemId="73FBBD97-3449-4bb8-BE17-2450B411EF9D"}return Object.defineProperty(t.prototype,"isBrowseOnly",{set:function(t){this._isBrowseOnly=t},enumerable:!1,configurable:!0}),t.prototype.initialize=function(){},t.prototype._applyEnterKeyToAutoCompleteOverlay=function(){this._searchBox.clearSearchText();var t=this._autoCompleteCoordinator.itemSet;if(null!==t){var e=t.getTargetedItemValue();if(t.isTargetedItemSelected)null!==e&&(this._chipList.removeByValue(e),t.unselectTargetedItem(),null!==this._dropDownCoordinator.itemSet&&this._dropDownCoordinator.itemSet.unselectItemByValue(e),this._valueChangedHandler(this._chipList.value));else if(this._chipList.count<this._maximumSelectionCount){if(null!==e){t.selectTargetedItem(),null!==this._dropDownCoordinator.itemSet&&this._dropDownCoordinator.itemSet.selectItemByValue(e);var n=t.createChipInformationForTargetedItem();null!==n&&this._chipList.insert(n),this._valueChangedHandler(this._chipList.value)}}else this._queueAlertDialog()}this._searchBox.showPlaceholderText(),this._autoCompleteCoordinator.hideOverlay()},t.prototype._applyEnterKeyToDropDownOverlay=function(){var t=this._dropDownCoordinator.itemSet;if(null!==t){var e=t.getTargetedItemValue();if(null!==e&&e.get_primaryValue()===this._openDialogItemId)this._openDialogDelegate();else if(t.isTargetedItemSelected)t.unselectTargetedItem(),null!==e&&this._chipList.removeByValue(e),this._valueChangedHandler(this._chipList.value);else if(this._chipList.count<this._maximumSelectionCount){t.selectTargetedItem();var n=t.createChipInformationForTargetedItem();null!==n&&this._chipList.insert(n),this._valueChangedHandler(this._chipList.value)}else this._queueAlertDialog()}},t.prototype._autoCompleteOverlayHideCompletedHandler=function(){this._searchBox.isBlurEnabled=!0},t.prototype._autoCompleteOverlayItemClickedHandler=function(t){this._searchBox.clearSearchText(),t.isSelected?(t.unselect(),this._chipList.removeByValue(t.itemValue),null!==this._dropDownCoordinator.itemSet&&this._dropDownCoordinator.itemSet.unselectItemByValue(t.itemValue),this._valueChangedHandler(this._chipList.value)):this._chipList.count<this._maximumSelectionCount?(t.select(),null!==this._dropDownCoordinator.itemSet&&this._dropDownCoordinator.itemSet.selectItemByValue(t.itemValue),this._chipList.insert(t.createChipInformation()),this._valueChangedHandler(this._chipList.value)):this._showMaximumSelectionCountExceededMessage(),this._searchBox.showPlaceholderText(),this._dropDownCoordinator.showOverlay()},t.prototype._chipListChipRemovedHandler=function(t){this._searchBox.searchText.length>0&&(this._searchBox.clearSearchText(),this._searchBox.showPlaceholderText()),this._autoCompleteCoordinator.isOverlayVisible&&this._autoCompleteCoordinator.hideOverlay(),this._dropDownCoordinator.isOverlayVisible&&this._dropDownCoordinator.hideOverlay(),null!==this._dropDownCoordinator.itemSet&&this._dropDownCoordinator.itemSet.unselectItemByValue(t.value),this._valueChangedHandler(this._chipList.value)},t.prototype._chipListMouseDownHandler=function(){this._searchBox.isFocused||this._isBrowseOnly||this._searchBox.focusWithEvent()},t.prototype._dropDownOverlayItemClickedHandler=function(t){t.itemValue.get_primaryValue()===this._openDialogItemId?this._openDialogDelegate():t.isSelected?(t.unselect(),this._chipList.removeByValue(t.itemValue),this._valueChangedHandler(this._chipList.value)):this._chipList.count<this._maximumSelectionCount?(t.select(),this._chipList.insert(t.createChipInformation()),this._valueChangedHandler(this._chipList.value)):this._showMaximumSelectionCountExceededMessage()},t.prototype._dropDownOverlayHideCompletedHandler=function(){this._searchBox.isBlurEnabled=!0,this._dropDownCoordinator.itemSet.enableMouseOverTargeting()},t.prototype._overlayMouseDownHandler=function(){this._searchBox.isBlurEnabled=!1},t.prototype._overlayMouseLeaveHandler=function(){this._searchBox.isBlurEnabled=!0},t.prototype._queueAlertDialog=function(){var t=this;this._searchBox.keyUpHandler=function(){t._searchBox.keyUpHandler=null,t._showMaximumSelectionCountExceededMessage()}},t.prototype._searchBoxBlurHandler=function(t){this._searchBox.searchText.length>0&&this._autoCompleteCoordinator.cancelAutoComplete(),this._dropDownCoordinator.isOverlayVisible?(t&&this._applyEnterKeyToDropDownOverlay(),this._dropDownCoordinator.hideOverlay()):this._autoCompleteCoordinator.isOverlayVisible&&(t&&this._applyEnterKeyToAutoCompleteOverlay(),this._autoCompleteCoordinator.hideOverlay()),this._searchBox.searchText.length>0&&(this._searchBox.clearSearchText(),this._searchBox.showPlaceholderText()),this._focusLostHandler()},t.prototype._searchBoxEnterKeyHandler=function(){this._dropDownCoordinator.isOverlayVisible?this._applyEnterKeyToDropDownOverlay():this._autoCompleteCoordinator.isOverlayVisible?this._applyEnterKeyToAutoCompleteOverlay():this._dropDownCoordinator.showOverlay()},t.prototype._searchBoxEscapeKeyHandler=function(t,e){this._searchBox.searchText.length>0?(this._searchBox.clearSearchText(),this._searchBox.showPlaceholderText(),this._autoCompleteCoordinator.isOverlayVisible&&this._autoCompleteCoordinator.hideOverlay()):this._dropDownCoordinator.isOverlayVisible&&this._dropDownCoordinator.hideOverlay()},t.prototype._searchBoxFocusHandler=function(){this._focusHandler()},t.prototype._searchBoxMouseDownHandler=function(){0!==this._searchBox.searchText.length||this._dropDownCoordinator.isOverlayVisible||this._dropDownCoordinator.showOverlay()},t.prototype._searchBoxNavigationKeyHandler=function(t){this._autoCompleteCoordinator.isOverlayVisible&&null!==this._autoCompleteCoordinator.itemSet?AutotaskDomSystem.KeyCode.isDown(t)?this._autoCompleteCoordinator.itemSet.moveTargetDown():AutotaskDomSystem.KeyCode.isUp(t)&&this._autoCompleteCoordinator.itemSet.moveTargetUp():this._dropDownCoordinator.isOverlayVisible?this._dropDownCoordinator.isOverlayVisible&&null!==this._dropDownCoordinator.itemSet&&(AutotaskDomSystem.KeyCode.isDown(t)?this._dropDownCoordinator.itemSet.moveTargetDown():AutotaskDomSystem.KeyCode.isUp(t)&&this._dropDownCoordinator.itemSet.moveTargetUp()):this._dropDownCoordinator.showOverlay()},t.prototype._searchBoxTextChangedHandler=function(t){t.length>0?(this._dropDownCoordinator.isOverlayVisible&&this._dropDownCoordinator.hideOverlay(),this._searchBox.hidePlaceholderText(),this._autoCompleteCoordinator.autoComplete(t,this._chipList.value)):(this._autoCompleteCoordinator.isSearchInProgress&&this._autoCompleteCoordinator.cancelAutoComplete(),this._autoCompleteCoordinator.isOverlayVisible&&this._autoCompleteCoordinator.hideOverlay(),this._searchBox.showPlaceholderText(),this._dropDownCoordinator.showOverlay())},t.prototype._showMaximumSelectionCountExceededMessage=function(){var t=this;this._searchBox.isAlertDialogTriggeringEvent=!0,this._alertDialog.show(this._maximumSelectionCountExceededMessage,(function(){t._searchBox.focusWithEvent(),t._searchBox.isAlertDialogTriggeringEvent=!1}))},t}();t.UserInteractionCoordinator=e}(AutotaskMultipleDataSelector||(AutotaskMultipleDataSelector={})),function(t){var e=function(){function t(t){this._editorInstance=t}return Object.defineProperty(t.prototype,"editorInstance",{get:function(){return this._editorInstance},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"instanceId",{get:function(){return this._editorInstance.id},enumerable:!1,configurable:!0}),t}();t.ChangeEventArgs=e}(AutotaskMultipleItemSelector||(AutotaskMultipleItemSelector={})),function(t){var e=function(t){function e(e,n){return t.call(this,e,n)||this}return __extends(e,t),e}(AutotaskEditorSystem.ChipGenerator);t.ChipGenerator=e}(AutotaskMultipleItemSelector||(AutotaskMultipleItemSelector={})),function(t){var e=function(){function e(e,n,i,o){this._value=e,this._text=n,this._isOverlayEnabled=i,this._iconGenerator=o,this._chipGenerator=new t.ChipGenerator(n,o)}return Object.defineProperty(e.prototype,"chipGenerator",{get:function(){return this._chipGenerator},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isOverlayEnabled",{get:function(){return this._isOverlayEnabled},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"overlayRoute",{get:function(){return null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!1,configurable:!0}),e.prototype.copy=function(){return new e(this._value,this._text,this.isOverlayEnabled,this._iconGenerator)},e}();t.ChipInformation=e}(AutotaskMultipleItemSelector||(AutotaskMultipleItemSelector={})),function(t){var e=function(t){function e(e,n,i,o){var a=t.call(this,e,n,i,o)||this;return a._chipInformation=i,a._contextOverlayRoute=null,a}return __extends(e,t),Object.defineProperty(e.prototype,"chipInformation",{get:function(){return AutotaskEditorSystem.ArrayCopier.copy(this._chipInformation,(function(t){return t.copy()}))},set:function(t){this._clear();for(var e=0,n=t;e<n.length;e++){var i=n[e];this.insert(i.copy())}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"count",{get:function(){return this._chipInformation.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return this.values},enumerable:!1,configurable:!0}),e.prototype.enableContextOverlay=function(t){this._contextOverlayRoute=t,this._enableContextOverlay()},e.prototype.getChipInformationByValue=function(t){for(var e=null,n=0,i=this._chipInformation;n<i.length;n++){var o=i[n];if(AutotaskItemSelectionSystem.ItemValueComparer.equals(t,o.value)){e=o.copy();break}}return e},e.prototype.insert=function(t){var e=t.copy();this._insert(e),this._chipInformation.push(e)},e.prototype._clear=function(){t.prototype._clear.call(this),this._chipInformation.splice(0)},e.prototype._determineContextOverlayRoute=function(t){return null===this._contextOverlayRoute?autotask.throwException("The context overlay route is null."):this._contextOverlayRoute},e.prototype._removeByIndex=function(e){t.prototype._removeByIndex.call(this,e),this._chipInformation.splice(e,1)},e}(AutotaskEditorSystem.ChipList);t.ChipList=e}(AutotaskMultipleItemSelector||(AutotaskMultipleItemSelector={})),function(t){var e=function(){function t(t,e){var n=this;this._isEnabled=e,t.addEventListener("mousedown",(function(t){n._mouseDownListener(t)})),this._mouseDownHandler=null}return Object.defineProperty(t.prototype,"isEnabled",{get:function(){return this._isEnabled},set:function(t){this._isEnabled=t},enumerable:!1,configurable:!0}),t.prototype.initialize=function(t){this._mouseDownHandler=t},t.prototype._mouseDownListener=function(t){this._isEnabled&&null!==this._mouseDownHandler&&(t.stopImmediatePropagation(),t.preventDefault(),this._mouseDownHandler())},t}();t.DropDownButton=e}(AutotaskMultipleItemSelector||(AutotaskMultipleItemSelector={})),function(t){var e=function(){function t(t,e){this._overlay=t,this._overlayLaunchingElement=e}return Object.defineProperty(t.prototype,"isOverlayVisible",{get:function(){return this._overlay.isVisible},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"itemSet",{get:function(){return this._overlay.itemSet},enumerable:!1,configurable:!0}),t.prototype.applyItemSetHtml=function(t,e){this._overlay.applyItemSetHtml(t,e)},t.prototype.clearItemSet=function(){this._overlay.clearItemSet()},t.prototype.hideOverlay=function(){this._overlay.hide()},t.prototype.setItemClickHandler=function(t){this._overlay.setItemClickHandler(t)},t.prototype.setOverlayHideCompletedHandler=function(t){this._overlay.setHideCompletedHandler(t)},t.prototype.setOverlayMouseDownHandler=function(t){this._overlay.setMouseDownHandler(t)},t.prototype.setOverlayMouseLeaveHandler=function(t){this._overlay.setMouseDownHandler(t)},t.prototype.setOverlayShowCompletedHandler=function(t){this._overlay.setShowCompletedHandler(t)},t.prototype.showOverlay=function(){this._overlay.show(this._overlayLaunchingElement)},t}();t.DropDownCoordinator=e}(AutotaskMultipleItemSelector||(AutotaskMultipleItemSelector={})),function(t){var e=function(e){function n(t,n){var i=e.call(this,t,!1)||this,o=AutotaskDomSystem.Document.getElementById(t).firstElementChild;return i._contentElement=o.firstElementChild,i._defaultStyleCoordinator=new AutotaskOverlaySystem.DefaultStyleCoordinator(i._overlayElementStyleApplicator),i._itemSet=null,i._itemClickHandler=null,i._mouseDownHandler=null,i._mouseLeaveHandler=null,i._scrollCoordinator=new AutotaskEditorSystem.ItemOverlayScrollCoordinator(i),i._contentElement.addEventListener("mousedown",(function(t){i._mouseDownListener(t)})),i._contentElement.addEventListener("mouseleave",(function(){i._mouseLeaveListener()})),i._contentElement.addEventListener("wheel",(function(t){i._mouseWheelListener(t)})),i._itemSet=null,null!==i._contentElement.firstElementChild&&null!==n&&i._intitalizeItemSet(i._contentElement.firstElementChild,n),i._launchingElementHeight=null,i}return __extends(n,e),Object.defineProperty(n.prototype,"contentHeight",{get:function(){return this._contentElement.clientHeight},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"contentScrollTop",{get:function(){return this._contentElement.scrollTop},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"itemSet",{get:function(){return this._itemSet},enumerable:!1,configurable:!0}),n.prototype.applyItemSetHtml=function(t,e){if(this.clearItemSet(),null!==t&&null!==e){this._contentElement.insertAdjacentHTML("beforeend",t);var n=AutotaskDomSystem.Document.getChildElementByClassName(this._contentElement,"ItemSet");this._intitalizeItemSet(n,e)}},n.prototype.applySize=function(t){this._contentElement.style.minHeight=t.minimumHeightValue.toString()+"px",this._contentElement.style.maxHeight=(t.maximumHeightValue-6).toString()+"px",this._contentElement.style.minWidth=t.minimumWidthValue.toString()+"px",this._contentElement.style.maxWidth=t.maximumWidthValue.toString()+"px"},n.prototype.clearItemSet=function(){if(null!==this._itemSet){var t=this._contentElement.getElementsByClassName("ItemSet");t.length>0&&(this._contentElement.removeChild(t[0]),this._itemSet.dispose(),this._itemSet=null)}},n.prototype.scrollContent=function(t){this._contentElement.scrollTop=t},n.prototype.setHideCompletedHandler=function(t){this.addHideCompletedHandler(t)},n.prototype.setItemClickHandler=function(t){this._itemClickHandler=t},n.prototype.setMouseDownHandler=function(t){this._mouseDownHandler=t},n.prototype.setMouseLeaveHandler=function(t){this._mouseLeaveHandler=t},n.prototype.setShowCompletedHandler=function(t){this.addShowCompletedHandler(t)},n.prototype.show=function(t){this._clearSizeStyles(),this._launchingElementHeight=t.clientHeight,this._show(t)},Object.defineProperty(n.prototype,"_delayBeforeHiding",{get:function(){return 0},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"_delayBeforeShowing",{get:function(){return 0},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"_styleCoordinator",{get:function(){return this._defaultStyleCoordinator},enumerable:!1,configurable:!0}),n.prototype._createPositionCoordinator=function(t){var e=this._calculateMinimumHeight(),i=n._contentMaxHeight,o=new AutotaskEditorSystem.DropDownOverlayPositionCoordinator(e,i,this),a=new AutotaskPositionApplicatorSystem.Default(this._defaultStyleCoordinator,t,null,null),r=-1*(this._launchingElementHeight-31);o.addPositionAndApplicator(new AutotaskEditorSystem.DropDownOverlayBottomAlignedLeftPosition(0,r),a);var s=new AutotaskPositionApplicatorSystem.Default(this._defaultStyleCoordinator,t,null,"Top");return o.addPositionAndApplicator(new AutotaskEditorSystem.DropDownOverlayTopAlignedLeftPosition(0,1),s),o},n.prototype._calculateMinimumHeight=function(){var t=n._defaultContentMinHeight;if(null!==this._itemSet){var e=this._itemSet.itemCount;e>0&&e<6&&(t=this._itemSet.itemCount*this._itemSet.itemDisplayHeight)}return t},n.prototype._clearSizeStyles=function(){this._contentElement.style.minHeight="",this._contentElement.style.maxHeight="",this._contentElement.style.minWidth="",this._contentElement.style.maxWidth=""},n.prototype._intitalizeItemSet=function(e,n){var i=this;this._itemSet=new t.ItemSet(e,n,this._scrollCoordinator),this._itemSet.targetFirstItem(),this._itemSet.setItemClickHandler((function(t){i._itemSetItemClickHandler(t)}))},n.prototype._itemSetItemClickHandler=function(t){null!==this._itemClickHandler&&this._itemClickHandler(t)},n.prototype._mouseDownListener=function(t){t.preventDefault(),null!==this._mouseDownHandler&&this._mouseDownHandler()},n.prototype._mouseLeaveListener=function(){null!==this._mouseLeaveHandler&&this._mouseLeaveHandler()},n.prototype._mouseWheelListener=function(t){var e=this._contentElement.scrollTop,n=this._contentElement.scrollHeight,i=this._contentElement.clientHeight;!1===(t.deltaY<0?e>0:e+i<n)&&t.preventDefault()},n._contentMaxHeight=364,n._defaultContentMinHeight=106,n}(AutotaskOverlaySystem.ContextOverlay);t.DropDownOverlay=e}(AutotaskMultipleItemSelector||(AutotaskMultipleItemSelector={})),function(t){var e=function(){function t(t,e,n){this._editorInstance=t,this._previousValue=e,this._currentValue=n}return Object.defineProperty(t.prototype,"currentValue",{get:function(){return new AutotaskItemSelectionSystem.ItemValueCollection(this._currentValue)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"editorInstance",{get:function(){return this._editorInstance},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"previousValue",{get:function(){return new AutotaskItemSelectionSystem.ItemValueCollection(this._previousValue)},enumerable:!1,configurable:!0}),t}();t.ImmediateChangeEventArgs=e}(AutotaskMultipleItemSelector||(AutotaskMultipleItemSelector={})),function(t){var e=function(){function t(t){this._scrollableOverlay=t}return t.prototype.scroll=function(t,e){var n=this._scrollableOverlay.contentHeight;if(n>0){var i=this._scrollableOverlay.contentScrollTop;e<i?this._scrollableOverlay.scrollContent(e):e+t>n+i&&this._scrollableOverlay.scrollContent(e+t-n)}},t}();t.ItemOverlayScrollCoordinator=e}(AutotaskMultipleItemSelector||(AutotaskMultipleItemSelector={})),function(t){var e=function(t){function e(e,n){var i=t.call(this,e)||this;return i._chipInformation=n,i}return __extends(e,t),Object.defineProperty(e.prototype,"chipInformation",{get:function(){return this._chipInformation},enumerable:!1,configurable:!0}),e}(Autotask.LifecycleObject);t.MultipleItemSelection=e}(AutotaskMultipleItemSelector||(AutotaskMultipleItemSelector={})),function(t){var e=function(e){function n(n,i,o,a,r,s,l,u,c,d,h,_,p,m,f,y){var g=e.call(this,n)||this;g._editorElement=AutotaskDomSystem.Document.getElementById(n);var v=g._editorElement;g._isEnabled=i,g._isLocked=o,g._bindingPropertyName=s,g._searchBox=l,g._chipList=u,g._maximumSelectionCount=h,g._maximumSelectionCountExceededMessage=_,g._selectionButtonId=p,g._selectionButtonHandler=m,g._multipleItemSelectorValidation=y,g._broadcastKeyUpHandlers=[],g._changeHandlers=[],g._dirtyStateChangeHandlers=[],g._immediateChangeHandlers=[],g._invalidCssClass="Invalid",g._isDirty=!1,g._isValidationFrequencyElevated=!1,g._isValidationOverdue=!0,g._isValidationOverlayDismissed=!1,g._originalValue=g._copyValue(g._chipList.value),g._selectionButton=null,g._tabbedAwayHandlers=[],g._tabbingAwayHandlers=[],g._value=g._copyValue(g._originalValue),g._valueWhenFocused=[];if(g._arrayComparer=new AutotaskEditorSystem.ArrayComparer((function(t,e){return AutotaskItemSelectionSystem.ItemValueComparer.equals(t,e)}),AutotaskItemSelectionSystem.ItemValueSorter.compare),g._dropDownCoordinator=new t.DropDownCoordinator(d,v),null!==g._dropDownCoordinator.itemSet)for(var b=0,E=g._value;b<E.length;b++){var S=E[b];g._dropDownCoordinator.itemSet.selectItemByValue(S)}g._chipListContextOverlayRoute=c,null!==g._chipListContextOverlayRoute&&u.enableContextOverlay(g._chipListContextOverlayRoute);var k=g._editorElement.children[0].children[1];return g._dropDownButton=new t.DropDownButton(k,i&&!o),g._userInteractionCoordinator=new t.UserInteractionCoordinator(l,u,g._dropDownButton,g._dropDownCoordinator,(function(t){g._valueChangedHandler(t)}),(function(){g._focusHandler()}),(function(){g._focusLostHandler()}),f,g._maximumSelectionCount,g._maximumSelectionCountExceededMessage),g._multipleItemSelectorValidation.addValidationCorrectedHandler((function(){g._validationCorrected()})),g._multipleItemSelectorValidation.addValidationFailedHandler((function(){g._validationFailed()})),g._chipList.addAllowedConcurrentlyVisibleOverlay(d),null!==a&&g._changeHandlers.push(a),null!==r&&g._immediateChangeHandlers.push(r),g}return __extends(n,e),Object.defineProperty(n.prototype,"isDirty",{get:function(){return this._isDirty},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isEnabled",{get:function(){return this._isEnabled},set:function(t){t!==this._isEnabled&&(this._isEnabled=t,this._searchBox.isEnabled=t,this._dropDownButton.isEnabled=t,this._chipList.isEnabled=t,t?(this._editorElement.classList.remove("Disabled"),this._isValidationFrequencyElevated&&this._validate(!1)):(this._editorElement.classList.add("Disabled"),this._isValidationOverdue=!this._multipleItemSelectorValidation.validationResult.isValid,this._multipleItemSelectorValidation.resetValidationResult(this._editorElement)))},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isLocked",{get:function(){return this._isLocked},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"participantValidation",{get:function(){return this._multipleItemSelectorValidation},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"value",{get:function(){return new AutotaskItemSelectionSystem.ItemValueCollection(this._value)},enumerable:!1,configurable:!0}),n.prototype.add=function(t){this._add([t]),this._value=this._copyValue(this._chipList.value),this._manageDirtyState(this._value)&&this._raiseDirtyStateChangeEvent(this._isDirty),this._isValidationOverdue=!0,this._isValidationFrequencyElevated&&this._validate(!1)},n.prototype.addBroadcastKeyUpHandler=function(t){var e=this;this._broadcastKeyUpHandlers.push(t),this._searchBox.broadcastKeyUpHandler=function(t){e._broadcastKeyUpHandler(t)}},n.prototype.addChangeHandler=function(t){this._changeHandlers.push(t)},n.prototype.addDirtyStateChangeHandler=function(t){this._dirtyStateChangeHandlers.push(t)},n.prototype.addImmediateChangeHandler=function(t){this._immediateChangeHandlers.push(t)},n.prototype.addTabbedAwayHandler=function(t){var e=this;this._tabbedAwayHandlers.push(t),this._searchBox.tabbedAwayHandler=function(t){e._tabbedAwayHandler(t)}},n.prototype.addTabbingAwayHandler=function(t){var e=this;this._tabbingAwayHandlers.push(t),this._searchBox.tabbingAwayHandler=function(t,n){e._searchBoxTabbingAwayHandler(t,n)},null!==this._selectionButton&&this._selectionButton.addTabbingAwayHandler((function(t){e._selectionButtonTabbingAwayHandler(t)}))},n.prototype.addMultiple=function(t){this._add(t),this._value=this._copyValue(this._chipList.value),this._manageDirtyState(this._value)&&this._raiseDirtyStateChangeEvent(this._isDirty),this._isValidationOverdue=!0,this._isValidationFrequencyElevated&&this._validate(!1)},n.prototype.applyItemSetHtml=function(t,e){if(this._searchBox.resetPlaceholderText(),this._dropDownCoordinator.applyItemSetHtml(t,e),this._isLocked&&this._unlock(),null!==this._dropDownCoordinator.itemSet)for(var n=0,i=this._chipList.value;n<i.length;n++){var o=i[n];this._dropDownCoordinator.itemSet.selectItemByValue(o)}},n.prototype.clearSelection=function(){null!==this._dropDownCoordinator.itemSet&&this._dropDownCoordinator.itemSet.unselectAllItems(),this._chipList.clear(),this._value=[],this._manageDirtyState(this._value)&&this._raiseDirtyStateChangeEvent(this._isDirty),this._isValidationOverdue=!0,this._isValidationFrequencyElevated&&this._validate(!1)},n.prototype.clearValue=function(){this.clearSelection()},n.prototype.contains=function(t){return this._chipList.contains(t)},n.prototype.createRequestData=function(){var t=null;null!==this._bindingPropertyName&&(this._isEnabled&&this._value.length>0?t=new AutotaskItemSelectionSystem.ItemValueCollection(this._value).__createRequestData(this._bindingPropertyName):(t={})[this._bindingPropertyName]=null);return t},n.prototype.enableLockedState=function(t){this._searchBox.placeholderText=t,this._isLocked||this._lock()},n.prototype.focus=function(){this._searchBox.isFocused||(this._valueWhenFocused=this._copyValue(this._chipList.value),this._searchBox.isBlurEnabled=!0,this._searchBox.focus(),this._editorElement.classList.add("Focused"))},n.prototype.focusEnd=function(){null!==this._selectionButton?this._selectionButton.focus():this.focus()},n.prototype.focusStart=function(){this.focus()},n.prototype.getSelection=function(t){return this._chipList.getChipInformationByValue(t)},n.prototype.getSelectionTextByValue=function(t){return this._chipList.getTextByValue(t)},n.prototype.populate=function(t,e,n){var i=this;t.sendPopulateRequest(e,(function(t,e,o,a,r){i._populateResponseHandler(t,e,o,a,r,n)}))},n.prototype.removeFocus=function(){this._searchBox.blur()},n.prototype.removeSelectionByValue=function(t){this._chipList.removeByValue(t),null!==this._dropDownCoordinator.itemSet&&this._dropDownCoordinator.itemSet.unselectItemByValue(t),this._value=this._copyValue(this._chipList.value),this._manageDirtyState(this._value)&&this._raiseDirtyStateChangeEvent(this._isDirty),this._isValidationOverdue=!0,this._isValidationFrequencyElevated&&this._validate(!1)},n.prototype.resetValidation=function(){this._isValidationOverdue=!0},n.prototype.validate=function(){return this._validate(!1)},n.prototype.__initialize=function(){var t=this;if(null!==this._selectionButtonId){this._selectionButton=autotask.find(this._selectionButtonId);var e=new AutotaskButtonSystem.ClickEventHandler((function(){t._selectionButtonClickHandler()}));this._selectionButton.addEventHandler(e),this._chipList.isSelectionEnabled=!0,this._chipList.addSelectionChangedHandler((function(e){t._chipListSelectionChangedHandler(e)}))}this._userInteractionCoordinator.initialize()},n.prototype._add=function(t){for(var e=0,n=t;e<n.length;e++){var i=n[e];this._chipList.insert(i),null!==this._dropDownCoordinator.itemSet&&this._dropDownCoordinator.itemSet.selectItemByValue(i.value)}},n.prototype._broadcastKeyUpHandler=function(t){this._raiseBroadcastKeyUpEvent(t)},n.prototype._chipListSelectionChangedHandler=function(t){null!==this._selectionButton&&(this._selectionButton.isEnabled=null!==t.value)},n.prototype._copyValue=function(t){for(var e=[],n=0,i=t;n<i.length;n++){var o=i[n];e.push(o)}return e},n.prototype._focusHandler=function(){this._valueWhenFocused=this._copyValue(this._chipList.value),this._editorElement.classList.add("Focused"),this._isValidationOverlayDismissed||!this._isValidationFrequencyElevated||this._multipleItemSelectorValidation.validationResult.isValid||this._showValidationOverlay()},n.prototype._focusLostHandler=function(){this._editorElement.classList.remove("Focused"),this._arrayComparer.equals(this._value,this._valueWhenFocused,!1)||(this._raiseChangeEvent(),this._valueWhenFocused=null)},n.prototype._lock=function(){this._isLocked||(this._dropDownCoordinator.clearItemSet(),this.isEnabled=!1,this._isLocked=!0,this._editorElement.classList.add("Locked"))},n.prototype._manageDirtyState=function(t){var e=!1;return this._isDirty&&!this._arrayComparer.equals(t,this._originalValue,!1)||(this._isDirty=!this._isDirty,e=!0),e},n.prototype._populateResponseHandler=function(t,e,n,i,o,a){if(this._chipList.clear(),t?this.enableLockedState(e):null!==i&&null!==o&&this.applyItemSetHtml(i,o),null!==n)for(var r=0,s=n;r<s.length;r++){var l=s[r];this._chipList.insert(l)}this._value=this._copyValue(this._chipList.value),this._manageDirtyState(this._value)&&this._raiseDirtyStateChangeEvent(this._isDirty),this._isValidationOverdue=!0,this._isValidationFrequencyElevated&&this._validate(!1),null!==a&&a()},n.prototype._raiseBroadcastKeyUpEvent=function(t){if(this._broadcastKeyUpHandlers.length>0)for(var e=new AutotaskEditorSystem.BroadcastKeyUpEventArgs(this.id,t),n=0,i=this._broadcastKeyUpHandlers;n<i.length;n++){(0,i[n])(e)}},n.prototype._raiseChangeEvent=function(){if(this._changeHandlers.length>0)for(var e=new t.ChangeEventArgs(this),n=0,i=this._changeHandlers;n<i.length;n++){(0,i[n])(e)}},n.prototype._raiseDirtyStateChangeEvent=function(t){if(this._dirtyStateChangeHandlers.length>0)for(var e=new AutotaskDirtyStateSystem.DirtyStateChangeEventArgs(t),n=0,i=this._dirtyStateChangeHandlers;n<i.length;n++){(0,i[n])(e)}},n.prototype._raiseImmediateChangeEvent=function(e,n){if(this._immediateChangeHandlers.length>0)for(var i=new t.ImmediateChangeEventArgs(this,e,n),o=0,a=this._immediateChangeHandlers;o<a.length;o++){(0,a[o])(i)}},n.prototype._raiseTabbedAwayEvent=function(t){if(this._tabbedAwayHandlers.length>0)for(var e=new AutotaskEditorSystem.TabbedAwayEventArgs(this.id,t,!0),n=0,i=this._tabbedAwayHandlers;n<i.length;n++){(0,i[n])(e)}},n.prototype._raiseTabbingAwayEvent=function(t,e){if(this._tabbingAwayHandlers.length>0)for(var n=new AutotaskEditorSystem.TabbingAwayEventArgs(this.id,t,e),i=0,o=this._tabbingAwayHandlers;i<o.length;i++){(0,o[i])(n)}},n.prototype._searchBoxTabbingAwayHandler=function(t,e){this._raiseTabbingAwayEvent(t,e)},n.prototype._selectionButtonClickHandler=function(){null!==this._selectionButtonHandler&&null!==this._chipList.selectedChipValue&&this._selectionButtonHandler(this._chipList.selectedChipValue)},n.prototype._selectionButtonTabbingAwayHandler=function(t){t.isShiftKeyPressed?this.focus():this._raiseTabbingAwayEvent(t.isShiftKeyPressed,(function(){t.cancel()}))},n.prototype._showValidationOverlay=function(){var t=this;autotask.globalValidationOverlay.show(this._editorElement,this.id,this._multipleItemSelectorValidation.validationResult.message,!0,(function(){t._validationOverlayClosed()}),null)},n.prototype._tabbedAwayHandler=function(t){this._raiseTabbedAwayEvent(t)},n.prototype._unlock=function(){this._isLocked=!1,this._editorElement.classList.remove("Locked"),this.isEnabled=!0},n.prototype._validate=function(t){var e=this._multipleItemSelectorValidation.validationResult.isValid;return this._isValidationOverdue&&this._isEnabled&&(e=this._multipleItemSelectorValidation.validate(this._value,t,this._editorElement)),e?autotask.globalValidationOverlay.hide(this.id):this._showValidationOverlay(),e},n.prototype._validationCorrected=function(){this._editorElement.classList.remove(this._invalidCssClass)},n.prototype._validationFailed=function(){this._editorElement.classList.add(this._invalidCssClass),this._isValidationFrequencyElevated=!0},n.prototype._validationOverlayClosed=function(){this._isValidationOverlayDismissed=!0},n.prototype._valueChangedHandler=function(t){if(!this._arrayComparer.equals(this._value,t,!1)){var e=this._value;this._value=this._copyValue(t);var n=this._manageDirtyState(this._value);this._raiseImmediateChangeEvent(e,this._value),n&&this._raiseDirtyStateChangeEvent(this._isDirty)}},n}(AutotaskEditorSystem.Editor);t.MultipleItemSelector=e}(AutotaskMultipleItemSelector||(AutotaskMultipleItemSelector={})),function(t){var e=function(t){function e(e,n){var i=t.call(this,e)||this;return i._requiredValidator=n,i}return __extends(e,t),Object.defineProperty(e.prototype,"_isRequired",{get:function(){return null!==this._requiredValidator},enumerable:!1,configurable:!0}),e.prototype.resetValidationResult=function(t){this._updateValidationResult(new AutotaskEditorSystem.ValidResult,!1,t,!1)},e.prototype.validate=function(t,e,n){var i=new AutotaskEditorSystem.ValidResult;return null!==this._requiredValidator&&(i=this._requiredValidator.validate(t)),this._updateValidationResult(i,e,n,!1),i.isValid},e}(AutotaskEditorSystem.EditorValidation);t.MultipleItemSelectorValidation=e}(AutotaskMultipleItemSelector||(AutotaskMultipleItemSelector={})),function(t){var e=function(){function t(t,e,n){var i=this;this._searchBoxElement=AutotaskDomSystem.Document.getElementById(t),this._placeholderElement=this._searchBoxElement.children[0],this._inputElement=this._searchBoxElement.children[1],this._inputElement.addEventListener("blur",(function(t){i._blurListener(t)})),this._inputElement.addEventListener("focus",(function(){i._focusListener()})),this._inputElement.addEventListener("input",(function(){i._inputListener()})),this._inputElement.addEventListener("keydown",(function(t){i._keyDownListener(t)})),this._inputElement.addEventListener("keyup",(function(t){i._keyUpListener(t)})),this._inputElement.addEventListener("mousedown",(function(){i._mouseDownListener()})),this._isEnabled=e,this._defaultPlaceholderText=n,this._broadcastKeyUpHandler=null,this._blurHandler=null,this._enterKeyHandler=null,this._escapeKeyHandler=null,this._focusHandler=null,this._isAlertDialogTriggeringEvent=!1,this._isBlurEnabled=!0,this._isFocused=!1,this._isTabKeyDownHandled=!1,this._isTabKeyTrggeringBlur=!1,this._keyUpHandler=null,this._mouseDownHandler=null,this._navigationKeyHandler=null,this._searchTextChangedHandler=null,this._tabbedAwayHandler=null,this._tabbingAwayHandler=null}return Object.defineProperty(t.prototype,"broadcastKeyUpHandler",{set:function(t){this._broadcastKeyUpHandler=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"inputElement",{get:function(){return this._inputElement},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isAlertDialogTriggeringEvent",{set:function(t){this._isAlertDialogTriggeringEvent=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isBlurEnabled",{get:function(){return this._isBlurEnabled},set:function(t){this._isBlurEnabled=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isEnabled",{get:function(){return this._isEnabled},set:function(t){this._isEnabled!==t&&(this._isEnabled=t,this._isEnabled?(this._inputElement.removeAttribute("disabled"),this._searchBoxElement.classList.remove("Disabled")):(this._inputElement.setAttribute("disabled","true"),this._searchBoxElement.classList.add("Disabled")))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"keyUpHandler",{set:function(t){this._keyUpHandler=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"placeholderText",{set:function(t){this._placeholderElement.textContent=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"searchText",{get:function(){return this._inputElement.value},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tabbedAwayHandler",{set:function(t){this._tabbedAwayHandler=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tabbingAwayHandler",{set:function(t){this._tabbingAwayHandler=t},enumerable:!1,configurable:!0}),t.prototype.blur=function(){this._inputElement.blur(),this._isFocused=!1},t.prototype.clearSearchText=function(){this._inputElement.value=""},t.prototype.focus=function(){this._inputElement.focus(),this._isFocused=!0},t.prototype.focusWithEvent=function(){this.focus(),this._raiseFocusEvent()},t.prototype.hidePlaceholderText=function(){this._placeholderElement.classList.add("Inactive")},t.prototype.initialize=function(t,e,n,i,o,a,r){this._searchTextChangedHandler=t,this._focusHandler=e,this._blurHandler=n,this._enterKeyHandler=i,this._escapeKeyHandler=o,this._navigationKeyHandler=a,this._mouseDownHandler=r},t.prototype.resetPlaceholderText=function(){this._placeholderElement.textContent=this._defaultPlaceholderText},t.prototype.showPlaceholderText=function(){this._placeholderElement.classList.remove("Inactive")},t.prototype._blurListener=function(t){this._isBlurEnabled?(this._isAlertDialogTriggeringEvent||(this._isFocused=!1,this._raiseBlurEvent(this._isTabKeyTrggeringBlur),this._isTabKeyTrggeringBlur=!1),this._isTabKeyDownHandled=!1):(t.preventDefault(),this._inputElement.focus())},t.prototype._focusListener=function(){this._isAlertDialogTriggeringEvent||(this._isFocused=!0,this._raiseFocusEvent())},t.prototype._inputListener=function(){this._raiseSearchTextChangedEvent(this._inputElement.value)},t.prototype._keyDownListener=function(t){if(AutotaskDomSystem.KeyCode.isTab(t.keyCode))this._isTabKeyTrggeringBlur=!0,this._isTabKeyDownHandled=!0,this._raiseTabbingAwayEvent(t.shiftKey,(function(){t.preventDefault()}));else if(AutotaskDomSystem.KeyCode.isEnter(t.keyCode))this._raiseEnterKeyEvent();else if(AutotaskDomSystem.KeyCode.isEscape(t.keyCode)){t.preventDefault();this._raiseEscapeKeyEvent((function(){t.preventDefault()}),(function(){t.stopPropagation()}))}else(AutotaskDomSystem.KeyCode.isDown(t.keyCode)||AutotaskDomSystem.KeyCode.isUp(t.keyCode))&&(t.preventDefault(),this._raiseNavigationKeyEvent(t.keyCode))},t.prototype._keyUpListener=function(t){AutotaskDomSystem.KeyCode.isEscape(t.which)?this._raiseBroadcastKeyUpEvent(t.which):AutotaskDomSystem.KeyCode.isTab(t.which)&&this._isTabKeyDownHandled&&(this._isTabKeyDownHandled=!1,this._raiseTabbedAwayEvent(t.shiftKey)),null!==this._keyUpHandler&&this._keyUpHandler()},t.prototype._mouseDownListener=function(){this._raiseMouseDownEvent()},t.prototype._raiseBroadcastKeyUpEvent=function(t){null!==this._broadcastKeyUpHandler&&this._broadcastKeyUpHandler(t)},t.prototype._raiseBlurEvent=function(t){null!==this._blurHandler&&this._blurHandler(t)},t.prototype._raiseEnterKeyEvent=function(){null!==this._enterKeyHandler&&this._enterKeyHandler()},t.prototype._raiseEscapeKeyEvent=function(t,e){null!==this._escapeKeyHandler&&this._escapeKeyHandler(t,e)},t.prototype._raiseFocusEvent=function(){null!==this._focusHandler&&this._focusHandler()},t.prototype._raiseMouseDownEvent=function(){null!==this._mouseDownHandler&&this._mouseDownHandler()},t.prototype._raiseNavigationKeyEvent=function(t){null!==this._navigationKeyHandler&&this._navigationKeyHandler(t)},t.prototype._raiseSearchTextChangedEvent=function(t){null!==this._searchTextChangedHandler&&this._searchTextChangedHandler(t)},t.prototype._raiseTabbedAwayEvent=function(t){null!==this._tabbedAwayHandler&&this._tabbedAwayHandler(t)},t.prototype._raiseTabbingAwayEvent=function(t,e){null!==this._tabbingAwayHandler&&this._tabbingAwayHandler(t,e)},t}();t.SearchBox=e}(AutotaskMultipleItemSelector||(AutotaskMultipleItemSelector={})),function(t){var e=function(){function t(t,e,n,i,o,a,r,s,l,u){var c=this;this._searchBox=t,this._chipList=e,this._dropDownButton=n,this._dropDownCoordinator=i,this._valueChangedHandler=o,this._focusHandler=a,this._focusLostHandler=r,this._alertDialog=s,this._maximumSelectionCount=l,this._maximumSelectionCountExceededMessage=u,this._searchBox.initialize((function(t){c._searchBoxTextChangedHandler(t)}),(function(){c._searchBoxFocusHandler()}),(function(t){c._searchBoxBlurHandler(t)}),(function(){c._searchBoxEnterKeyHandler()}),(function(t,e){c._searchBoxEscapeKeyHandler(t,e)}),(function(t){c._searchBoxNavigationKeyHandler(t)}),(function(){c._searchBoxMouseDownHandler()})),this._chipList.addChipRemovedHandler((function(t){c._chipListChipRemovedHandler(t)})),this._chipList.setMouseDownHandler((function(){c._chipListMouseDownHandler()})),this._dropDownCoordinator.setItemClickHandler((function(t){c._dropDownOverlayItemClickedHandler(t)})),this._dropDownCoordinator.setOverlayHideCompletedHandler((function(){c._dropDownOverlayHideCompletedHandler()})),this._dropDownCoordinator.setOverlayMouseDownHandler((function(){c._overlayMouseDownHandler()})),this._dropDownCoordinator.setOverlayMouseLeaveHandler((function(){c._overlayMouseLeaveHandler()})),this._dropDownCoordinator.setOverlayShowCompletedHandler((function(){c._dropDownOverlayShowCompletedHandler()})),this._dropDownButton.initialize((function(){c._dropDownButtonMouseDownHandler()})),this._scrollOnOverShowingComplete=!1}return t.prototype.initialize=function(){},t.prototype._applyEnterKeyToDropDownOverlay=function(){var t=this._dropDownCoordinator.itemSet;if(null!==t){var e=t.getTargetedItemValue();if(t.isTargetedItemSelected)t.unselectTargetedItem(),null!==e&&this._chipList.removeByValue(e),this._valueChangedHandler(this._chipList.value);else if(this._chipList.count<this._maximumSelectionCount){t.selectTargetedItem();var n=t.createChipInformationForTargetedItem();null!==n&&this._chipList.insert(n),this._valueChangedHandler(this._chipList.value)}else this._queueAlertDialog()}},t.prototype._chipListChipRemovedHandler=function(t){this._searchBox.searchText.length>0&&(this._searchBox.clearSearchText(),this._searchBox.showPlaceholderText()),this._dropDownCoordinator.isOverlayVisible&&this._dropDownCoordinator.hideOverlay(),null!==this._dropDownCoordinator.itemSet&&this._dropDownCoordinator.itemSet.unselectItemByValue(t.value),this._valueChangedHandler(this._chipList.value)},t.prototype._chipListMouseDownHandler=function(){this._searchBox.isFocused||this._searchBox.focusWithEvent()},t.prototype._dropDownOverlayItemClickedHandler=function(t){t.isSelected?(t.unselect(),this._chipList.removeByValue(t.itemValue),this._valueChangedHandler(this._chipList.value)):this._chipList.count<this._maximumSelectionCount?(t.select(),this._chipList.insert(t.createChipInformation()),this._valueChangedHandler(this._chipList.value)):this._showMaximumSelectionCountExceededMessage()},t.prototype._dropDownOverlayShowCompletedHandler=function(){this._scrollOnOverShowingComplete&&null!==this._dropDownCoordinator.itemSet&&(this._dropDownCoordinator.itemSet.scrollToTargetedItem(),this._scrollOnOverShowingComplete=!1)},t.prototype._dropDownButtonMouseDownHandler=function(){this._dropDownCoordinator.isOverlayVisible?this._dropDownCoordinator.hideOverlay():(this._dropDownCoordinator.showOverlay(),this._searchBox.isFocused||this._searchBox.focusWithEvent())},t.prototype._dropDownOverlayHideCompletedHandler=function(){this._searchBox.isBlurEnabled=!0,null!==this._dropDownCoordinator.itemSet&&(this._dropDownCoordinator.itemSet.clearHighlighting(),this._dropDownCoordinator.itemSet.targetFirstItem(),this._dropDownCoordinator.itemSet.enableMouseOverTargeting())},t.prototype._overlayMouseDownHandler=function(){this._searchBox.isBlurEnabled=!1},t.prototype._overlayMouseLeaveHandler=function(){this._searchBox.isBlurEnabled=!0},t.prototype._queueAlertDialog=function(){var t=this;this._searchBox.keyUpHandler=function(){t._searchBox.keyUpHandler=null,t._showMaximumSelectionCountExceededMessage()}},t.prototype._searchBoxBlurHandler=function(t){this._dropDownCoordinator.isOverlayVisible&&(t&&this._applyEnterKeyToDropDownOverlay(),this._dropDownCoordinator.hideOverlay()),this._searchBox.searchText.length>0&&(this._searchBox.clearSearchText(),this._searchBox.showPlaceholderText()),this._focusLostHandler()},t.prototype._searchBoxEnterKeyHandler=function(){this._dropDownCoordinator.isOverlayVisible?this._applyEnterKeyToDropDownOverlay():this._dropDownCoordinator.showOverlay()},t.prototype._searchBoxEscapeKeyHandler=function(t,e){this._searchBox.searchText.length>0&&(this._searchBox.clearSearchText(),this._searchBox.showPlaceholderText()),this._dropDownCoordinator.isOverlayVisible&&this._dropDownCoordinator.hideOverlay()},t.prototype._searchBoxFocusHandler=function(){this._focusHandler()},t.prototype._searchBoxMouseDownHandler=function(){0!==this._searchBox.searchText.length||this._dropDownCoordinator.isOverlayVisible||this._dropDownCoordinator.showOverlay()},t.prototype._searchBoxNavigationKeyHandler=function(t){this._dropDownCoordinator.isOverlayVisible?this._dropDownCoordinator.isOverlayVisible&&null!==this._dropDownCoordinator.itemSet&&(AutotaskDomSystem.KeyCode.isDown(t)?this._dropDownCoordinator.itemSet.moveTargetDown():AutotaskDomSystem.KeyCode.isUp(t)&&this._dropDownCoordinator.itemSet.moveTargetUp()):this._dropDownCoordinator.showOverlay()},t.prototype._searchBoxTextChangedHandler=function(t){t.length>0?this._searchBox.hidePlaceholderText():0===t.length&&this._searchBox.showPlaceholderText(),this._dropDownCoordinator.isOverlayVisible||(this._scrollOnOverShowingComplete=!0,this._dropDownCoordinator.showOverlay()),null!==this._dropDownCoordinator.itemSet&&this._dropDownCoordinator.itemSet.search(t)},t.prototype._showMaximumSelectionCountExceededMessage=function(){var t=this;this._searchBox.isAlertDialogTriggeringEvent=!0,this._alertDialog.show(this._maximumSelectionCountExceededMessage,(function(){t._searchBox.focusWithEvent(),t._searchBox.isAlertDialogTriggeringEvent=!1}))},t}();t.UserInteractionCoordinator=e}(AutotaskMultipleItemSelector||(AutotaskMultipleItemSelector={})),function(t){var e=function(){function t(t,e,n,i){this._item=t,this._chipInformation=e,this._selectDelegate=n,this._unselectDelegate=i}return Object.defineProperty(t.prototype,"isSelected",{get:function(){return this._item.isSelected},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"itemValue",{get:function(){return this._item.value},enumerable:!1,configurable:!0}),t.prototype.createChipInformation=function(){return this._chipInformation},t.prototype.select=function(){this._selectDelegate()},t.prototype.unselect=function(){this._unselectDelegate()},t}();t.ItemClickEventArgs=e}(AutotaskMultipleItemSelector||(AutotaskMultipleItemSelector={})),function(t){var e=function(t){function e(e,n){var i=t.call(this,e)||this;return i._itemCreators=n,i}return __extends(e,t),Object.defineProperty(e.prototype,"itemCreators",{get:function(){return this._itemCreators},enumerable:!1,configurable:!0}),e}(Autotask.LifecycleObject);t.ItemCreatorContainer=e}(AutotaskMultipleItemSelector||(AutotaskMultipleItemSelector={})),function(t){var e=function(){function e(e,n,i){var o=this;this._itemListElement=e,this._items=this._createItems(e,n),this._targetCoordinator=new t.ItemListTargetCoordinator(this._items,i),this._searchCoordinator=new t.ItemListSearchCoordinator(this._items),this._selectionCoordinator=new t.ItemListSelectionCoordinator(this._items),this._itemClickDelegate=null,this._isMouseOverTargetingEnabled=!0,this._mouseMoveDelegate=function(t){o._itemListMouseMoveListener(t)},this._mouseMoveInitialPositionX=null,this._mouseMoveInitialPositionY=null}return Object.defineProperty(e.prototype,"containsDefaultItem",{get:function(){var t=!1;return this._items.length>0&&null===this._items[0].value&&(t=!0),t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isTargetedItemSelected",{get:function(){var t=this._targetCoordinator.targetedItemIndex,e=!1;return null!==t&&(e=this._selectionCoordinator.isItemSelected(t)),e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"itemCount",{get:function(){return this._items.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"itemDisplayHeight",{get:function(){return this._items[0].displayHeight},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"itemTargetedHandler",{set:function(t){this._targetCoordinator.itemTargetedHandler=t},enumerable:!1,configurable:!0}),e.prototype.clearHighlighting=function(){this._searchCoordinator.clearHighlighting()},e.prototype.containsItem=function(t){for(var e=!1,n=0,i=this._items;n<i.length;n++){var o=i[n];if(AutotaskItemSelectionSystem.ItemValueComparer.equals(o.value,t)){e=!0;break}}return e},e.prototype.createChipInformationForTargetedItem=function(){var t=null;return null!==this._targetCoordinator.targetedItemIndex&&(t=this._items[this._targetCoordinator.targetedItemIndex].chipInformation),t},e.prototype.dispose=function(){for(var t=0,e=this._items;t<e.length;t++){e[t].dispose()}this._items.length=0,this._targetCoordinator.dispose()},e.prototype.enableMouseOverTargeting=function(){this._isMouseOverTargetingEnabled||this._enableMouseOverTargeting()},e.prototype.getTargetedItemValue=function(){var t=null,e=this._targetCoordinator.targetedItem;return null!==e&&(t=e.value),t},e.prototype.moveTargetDown=function(){this._isMouseOverTargetingEnabled&&this._disableMouseOverTargeting(),this._targetCoordinator.moveTargetDown()},e.prototype.moveTargetUp=function(){this._isMouseOverTargetingEnabled&&this._disableMouseOverTargeting(),this._targetCoordinator.moveTargetUp()},e.prototype.search=function(t){var e=this._searchCoordinator.search(t);return null!==e&&this._targetCoordinator.targetItemByIndex(e),null!==e},e.prototype.selectAndTargetByValue=function(t){for(var e=!1,n=0;n<this._items.length;n++)if(AutotaskItemSelectionSystem.ItemValueComparer.equals(this._items[n].value,t)){e=!0,this._selectionCoordinator.selectItemByIndex(n),this._targetCoordinator.targetItemByIndex(n);break}return e},e.prototype.selectItemByIndex=function(t){this._selectionCoordinator.selectItemByIndex(t)},e.prototype.selectItemByValue=function(t){this._selectionCoordinator.selectItemByValue(t)},e.prototype.selectTargetedItem=function(){var t=this._targetCoordinator.targetedItemIndex;null!==t&&this._selectionCoordinator.selectItemByIndex(t)},e.prototype.setItemClickHandler=function(t){this._itemClickDelegate=t},e.prototype.scrollToTargetedItem=function(){this._targetCoordinator.scrollToTargetedItem()},e.prototype.targetFirstItem=function(){this._targetCoordinator.targetFirstItem()},e.prototype.unselectAllItems=function(){this._selectionCoordinator.unselectAllItems()},e.prototype.unselectItemByIndex=function(t){this._selectionCoordinator.unselectItemByIndex(t)},e.prototype.unselectItemByValue=function(t){this._selectionCoordinator.unselectItemByValue(t)},e.prototype.unselectTargetedItem=function(){var t=this._targetCoordinator.targetedItemIndex;null!==t&&this._selectionCoordinator.unselectItemByIndex(t)},e.prototype._createItems=function(t,e){for(var n=this,i=[],o=t.firstElementChild,a=0;null!==o;){var r=e[a];if(null!==r){var s=r.create(o,(function(t){n._itemClickHandler(t)}),(function(t){n._itemMouseOverHandler(t)}));i.push(s)}a++,o=o.nextElementSibling}return i},e.prototype._enableMouseOverTargeting=function(){this._isMouseOverTargetingEnabled=!0,this._itemListElement.removeEventListener("mousemove",this._mouseMoveDelegate)},e.prototype._disableMouseOverTargeting=function(){this._mouseMoveInitialPositionX=null,this._mouseMoveInitialPositionY=null,this._isMouseOverTargetingEnabled=!1,this._itemListElement.addEventListener("mousemove",this._mouseMoveDelegate)},e.prototype._findItemElement=function(t){var e=null;if(t.classList.contains("Item"))e=t;else for(var n=t.parentElement;null!==n;){if(n.classList.contains("Item")){e=n;break}n=n.parentElement}return e},e.prototype._itemClickHandler=function(t){null!==this._itemClickDelegate&&this._itemClickDelegate(t,this._items[t],this._items[t].chipInformation)},e.prototype._itemListMouseMoveListener=function(t){if(null===this._mouseMoveInitialPositionX&&null===this._mouseMoveInitialPositionY)this._mouseMoveInitialPositionX=t.clientX,this._mouseMoveInitialPositionY=t.clientY;else if(null!==this._mouseMoveInitialPositionX&&null!==this._mouseMoveInitialPositionY&&(this._mouseMoveInitialPositionX-t.clientX!=0||this._mouseMoveInitialPositionY-t.clientY!=0)){this._enableMouseOverTargeting();var e=this._findItemElement(t.srcElement);if(null!==e){var n=parseInt(e.dataset.index,0);this._targetCoordinator.targetItemByIndex(n)}}},e.prototype._itemMouseOverHandler=function(t){this._isMouseOverTargetingEnabled&&this._targetCoordinator.targetItemByIndex(t)},e}();t.ItemList=e}(AutotaskMultipleItemSelector||(AutotaskMultipleItemSelector={})),function(t){var e=function(){function t(t){this._items=t,this._previousSearchText=null}return t.prototype.clearHighlighting=function(){this._clearHighlighting()},t.prototype.search=function(t){var e=null,n=!1,i=t.length;if(null!==this._previousSearchText&&i>0){var o=this._previousSearchText.length;if(i-1===o){if(t.substring(0,o)===this._previousSearchText){var a=t.charAt(o);e=this._performAdditiveSearch(t,i,a),n=!0}}else i+1===o&&t===this._previousSearchText.substring(0,i)&&(e=this._performSubtractiveSearch(t,i),n=!0);n||(e=this._performNewSearch(t,i)),this._previousSearchText=t}else null!==this._previousSearchText&&0===i?(this._clearHighlighting(),this._previousSearchText=null):(e=this._performNewSearch(t,i),this._previousSearchText=t);return e},t.prototype._clearHighlighting=function(){for(var t=0,e=this._items;t<e.length;t++){e[t].clearHighlighting()}},t.prototype._performAdditiveSearch=function(t,e,n){for(var i=null,o=0;o<this._items.length;o++){this._items[o].performAdditiveSearch(t,e,n)&&null===i&&(i=o)}return i},t.prototype._performNewSearch=function(t,e){for(var n=null,i=0;i<this._items.length;i++){this._items[i].performNewSearch(t,e)&&null===n&&(n=i)}return n},t.prototype._performSubtractiveSearch=function(t,e){for(var n=null,i=0;i<this._items.length;i++){this._items[i].performSubtractiveSearch(t,e)&&null===n&&(n=i)}return n},t}();t.ItemListSearchCoordinator=e}(AutotaskMultipleItemSelector||(AutotaskMultipleItemSelector={})),function(t){var e=function(){function t(t){this._items=t,this._selectedItemIndexes=[]}return t.prototype.isItemSelected=function(t){for(var e=!1,n=0,i=this._selectedItemIndexes;n<i.length;n++){if(i[n]===t){e=!0;break}}return e},t.prototype.selectItemByIndex=function(t){this.isItemSelected(t)||(this._items[t].select(),this._selectedItemIndexes.push(t))},t.prototype.selectItemByValue=function(t){for(var e=0;e<this._items.length;e++){var n=this._items[e];if(AutotaskItemSelectionSystem.ItemValueComparer.equals(n.value,t)){this.selectItemByIndex(e);break}}},t.prototype.unselectAllItems=function(){for(var t=0,e=this._items;t<e.length;t++){e[t].unselect()}this._selectedItemIndexes=[]},t.prototype.unselectItemByIndex=function(t){for(var e=0;e<this._selectedItemIndexes.length;e++)if(t===this._selectedItemIndexes[e]){this._items[t].unselect(),this._selectedItemIndexes.splice(e,1);break}},t.prototype.unselectItemByValue=function(t){for(var e=0;e<this._items.length;e++){var n=this._items[e];if(AutotaskItemSelectionSystem.ItemValueComparer.equals(n.value,t)){this.unselectItemByIndex(e);break}}},t}();t.ItemListSelectionCoordinator=e}(AutotaskMultipleItemSelector||(AutotaskMultipleItemSelector={})),function(t){var e=function(){function e(t,e){this._items=t,this._scrollCoordinator=e,this._itemTargetedHandler=null,this._targetedItemIndex=null}return Object.defineProperty(e.prototype,"itemTargetedHandler",{set:function(t){this._itemTargetedHandler=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"targetedItem",{get:function(){var t=null;return null!==this._targetedItemIndex&&(t=this._items[this._targetedItemIndex]),t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"targetedItemIndex",{get:function(){return this._targetedItemIndex},enumerable:!1,configurable:!0}),e.prototype.dispose=function(){this._itemTargetedHandler=null},e.prototype.moveTargetDown=function(){if(null!==this._targetedItemIndex&&this._targetedItemIndex!==this._items.length-1){var t=this._targetedItemIndex+1;this.targetItemByIndex(t);var e=this._items[t];this._scrollCoordinator.scroll(e.displayHeight,e.offsetTop)}},e.prototype.moveTargetUp=function(){if(null!==this._targetedItemIndex&&0!==this._targetedItemIndex){var t=this._targetedItemIndex-1;this.targetItemByIndex(t);var e=this._items[t];this._scrollCoordinator.scroll(e.displayHeight,e.offsetTop)}},e.prototype.removeTargeting=function(){this._removeTargeting()},e.prototype.scrollToTargetedItem=function(){var t=this.targetedItem;null!==t&&this._scrollCoordinator.scroll(t.displayHeight,t.offsetTop)},e.prototype.targetFirstItem=function(){0!==this._items.length&&this.targetItemByIndex(0)},e.prototype.targetItemByIndex=function(t){if(t!==this._targetedItemIndex){this._removeTargeting(),this._items[t].target(),this._targetedItemIndex=t;var e=this._items[this._targetedItemIndex];this._scrollCoordinator.scroll(e.displayHeight,e.offsetTop),this._raiseTargetChangedEvent(this._items[t])}},e.prototype._raiseTargetChangedEvent=function(e){if(null!==this._itemTargetedHandler){var n=new t.ItemTargetedEventArgs(e);this._itemTargetedHandler(n)}},e.prototype._removeTargeting=function(){null!==this._targetedItemIndex&&(this._items[this._targetedItemIndex].removeTargeting(),this._targetedItemIndex=null)},e}();t.ItemListTargetCoordinator=e}(AutotaskMultipleItemSelector||(AutotaskMultipleItemSelector={})),function(t){var e=function(){function e(e,n,i){var o=this,a=e.firstElementChild;this._itemList=new t.ItemList(a,n,i),this._itemList.setItemClickHandler((function(t,e,n){o._itemClick(t,e,n)})),this._itemClickDelegate=null}return Object.defineProperty(e.prototype,"isTargetedItemSelected",{get:function(){return this._itemList.isTargetedItemSelected},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"itemCount",{get:function(){return this._itemList.itemCount},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"itemDisplayHeight",{get:function(){return this._itemList.itemDisplayHeight},enumerable:!1,configurable:!0}),e.prototype.clearHighlighting=function(){this._itemList.clearHighlighting()},Object.defineProperty(e.prototype,"containsDefaultItem",{get:function(){return this._itemList.containsDefaultItem},enumerable:!1,configurable:!0}),e.prototype.createChipInformationForTargetedItem=function(){return this._itemList.createChipInformationForTargetedItem()},e.prototype.containsItem=function(t){return this._itemList.containsItem(t)},e.prototype.dispose=function(){this._itemList.dispose()},e.prototype.enableMouseOverTargeting=function(){this._itemList.enableMouseOverTargeting()},e.prototype.getTargetedItemValue=function(){return this._itemList.getTargetedItemValue()},e.prototype.moveTargetDown=function(){this._itemList.moveTargetDown()},e.prototype.moveTargetUp=function(){this._itemList.moveTargetUp()},e.prototype.search=function(t){return this._itemList.search(t)},e.prototype.selectAndTargetByValue=function(t){return this._itemList.selectAndTargetByValue(t)},e.prototype.selectItemByValue=function(t){this._itemList.selectItemByValue(t)},e.prototype.selectTargetedItem=function(){this._itemList.selectTargetedItem()},e.prototype.setItemClickHandler=function(t){this._itemClickDelegate=t},e.prototype.setItemTargetedHandler=function(t){this._itemList.itemTargetedHandler=t},e.prototype.scrollToTargetedItem=function(){this._itemList.scrollToTargetedItem()},e.prototype.targetFirstItem=function(){this._itemList.targetFirstItem()},e.prototype.unselectAllItems=function(){this._itemList.unselectAllItems()},e.prototype.unselectItemByValue=function(t){this._itemList.unselectItemByValue(t)},e.prototype.unselectTargetedItem=function(){this._itemList.unselectTargetedItem()},e.prototype._itemClick=function(e,n,i){var o=this;if(null!==this._itemClickDelegate){var a=new t.ItemClickEventArgs(n,i,(function(){o._itemList.selectItemByIndex(e)}),(function(){o._itemList.unselectItemByIndex(e)}));this._itemClickDelegate(a)}},e}();t.ItemSet=e}(AutotaskMultipleItemSelector||(AutotaskMultipleItemSelector={})),function(t){var e=function(){function t(t){this._item=t}return Object.defineProperty(t.prototype,"item",{get:function(){return this._item},enumerable:!1,configurable:!0}),t}();t.ItemTargetedEventArgs=e}(AutotaskMultipleItemSelector||(AutotaskMultipleItemSelector={})),function(t){var e=function(){function t(t,e,n,i){var o=this;this._itemElement=t,this._chipInformation=e,this._clickDelegate=n,this._mouseOverDelegate=i;var a=AutotaskDomSystem.Document.getChildElementsByClassName(t,"Text");this._leftHalfTextElement=a[0],this._rightHalfTextElement=a[1],this._leftHalfOriginalText=this._leftHalfTextElement.textContent,this._rightHalfOriginalText=this._rightHalfTextElement.textContent,this._areInitialsMatched=!1,this._isLeftTextMatched=!1,this._isRightTextMatched=!1,this._isSelected=!1,this._itemSearchServices=new AutotaskEditorSystem.ItemSearchServices,this._itemElement.addEventListener("click",(function(){o._itemClickListener()})),this._itemElement.addEventListener("mouseover",(function(){o._itemMouseOverListener()}))}return Object.defineProperty(t.prototype,"chipInformation",{get:function(){return this._chipInformation},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"displayHeight",{get:function(){return this._itemElement.clientHeight},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"offsetTop",{get:function(){return this._itemElement.offsetTop},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return this._chipInformation.value},enumerable:!1,configurable:!0}),t.prototype.clearHighlighting=function(){(this._isLeftTextMatched||this._areInitialsMatched)&&this._clearLeftHalfHighlighting(),(this._isRightTextMatched||this._areInitialsMatched)&&this._clearRightHalfHighlighting(),this._areInitialsMatched&&(this._areInitialsMatched=!1)},t.prototype.dispose=function(){this._clickDelegate=null,this._mouseOverDelegate=null},t.prototype.performAdditiveSearch=function(t,e,n){var i=!0,o=!0,a=!0,r=!1,s=!0,l=!1;return this._isLeftTextMatched&&(r=this._itemSearchServices.attemptAdditiveSearchForElement(e,n,this._leftHalfTextElement,this._leftHalfOriginalText))&&(i=!1,a=!1),this._isRightTextMatched&&(l=this._itemSearchServices.attemptAdditiveSearchForElement(e,n,this._rightHalfTextElement,this._rightHalfOriginalText))&&(o=!1,s=!1),this._areInitialsMatched=this._attemptInitialHighlighting(t,e,a,s),this._clearHighlighting(this._areInitialsMatched,i,o),r||l||this._areInitialsMatched},t.prototype.performNewSearch=function(t,e){var n=!0,i=!0,o=!0,a=!0,r=this._attemptNewSearchForLeftTextElement(t,e);r&&(n=!1,o=!1);var s=this._attemptNewSearchForRightTextElement(t,e);return s&&(i=!1,a=!1),this._areInitialsMatched=this._attemptInitialHighlighting(t,e,o,a),this._clearHighlighting(this._areInitialsMatched,n,i),r||s||this._areInitialsMatched},t.prototype.performSubtractiveSearch=function(t,e){var n=!0,i=!0,o=!1,a=!1,r=!1,s=!1;return this._isLeftTextMatched?(this._itemSearchServices.highlightSubtractiveSearchForElement(e,this._leftHalfTextElement,this._leftHalfOriginalText),n=!1,a=!0):(a=this._attemptNewSearchForLeftTextElement(t,e))?n=!1:o=!0,this._isRightTextMatched?(this._itemSearchServices.highlightSubtractiveSearchForElement(e,this._rightHalfTextElement,this._rightHalfOriginalText),i=!1,s=!0):(s=this._attemptNewSearchForRightTextElement(t,e))?i=!1:r=!0,this._areInitialsMatched=this._attemptInitialHighlighting(t,e,o,r),this._clearHighlighting(this._areInitialsMatched,n,i),a||s||this._areInitialsMatched},t.prototype.removeTargeting=function(){this._itemElement.setAttribute("data-is-targeted","false")},t.prototype.select=function(){this._isSelected||(this._itemElement.setAttribute("data-is-selected","true"),this._isSelected=!0)},t.prototype.target=function(){this._itemElement.setAttribute("data-is-targeted","true")},t.prototype.unselect=function(){this._isSelected&&(this._itemElement.setAttribute("data-is-selected","false"),this._isSelected=!1)},t.prototype._attemptInitialHighlighting=function(t,e,n,i){var o=!1;if(2===e&&(n||i)){var a=this._leftHalfOriginalText.charAt(0),r=this._rightHalfOriginalText.charAt(0);t.charAt(0).toLowerCase()===a.toLowerCase()&&t.charAt(1).toLowerCase()===r.toLowerCase()&&(n&&this._itemSearchServices.highlightText(this._leftHalfTextElement,this._leftHalfOriginalText,a,this._leftHalfOriginalText.length,1),i&&this._itemSearchServices.highlightText(this._rightHalfTextElement,this._rightHalfOriginalText,r,this._rightHalfOriginalText.length,1),o=!0)}return o},t.prototype._attemptNewSearchForLeftTextElement=function(t,e){var n=this._itemSearchServices.attemptNewSearchForElement(t,e,this._leftHalfTextElement,this._leftHalfOriginalText);return n&&(this._isLeftTextMatched=!0),n},t.prototype._attemptNewSearchForRightTextElement=function(t,e){var n=this._itemSearchServices.attemptNewSearchForElement(t,e,this._rightHalfTextElement,this._rightHalfOriginalText);return n&&(this._isRightTextMatched=!0),n},t.prototype._clearHighlighting=function(t,e,n){t?(e&&(this._isLeftTextMatched=!1),n&&(this._isRightTextMatched=!1)):(e&&this._clearLeftHalfHighlighting(),n&&this._clearRightHalfHighlighting())},t.prototype._clearLeftHalfHighlighting=function(){this._itemSearchServices.clearHighlighting(this._leftHalfTextElement,this._leftHalfOriginalText),this._isLeftTextMatched=!1},t.prototype._clearRightHalfHighlighting=function(){this._itemSearchServices.clearHighlighting(this._rightHalfTextElement,this._rightHalfOriginalText),this._isRightTextMatched=!1},t.prototype._itemClickListener=function(){if(null!==this._clickDelegate){var t=parseInt(this._itemElement.dataset.index,10);this._clickDelegate(t)}},t.prototype._itemMouseOverListener=function(){if(null!==this._mouseOverDelegate){var t=parseInt(this._itemElement.dataset.index,10);this._mouseOverDelegate(t)}},t}();t.PersonNameItem=e}(AutotaskMultipleItemSelector||(AutotaskMultipleItemSelector={})),function(t){var e=function(){function e(t){this._chipInformation=t}return e.prototype.create=function(e,n,i){return new t.PersonNameItem(e,this._chipInformation,n,i)},e}();t.PersonNameItemCreator=e}(AutotaskMultipleItemSelector||(AutotaskMultipleItemSelector={})),function(t){var e=function(){function t(t,e,n,i){var o=this;this._itemElement=t,this._chipInformation=e,this._clickDelegate=n,this._mouseOverDelegate=i,this._isHighlighted=!1,this._isSelected=!1,this._itemSearchServices=new AutotaskEditorSystem.ItemSearchServices;var a=t.lastElementChild;this._originalText=this._itemElement.textContent,this._textElement=a.firstChild,this._itemElement.addEventListener("click",(function(){o._itemClickListener()})),this._itemElement.addEventListener("mouseover",(function(){o._itemMouseOverListener()}))}return Object.defineProperty(t.prototype,"chipInformation",{get:function(){return this._chipInformation},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"displayHeight",{get:function(){return this._itemElement.clientHeight},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"offsetTop",{get:function(){return this._itemElement.offsetTop},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return this._chipInformation.value},enumerable:!1,configurable:!0}),t.prototype.clearHighlighting=function(){if(this._isHighlighted){for(var t=document.createTextNode(this._originalText);null!==this._textElement.firstChild;)this._textElement.removeChild(this._textElement.firstChild);this._textElement.appendChild(t),this._isHighlighted=!1}},t.prototype.dispose=function(){this._clickDelegate=null,this._mouseOverDelegate=null},t.prototype.performAdditiveSearch=function(t,e,n){var i=!1;return this._isHighlighted&&((i=this._itemSearchServices.attemptAdditiveSearchForElement(e,n,this._textElement,this._originalText))||this._clearHighlighting()),i},t.prototype.performNewSearch=function(t,e){var n=this._attemptNewSearchForElement(t,e,this._textElement,this._originalText);return!n&&this._isHighlighted&&this._clearHighlighting(),n},t.prototype.performSubtractiveSearch=function(t,e){var n=!1;return this._isHighlighted?(this._itemSearchServices.highlightSubtractiveSearchForElement(e,this._textElement,this._originalText),n=!0):n=this._attemptNewSearchForElement(t,e,this._textElement,this._originalText),n},t.prototype.removeTargeting=function(){this._itemElement.setAttribute("data-is-targeted","false")},t.prototype.select=function(){this._isSelected||(this._itemElement.setAttribute("data-is-selected","true"),this._isSelected=!0)},t.prototype.target=function(){this._itemElement.setAttribute("data-is-targeted","true")},t.prototype.unselect=function(){this._isSelected&&(this._itemElement.setAttribute("data-is-selected","false"),this._isSelected=!1)},t.prototype._attemptNewSearchForElement=function(t,e,n,i){var o=this._itemSearchServices.attemptNewSearchForElement(t,e,n,i);return o&&(this._isHighlighted=!0),o},t.prototype._clearHighlighting=function(){this._itemSearchServices.clearHighlighting(this._textElement,this._originalText),this._isHighlighted=!1},t.prototype._itemClickListener=function(){if(null!==this._clickDelegate){var t=parseInt(this._itemElement.dataset.index,10);this._clickDelegate(t)}},t.prototype._itemMouseOverListener=function(){if(null!==this._mouseOverDelegate){var t=parseInt(this._itemElement.dataset.index,10);this._mouseOverDelegate(t)}},t}();t.SingleTextItem=e}(AutotaskMultipleItemSelector||(AutotaskMultipleItemSelector={})),function(t){var e=function(){function e(t){this._chipInformation=t}return e.prototype.create=function(e,n,i){return new t.SingleTextItem(e,this._chipInformation,n,i)},e}();t.SingleTextItemCreator=e}(AutotaskMultipleItemSelector||(AutotaskMultipleItemSelector={})),function(t){var e=function(){function t(){this._data={}}return Object.defineProperty(t.prototype,"data",{get:function(){return this._data},enumerable:!1,configurable:!0}),t.prototype.add=function(t,e){this._validateKey(t),null!==e&&(this._data[t]=e)},t.prototype.addBoolean=function(t,e){if(this._validateKey(t),null!==e){if("boolean"!=typeof e)return autotask.throwException("The value must an instance of Boolean.");this._data[t]=e.toString()}else this._data[t]=null},t.prototype.addDataDictionary=function(t,e){if(this._validateKey(t),null!==e){if(!(e instanceof AutotaskRequestDataSystem.RequestDataDictionary))return autotask.throwException("The value must be an instance of AutotaskRequestDataSystem.RequestDataDictionary.");var n=e.data;for(var i in n)n.hasOwnProperty(i)&&(this._data[t.concat(".",i)]=n[i])}else this._data[t]=null},t.prototype.deprecatedAddDataDictionary=function(t,e){if(this._validateKey(t),null!==e){if(!(e instanceof AutotaskRequestDataSystem.RequestDataDictionary))return autotask.throwException("The value must be an instance of AutotaskRequestDataSystem.RequestDataDictionary.");var n=e.data;for(var i in n)n.hasOwnProperty(i)&&(this._data[i]=n[i])}else this._data[t]=null},t.prototype.addInteger=function(t,e){if(this._validateKey(t),null!==e){if("number"!=typeof e)return autotask.throwException("The value must be an instance of Number.");this._data[t]=window.autotask.convert.integerToString(e)}else this._data[t]=null},t.prototype.addItemValue=function(t,e){if(this._validateKey(t),null!==e){e instanceof AutotaskItemSelectionSystem.ItemValue||autotask.throwException("value must be an instance of AutotaskRequestDataSystem.SerializedRequestData.");var n=e.__createRequestData(t);for(var i in n)n.hasOwnProperty(i)&&(this._data[i]=n[i])}else this._data[t]=null},t.prototype.addItemValueCollection=function(t,e){if(this._validateKey(t),null!==e){e instanceof AutotaskItemSelectionSystem.ItemValueCollection||autotask.throwException("value must be an instance of AutotaskRequestDataSystem.SerializedRequestData.");var n=e.__createRequestData(t);for(var i in n)n.hasOwnProperty(i)&&(this._data[i]=n[i])}else this._data[t]=null},t.prototype.addString=function(t,e){if(this._validateKey(t),null!==e&&"string"!=typeof e)return autotask.throwException("The value must be an instance of String.");this._data[t]=e},t.prototype._validateKey=function(t){this.data.hasOwnProperty(t)&&autotask.throwException("The ajax data dictionary already has an entry for the key: "+t)},t}();t.ApplyFiltersEventArgs=e}(AutotaskMultipleRecipientSelector||(AutotaskMultipleRecipientSelector={})),function(t){var e=function(){function e(t,e,n,i){var o=this;this._autoCompleteRoute=e,this._overlay=t,this._overlayLaunchingElement=n,this._applyFiltersHandler=i,this._ajaxRequestCanceler=null,this._timeoutDuration=300,this._timeoutId=null,this._overlay.addHideCompletedHandler((function(){o._overlayHideCompletedHandler()}))}return Object.defineProperty(e.prototype,"isOverlayVisible",{get:function(){return this._overlay.isVisible},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isSearchInProgress",{get:function(){return null!==this._ajaxRequestCanceler},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"itemSet",{get:function(){return this._overlay.itemSet},enumerable:!1,configurable:!0}),e.prototype.autoComplete=function(t,e){var n=this;this._cancelTimer(),this._startTimer((function(){null!==n._timeoutId&&(n._timeoutId=null,n._cancelAutoCompleteRequest(),n._overlay.show(n._overlayLaunchingElement),n._overlay.clearItemSet(),n._overlay.showLoadingIndicator(),n._autoComplete(t,e))}))},e.prototype.cancelAutoComplete=function(){this._cancelTimer(),this._cancelAutoCompleteRequest()},e.prototype.hideOverlay=function(){this._hideOverlay()},e.prototype.setItemClickHandler=function(t){this._overlay.setItemClickHandler(t)},e.prototype.setOverlayHideCompletedHandler=function(t){this._overlay.setHideCompletedHandler(t)},e.prototype.setOverlayMouseDownHandler=function(t){this._overlay.setMouseDownHandler(t)},e.prototype.setOverlayMouseLeaveHandler=function(t){this._overlay.setMouseDownHandler(t)},e.prototype.showOverlay=function(){this._overlay.show(this._overlayLaunchingElement)},e.prototype._autoComplete=function(e,n){var i=this,o=new t.ApplyFiltersEventArgs,a=this._autoCompleteRoute.get_searchCriteriaParameterName();o.addString(a,e),this._applyFiltersHandler(o);this._ajaxRequestCanceler=this._autoCompleteRoute.autoComplete(o.data,(function(t,o,a){i._autoCompleteSuccessHandler(t,o,a,e,n)}))},e.prototype._autoCompleteSuccessHandler=function(t,e,n,i,o){if(this._ajaxRequestCanceler=null,this._overlay.isVisible)if(null!==t&&null!==e&&null!==n){if(this._overlay.hideLoadingIndicator(),this._overlay.applyItemSetHtml(t,e,n),null!==this._overlay.itemSet){for(var a=0,r=o;a<r.length;a++){var s=r[a];this._overlay.itemSet.selectItemByValue(s)}this._overlay.itemSet.search(i)}}else this._hideOverlay()},e.prototype._cancelAutoCompleteRequest=function(){null!==this._ajaxRequestCanceler&&(this._ajaxRequestCanceler.__cancelRequest(),this._ajaxRequestCanceler=null)},e.prototype._cancelTimer=function(){null!==this._timeoutId&&(window.clearTimeout(this._timeoutId),this._timeoutId=null)},e.prototype._hideOverlay=function(){this._overlay.hide()},e.prototype._overlayHideCompletedHandler=function(){this._cancelAutoCompleteRequest(),this._cancelTimer(),null!==this._overlay.itemSet&&this._overlay.clearItemSet()},e.prototype._startTimer=function(t){this._timeoutId=window.setTimeout(t,this._timeoutDuration)},e}();t.AutoCompleteCoordinator=e}(AutotaskMultipleRecipientSelector||(AutotaskMultipleRecipientSelector={})),function(t){var e=function(e){function n(t){var i=e.call(this,t,!1)||this,o=AutotaskDomSystem.Document.getElementById(t).firstElementChild;return i._contentElement=o.firstElementChild,i._loadingIndicatorElement=i._contentElement.firstElementChild,i._contentElement.style.minHeight=n._defaultContentMinHeight.toString()+"px",i._contentElement.style.maxHeight=n._contentMaxHeight.toString()+"px",i._defaultStyleCoordinator=new AutotaskOverlaySystem.DefaultStyleCoordinator(i._overlayElementStyleApplicator),i._itemClickHandler=null,i._itemSet=null,i._mouseDownHandler=null,i._mouseLeaveHandler=null,i._contentElement.addEventListener("mousedown",(function(t){i._mouseDownListener(t)})),i._contentElement.addEventListener("mouseleave",(function(){i._mouseLeaveListener()})),i._contentElement.addEventListener("wheel",(function(t){i._mouseWheelListener(t)})),i}return __extends(n,e),Object.defineProperty(n.prototype,"itemSet",{get:function(){return this._itemSet},enumerable:!1,configurable:!0}),n.prototype.clearItemSet=function(){null!==this._itemSet&&(null!==this._contentElement.lastChild&&this._contentElement.removeChild(this._contentElement.lastChild),this._itemSet.dispose(),this._itemSet=null)},n.prototype.hideLoadingIndicator=function(){this._loadingIndicatorElement.classList.remove("Active")},n.prototype.applyItemSetHtml=function(t,e,n){this.clearItemSet(),this._contentElement.insertAdjacentHTML("beforeend",t);var i=AutotaskDomSystem.Document.getChildElementByClassName(this._contentElement,"ItemSet");this._intitalizeItemSet(i,e,n)},n.prototype.setHideCompletedHandler=function(t){this.addHideCompletedHandler(t)},n.prototype.setItemClickHandler=function(t){this._itemClickHandler=t},n.prototype.setMouseDownHandler=function(t){this._mouseDownHandler=t},n.prototype.setMouseLeaveHandler=function(t){this._mouseLeaveHandler=t},n.prototype.show=function(t){this.showLoadingIndicator();var e=t.clientWidth-2;this._contentElement.style.minWidth=e.toString()+"px",this._contentElement.style.maxWidth=e.toString()+"px",this._show(t)},n.prototype.showLoadingIndicator=function(){this._loadingIndicatorElement.classList.add("Active")},Object.defineProperty(n.prototype,"_delayBeforeHiding",{get:function(){return 0},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"_delayBeforeShowing",{get:function(){return 0},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"_styleCoordinator",{get:function(){return this._defaultStyleCoordinator},enumerable:!1,configurable:!0}),n.prototype._createPositionCoordinator=function(t){var e=new AutotaskOverlaySystem.PositionCoordinator,n=new AutotaskPositionApplicatorSystem.Default(this._defaultStyleCoordinator,t,null,null);return e.addPositionAndApplicator(new AutotaskPositionSystem.BottomAlignedLeft(0,-1),n),e},n.prototype._intitalizeItemSet=function(e,n,i){var o=this;this._itemSet=new t.RecipientItemSet(e,n,i,(function(t){o._itemSetItemClickHandler(t)})),this._itemSet.targetFirstItem()},n.prototype._itemSetItemClickHandler=function(t){null!==this._itemClickHandler&&this._itemClickHandler(t)},n.prototype._mouseDownListener=function(t){t.preventDefault(),null!==this._mouseDownHandler&&this._mouseDownHandler()},n.prototype._mouseLeaveListener=function(){null!==this._mouseLeaveHandler&&this._mouseLeaveHandler()},n.prototype._mouseWheelListener=function(t){var e=this._contentElement.scrollTop,n=this._contentElement.scrollHeight,i=this._contentElement.clientHeight;!1===(t.deltaY<0?e>0:e+i<n)&&t.preventDefault()},n._contentMaxHeight=364,n._defaultContentMinHeight=106,n}(AutotaskOverlaySystem.ContextOverlay);t.AutoCompleteOverlay=e}(AutotaskMultipleRecipientSelector||(AutotaskMultipleRecipientSelector={})),function(t){var e=function(){function t(t){this._editorInstance=t}return Object.defineProperty(t.prototype,"editorInstance",{get:function(){return this._editorInstance},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"instanceId",{get:function(){return this._editorInstance.id},enumerable:!1,configurable:!0}),t}();t.ChangeEventArgs=e}(AutotaskMultipleRecipientSelector||(AutotaskMultipleRecipientSelector={})),function(t){var e=function(t){function e(e,n){return t.call(this,e,n)||this}return __extends(e,t),e}(AutotaskEditorSystem.ChipGenerator);t.ChipGenerator=e}(AutotaskMultipleRecipientSelector||(AutotaskMultipleRecipientSelector={})),function(t){var e=function(){function e(e,n,i,o,a,r){this._value=e,this._text=n,this._isOverlayEnabled=null!==r||i,this._iconGenerator=o,this._emails=AutotaskEditorSystem.ArrayCopier.copy(a),this._contextOverlayRoute=r,this._chipGenerator=new t.ChipGenerator(n,o)}return Object.defineProperty(e.prototype,"chipGenerator",{get:function(){return this._chipGenerator},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"overlayRoute",{get:function(){return this._contextOverlayRoute},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"emails",{get:function(){return AutotaskEditorSystem.ArrayCopier.copy(this._emails)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isOverlayEnabled",{get:function(){return this._isOverlayEnabled},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!1,configurable:!0}),e.prototype.copy=function(){var t=AutotaskEditorSystem.ArrayCopier.copy(this._emails);return new e(this._value,this._text,this.isOverlayEnabled,this._iconGenerator,t,this._contextOverlayRoute)},e.prototype.__updateContextOverlayRoute=function(t){this._contextOverlayRoute=t},e.prototype.__updateEmailAddresses=function(t){this._emails=AutotaskEditorSystem.ArrayCopier.copy(t)},e}();t.ChipInformation=e}(AutotaskMultipleRecipientSelector||(AutotaskMultipleRecipientSelector={})),function(t){var e=function(t){function e(e,n,i){var o=t.call(this,e,!0,n,i)||this;return o._chipInformation=n,o._enableContextOverlay(),o}return __extends(e,t),Object.defineProperty(e.prototype,"chipInformation",{get:function(){return AutotaskEditorSystem.ArrayCopier.copy(this._chipInformation,(function(t){return t.copy()}))},set:function(t){this._clear();for(var e=0,n=t;e<n.length;e++){var i=n[e];this.insert(i.copy())}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"count",{get:function(){return this._chipInformation.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return this.values},enumerable:!1,configurable:!0}),e.prototype.insert=function(t){var e=t.copy();this._insert(e),this._chipInformation.push(e)},e.prototype.getAllEmails=function(){for(var t=[],e=0,n=this._chipInformation;e<n.length;e++)for(var i=0,o=n[e].emails;i<o.length;i++){var a=o[i];null!==a&&a.length>0&&t.indexOf(a)<0&&t.push(a)}return t},e.prototype.updateChips=function(t){for(var e=0;e<t.length;e++)this._updateChip(t[e])},e.prototype._clear=function(){t.prototype._clear.call(this),this._chipInformation.splice(0)},e.prototype._determineContextOverlayRoute=function(t){var e=this._chipInformation[t].overlayRoute;return null!==e?e:autotask.throwException("Recipient selection chip context overlay route is null.")},e.prototype._removeByIndex=function(e){t.prototype._removeByIndex.call(this,e),this._chipInformation.splice(e,1)},e.prototype._updateChip=function(t){var e=this._findIndexByValue(t.value);if(null!==e){var n=this._chipInformation[e];n.__updateEmailAddresses(t.emailAddresses),n.__updateContextOverlayRoute(t.contextOverlayRoute)}},e}(AutotaskEditorSystem.ChipList);t.ChipList=e}(AutotaskMultipleRecipientSelector||(AutotaskMultipleRecipientSelector={})),function(t){var e=function(){function t(t){this._chipInformation=t}return Object.defineProperty(t.prototype,"chipInformation",{get:function(){return this._chipInformation},enumerable:!1,configurable:!0}),t}();t.DialogSelectedEventArgs=e}(AutotaskMultipleRecipientSelector||(AutotaskMultipleRecipientSelector={})),function(t){var e=function(){function t(t,e){this._overlay=t,this._overlayLaunchingElement=e}return Object.defineProperty(t.prototype,"isOverlayVisible",{get:function(){return this._overlay.isVisible},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"itemSet",{get:function(){return this._overlay.itemSet},enumerable:!1,configurable:!0}),t.prototype.hideOverlay=function(){this._overlay.hide()},t.prototype.positionOverlay=function(){this._overlay.__reposition()},t.prototype.setItemClickHandler=function(t){this._overlay.setItemClickHandler(t)},t.prototype.setOverlayHideCompletedHandler=function(t){this._overlay.setHideCompletedHandler(t)},t.prototype.setOverlayMouseDownHandler=function(t){this._overlay.setMouseDownHandler(t)},t.prototype.setOverlayMouseLeaveHandler=function(t){this._overlay.setMouseDownHandler(t)},t.prototype.showOverlay=function(){this._overlay.show(this._overlayLaunchingElement)},t}();t.DropDownCoordinator=e}(AutotaskMultipleRecipientSelector||(AutotaskMultipleRecipientSelector={})),function(t){var e=function(e){function n(t,i,o){var a=e.call(this,t,!1)||this,r=AutotaskDomSystem.Document.getElementById(t).firstElementChild;return a._contentElement=r.firstElementChild,a._contentElement.style.minHeight=n._defaultContentMinHeight.toString()+"px",a._contentElement.style.maxHeight=n._contentMaxHeight.toString()+"px",a._defaultStyleCoordinator=new AutotaskOverlaySystem.DefaultStyleCoordinator(a._overlayElementStyleApplicator),a._itemClickHandler=null,a._mouseDownHandler=null,a._mouseLeaveHandler=null,a._contentElement.addEventListener("mousedown",(function(t){a._mouseDownListener(t)})),a._contentElement.addEventListener("mouseleave",(function(){a._mouseLeaveListener()})),a._contentElement.addEventListener("wheel",(function(t){a._mouseWheelListener(t)})),a._itemSet=a._createItemSet(a._contentElement.firstElementChild,i,o),a}return __extends(n,e),Object.defineProperty(n.prototype,"itemSet",{get:function(){return this._itemSet},enumerable:!1,configurable:!0}),n.prototype.setHideCompletedHandler=function(t){this.addHideCompletedHandler(t)},n.prototype.setItemClickHandler=function(t){this._itemClickHandler=t},n.prototype.setMouseDownHandler=function(t){this._mouseDownHandler=t},n.prototype.setMouseLeaveHandler=function(t){this._mouseLeaveHandler=t},n.prototype.show=function(t){var e=t.clientWidth-2;this._contentElement.style.minWidth=e.toString()+"px",this._contentElement.style.maxWidth=e.toString()+"px",this._show(t)},Object.defineProperty(n.prototype,"_delayBeforeHiding",{get:function(){return 0},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"_delayBeforeShowing",{get:function(){return 0},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"_styleCoordinator",{get:function(){return this._defaultStyleCoordinator},enumerable:!1,configurable:!0}),n.prototype._createItemSet=function(e,n,i){var o=this,a=new t.DynamicRecipientItemSet(e,n,i,(function(t){o._itemSetItemClickHandler(t)}));return a.targetFirstItem(),a},n.prototype._createPositionCoordinator=function(t){var e=new AutotaskOverlaySystem.PositionCoordinator,n=new AutotaskPositionApplicatorSystem.Default(this._defaultStyleCoordinator,t,null,null);return e.addPositionAndApplicator(new AutotaskPositionSystem.BottomAlignedLeft(0,-1),n),e},n.prototype._itemSetItemClickHandler=function(t){null!==this._itemClickHandler&&this._itemClickHandler(t)},n.prototype._mouseDownListener=function(t){t.preventDefault(),null!==this._mouseDownHandler&&this._mouseDownHandler()},n.prototype._mouseLeaveListener=function(){null!==this._mouseLeaveHandler&&this._mouseLeaveHandler()},n.prototype._mouseWheelListener=function(t){var e=this._contentElement.scrollTop,n=this._contentElement.scrollHeight,i=this._contentElement.clientHeight;!1===(t.deltaY<0?e>0:e+i<n)&&t.preventDefault()},n._contentMaxHeight=302,n._defaultContentMinHeight=106,n}(AutotaskOverlaySystem.ContextOverlay);t.DropDownOverlay=e}(AutotaskMultipleRecipientSelector||(AutotaskMultipleRecipientSelector={})),function(t){var e=function(){function t(t,e,n,i){var o=this,a=AutotaskDomSystem.Document.getChildElementByClassName(t,"Text");this._countElement=AutotaskDomSystem.Document.getChildElementByClassName(a,"SecondaryText"),this._itemElement=t,this._chipInformation=e,this._clickDelegate=n,this._mouseOverDelegate=i,this._isHighlighted=!1,this._isSelected=!1,this._itemSearchServices=new AutotaskEditorSystem.ItemSearchServices;var r=t.lastElementChild;this._originalText=this._itemElement.textContent,this._textElement=r.firstChild,this._itemElement.addEventListener("click",(function(){o._itemClickListener()})),this._itemElement.addEventListener("mouseover",(function(){o._itemMouseOverListener()}))}return Object.defineProperty(t.prototype,"chipInformation",{get:function(){return this._chipInformation},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"displayHeight",{get:function(){return this._itemElement.clientHeight},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return this._chipInformation.value},enumerable:!1,configurable:!0}),t.prototype.clearHighlighting=function(){if(this._isHighlighted){for(var t=document.createTextNode(this._originalText);null!==this._textElement.firstChild;)this._textElement.removeChild(this._textElement.firstChild);this._textElement.appendChild(t),this._isHighlighted=!1}},t.prototype.dispose=function(){this._clickDelegate=null,this._mouseOverDelegate=null},t.prototype.performAdditiveSearch=function(t,e,n){var i=!1;return this._isHighlighted&&((i=this._itemSearchServices.attemptAdditiveSearchForElement(e,n,this._textElement,this._originalText))||this._clearHighlighting()),i},t.prototype.performNewSearch=function(t,e){var n=this._attemptNewSearchForElement(t,e,this._textElement,this._originalText);return!n&&this._isHighlighted&&this._clearHighlighting(),n},t.prototype.performSubtractiveSearch=function(t,e){var n=!1;return this._isHighlighted?(this._itemSearchServices.highlightSubtractiveSearchForElement(e,this._textElement,this._originalText),n=!0):n=this._attemptNewSearchForElement(t,e,this._textElement,this._originalText),n},t.prototype.removeTargeting=function(){this._itemElement.setAttribute("data-is-targeted","false")},t.prototype.select=function(){this._isSelected||(this._itemElement.setAttribute("data-is-selected","true"),this._isSelected=!0)},t.prototype.target=function(){this._itemElement.setAttribute("data-is-targeted","true")},t.prototype.unselect=function(){this._isSelected&&(this._itemElement.setAttribute("data-is-selected","false"),this._isSelected=!1)},t.prototype.update=function(t){this._chipInformation.__updateEmailAddresses(t.emailAddresses),this._chipInformation.__updateContextOverlayRoute(t.contextOverlayRoute),this._countElement.textContent="("+t.emailAddresses.length.toString()+")"},t.prototype._attemptNewSearchForElement=function(t,e,n,i){var o=this._itemSearchServices.attemptNewSearchForElement(t,e,n,i);return o&&(this._isHighlighted=!0),o},t.prototype._clearHighlighting=function(){this._itemSearchServices.clearHighlighting(this._textElement,this._originalText),this._isHighlighted=!1},t.prototype._itemClickListener=function(){if(null!==this._clickDelegate){var t=parseInt(this._itemElement.dataset.index,10);this._clickDelegate(t)}},t.prototype._itemMouseOverListener=function(){if(null!==this._mouseOverDelegate){var t=parseInt(this._itemElement.dataset.index,10);this._mouseOverDelegate(t)}},t}();t.DynamicRecipientItem=e}(AutotaskMultipleRecipientSelector||(AutotaskMultipleRecipientSelector={})),function(t){var e=function(){function e(t){this._chipInformation=t}return e.prototype.create=function(e,n,i){return new t.DynamicRecipientItem(e,this._chipInformation,n,i)},e}();t.DynamicRecipientItemCreator=e}(AutotaskMultipleRecipientSelector||(AutotaskMultipleRecipientSelector={})),function(t){var e=function(){function e(e,n,i,o){this._items=this._createItems(e,n),this._itemClickDelegate=i,this._targetChangeDelegate=o,this._isMouseOverTargetingEnabled=!0,this._targetCoordinator=new t.ItemListTargetCoordinator(this._items),this._selectionCoordinator=new t.ItemListSelectionCoordinator(this._items)}return Object.defineProperty(e.prototype,"isMouseOverTargetingEnabled",{get:function(){return this._isMouseOverTargetingEnabled},set:function(t){this._isMouseOverTargetingEnabled=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isTargetedItemSelected",{get:function(){var t=this._targetCoordinator.targetedItemIndex,e=!1;return null!==t&&(e=this._selectionCoordinator.isItemSelected(t)),e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"itemCount",{get:function(){return this._items.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"itemDisplayHeight",{get:function(){return this._items[0].displayHeight},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"targetedItemIndex",{get:function(){return this._targetCoordinator.targetedItemIndex},enumerable:!1,configurable:!0}),e.prototype.containsItem=function(t){for(var e=!1,n=0,i=this._items;n<i.length;n++){var o=i[n];if(AutotaskItemSelectionSystem.ItemValueComparer.equals(o.value,t)){e=!0;break}}return e},e.prototype.createChipInformationForTargetedItem=function(){var t=null;return null!==this._targetCoordinator.targetedItemIndex&&(t=this._items[this._targetCoordinator.targetedItemIndex].chipInformation),t},e.prototype.dispose=function(){for(var t=0,e=this._items;t<e.length;t++){e[t].dispose()}this._items.length=0},e.prototype.findChipInformationByValue=function(t){for(var e=null,n=0,i=this._items;n<i.length;n++){var o=i[n];if(AutotaskItemSelectionSystem.ItemValueComparer.equals(o.value,t)){e=o.chipInformation;break}}return e},e.prototype.getTargetedItemValue=function(){var t=null,e=this._targetCoordinator.targetedItem;return null!==e&&(t=e.value),t},e.prototype.moveTargetDown=function(){this._targetCoordinator.moveTargetDown()},e.prototype.moveTargetUp=function(){this._targetCoordinator.moveTargetUp()},e.prototype.removeTargeting=function(){this._targetCoordinator.removeTargeting()},e.prototype.selectItemByIndex=function(t){this._selectionCoordinator.selectItemByIndex(t)},e.prototype.selectItemByValue=function(t){this._selectionCoordinator.selectItemByValue(t)},e.prototype.selectTargetedItem=function(){var t=this._targetCoordinator.targetedItemIndex;null!==t&&this._selectionCoordinator.selectItemByIndex(t)},e.prototype.targetFirstItem=function(){this._targetCoordinator.targetFirstItem()},e.prototype.targetItemByIndex=function(t){0!==this._items.length&&(t>=this._items.length?this._targetCoordinator.targetItemByIndex(this._items.length-1):this._targetCoordinator.targetItemByIndex(t))},e.prototype.unselectAllItems=function(){this._selectionCoordinator.unselectAllItems()},e.prototype.unselectItemByIndex=function(t){this._selectionCoordinator.unselectItemByIndex(t)},e.prototype.unselectItemByValue=function(t){this._selectionCoordinator.unselectItemByValue(t)},e.prototype.unselectTargetedItem=function(){var t=this._targetCoordinator.targetedItemIndex;null!==t&&this._selectionCoordinator.unselectItemByIndex(t)},e.prototype.updateItem=function(t){for(var e=null,n=0;n<this._items.length;n++)if(AutotaskItemSelectionSystem.ItemValueComparer.equals(this._items[n].value,t.value)){e=n;break}return null!==e&&this._items[e].update(t),null!==e},e.prototype._createItems=function(t,e){for(var n=this,i=[],o=t.firstElementChild,a=0;null!==o;){var r=e[a];if(null!==r){var s=r.create(o,(function(t){n._itemClickHandler(t)}),(function(t){n._itemMouseOverHandler(t)}));i.push(s)}a++,o=o.nextElementSibling}return i},e.prototype._itemClickHandler=function(t){null!==this._itemClickDelegate&&this._itemClickDelegate(t,this._items[t],this._items[t].chipInformation)},e.prototype._itemMouseOverHandler=function(t){this.isMouseOverTargetingEnabled&&(this._targetCoordinator.targetItemByIndex(t),this._raiseTargetChangeEvent(t))},e.prototype._raiseTargetChangeEvent=function(t){this._targetChangeDelegate(t)},e}();t.DynamicRecipientItemList=e}(AutotaskMultipleRecipientSelector||(AutotaskMultipleRecipientSelector={})),function(t){var e=function(){function e(e,n,i,o){var a=this,r=AutotaskDomSystem.Document.getChildElementByClassName(e,"Left").firstElementChild;this._leftItemList=new t.DynamicRecipientItemList(r,n,(function(t,e,n){a._leftListItemClickHandler(t,e,n)}),(function(){a._leftListTargetChangeHandler()}));var s=AutotaskDomSystem.Document.getChildElementByClassName(e,"Right").firstElementChild;this._rightItemList=new t.DynamicRecipientItemList(s,i,(function(t,e,n){a._rightListItemClickHandler(t,e,n)}),(function(){a._rightListTargetChangeHandler()})),this._isLeftListTargeted=null,this._itemClickDelegate=o}return Object.defineProperty(e.prototype,"isMouseOverTargetingEnabled",{get:function(){return this._leftItemList.isMouseOverTargetingEnabled},set:function(t){this._leftItemList.isMouseOverTargetingEnabled=t,this._rightItemList.isMouseOverTargetingEnabled=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isTargetedItemSelected",{get:function(){return this._targetedItemList.isTargetedItemSelected},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_targetedItemList",{get:function(){return this._isLeftListTargeted?this._leftItemList:this._rightItemList},enumerable:!1,configurable:!0}),e.prototype.createChipInformationForTargetedItem=function(){return this._targetedItemList.createChipInformationForTargetedItem()},e.prototype.dispose=function(){this._leftItemList.dispose(),this._rightItemList.dispose()},e.prototype.findChipInformationByValue=function(t){var e=this._leftItemList.findChipInformationByValue(t);return null===e&&(e=this._rightItemList.findChipInformationByValue(t)),e},e.prototype.getTargetedItemValue=function(){return this._targetedItemList.getTargetedItemValue()},e.prototype.moveTargetDown=function(){this._targetedItemList.moveTargetDown()},e.prototype.moveTargetLeft=function(){if(!this._isLeftListTargeted){var t=this._rightItemList.targetedItemIndex;null!==t&&(this._rightItemList.removeTargeting(),this._leftItemList.targetItemByIndex(t),this._isLeftListTargeted=!0)}},e.prototype.moveTargetRight=function(){if(this._isLeftListTargeted){var t=this._leftItemList.targetedItemIndex;null!==t&&(this._leftItemList.removeTargeting(),this._rightItemList.targetItemByIndex(t),this._isLeftListTargeted=!1)}},e.prototype.moveTargetUp=function(){this._targetedItemList.moveTargetUp()},e.prototype.selectItemByValue=function(t){this._leftItemList.selectItemByValue(t),this._rightItemList.selectItemByValue(t)},e.prototype.selectTargetedItem=function(){this._targetedItemList.selectTargetedItem()},e.prototype.targetFirstItem=function(){this._leftItemList.targetFirstItem(),this._isLeftListTargeted=!0},e.prototype.unselectAllItems=function(){this._leftItemList.unselectAllItems(),this._rightItemList.unselectAllItems()},e.prototype.unselectItemByValue=function(t){this._leftItemList.unselectItemByValue(t),this._rightItemList.unselectItemByValue(t)},e.prototype.unselectTargetedItem=function(){this._targetedItemList.unselectTargetedItem()},e.prototype.updateItems=function(t){for(var e=0;e<t.length;e++)this._leftItemList.updateItem(t[e])||this._rightItemList.updateItem(t[e])},e.prototype._leftListItemClickHandler=function(e,n,i){var o=this,a=new t.ItemClickEventArgs(n,i,(function(){o._leftItemList.selectItemByIndex(e)}),(function(){o._leftItemList.unselectItemByIndex(e)}));this._itemClickDelegate(a)},e.prototype._leftListTargetChangeHandler=function(){this._isLeftListTargeted||(this._rightItemList.removeTargeting(),this._isLeftListTargeted=!0)},e.prototype._rightListItemClickHandler=function(e,n,i){var o=this,a=new t.ItemClickEventArgs(n,i,(function(){o._rightItemList.selectItemByIndex(e)}),(function(){o._rightItemList.unselectItemByIndex(e)}));this._itemClickDelegate(a)},e.prototype._rightListTargetChangeHandler=function(){this._isLeftListTargeted&&(this._leftItemList.removeTargeting(),this._isLeftListTargeted=!1)},e}();t.DynamicRecipientItemSet=e}(AutotaskMultipleRecipientSelector||(AutotaskMultipleRecipientSelector={})),function(t){var e=function(){function t(t,e,n){this._value=t,this._emailAddresses=e,this._contextOverlayRoute=n}return Object.defineProperty(t.prototype,"contextOverlayRoute",{get:function(){return this._contextOverlayRoute},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"emailAddresses",{get:function(){return this._emailAddresses},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return this._value},enumerable:!1,configurable:!0}),t}();t.DynamicRecipientUpdateInformation=e}(AutotaskMultipleRecipientSelector||(AutotaskMultipleRecipientSelector={})),function(t){var e=function(t){function e(e,n){var i=t.call(this,e)||this;return i._updateInformation=n,i}return __extends(e,t),Object.defineProperty(e.prototype,"updateInformation",{get:function(){return this._updateInformation},enumerable:!1,configurable:!0}),e}(Autotask.LifecycleObject);t.DynamicRecipientUpdateInformationContainer=e}(AutotaskMultipleRecipientSelector||(AutotaskMultipleRecipientSelector={})),function(t){var e=function(){function t(t,e,n){this._editorInstance=t,this._previousValue=e,this._currentValue=n}return Object.defineProperty(t.prototype,"currentValue",{get:function(){return new AutotaskItemSelectionSystem.ItemValueCollection(this._currentValue)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"editorInstance",{get:function(){return this._editorInstance},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"previousValue",{get:function(){return new AutotaskItemSelectionSystem.ItemValueCollection(this._previousValue)},enumerable:!1,configurable:!0}),t}();t.ImmediateChangeEventArgs=e}(AutotaskMultipleRecipientSelector||(AutotaskMultipleRecipientSelector={})),function(t){var e=function(){function t(t,e,n,i){this._item=t,this._chipInformation=e,this._selectDelegate=n,this._unselectDelegate=i}return Object.defineProperty(t.prototype,"isSelected",{get:function(){return this._item.isSelected},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"itemValue",{get:function(){return this._item.value},enumerable:!1,configurable:!0}),t.prototype.createChipInformation=function(){return this._chipInformation},t.prototype.select=function(){this._selectDelegate()},t.prototype.unselect=function(){this._unselectDelegate()},t}();t.ItemClickEventArgs=e}(AutotaskMultipleRecipientSelector||(AutotaskMultipleRecipientSelector={})),function(t){var e=function(t){function e(e,n,i){var o=t.call(this,e)||this;return o._leftListItemCreators=n,o._rightListItemCreators=i,o}return __extends(e,t),Object.defineProperty(e.prototype,"leftListItemCreators",{get:function(){return this._leftListItemCreators},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rightListItemCreators",{get:function(){return this._rightListItemCreators},enumerable:!1,configurable:!0}),e}(Autotask.LifecycleObject);t.ItemCreatorContainer=e}(AutotaskMultipleRecipientSelector||(AutotaskMultipleRecipientSelector={})),function(t){var e=function(){function t(t){this._items=t,this._previousSearchText=null}return t.prototype.search=function(t){var e=null,n=!1,i=t.length;if(null!==this._previousSearchText&&i>0){var o=this._previousSearchText.length;if(i-1===o){if(t.substring(0,o)===this._previousSearchText){var a=t.charAt(o);e=this._performAdditiveSearch(t,i,a),n=!0}}else i+1===o&&t===this._previousSearchText.substring(0,i)&&(e=this._performSubtractiveSearch(t,i),n=!0);n||(e=this._performNewSearch(t,i)),this._previousSearchText=t}else null!==this._previousSearchText&&0===i?(this._clearHighlighting(),this._previousSearchText=null):(e=this._performNewSearch(t,i),this._previousSearchText=t);return null!==e},t.prototype._clearHighlighting=function(){for(var t=0,e=this._items;t<e.length;t++){e[t].clearHighlighting()}},t.prototype._performAdditiveSearch=function(t,e,n){for(var i=null,o=0;o<this._items.length;o++){this._items[o].performAdditiveSearch(t,e,n)&&null===i&&(i=o)}return i},t.prototype._performNewSearch=function(t,e){for(var n=null,i=0;i<this._items.length;i++){this._items[i].performNewSearch(t,e)&&null===n&&(n=i)}return n},t.prototype._performSubtractiveSearch=function(t,e){for(var n=null,i=0;i<this._items.length;i++){this._items[i].performSubtractiveSearch(t,e)&&null===n&&(n=i)}return n},t}();t.ItemListSearchCoordinator=e}(AutotaskMultipleRecipientSelector||(AutotaskMultipleRecipientSelector={})),function(t){var e=function(){function t(t){this._items=t,this._selectedItemIndexes=[]}return t.prototype.isItemSelected=function(t){for(var e=!1,n=0,i=this._selectedItemIndexes;n<i.length;n++){if(i[n]===t){e=!0;break}}return e},t.prototype.selectItemByIndex=function(t){this.isItemSelected(t)||(this._items[t].select(),this._selectedItemIndexes.push(t))},t.prototype.selectItemByValue=function(t){for(var e=0;e<this._items.length;e++){var n=this._items[e];if(AutotaskItemSelectionSystem.ItemValueComparer.equals(n.value,t)){this.selectItemByIndex(e);break}}},t.prototype.unselectAllItems=function(){for(var t=0,e=this._items;t<e.length;t++){e[t].unselect()}this._selectedItemIndexes=[]},t.prototype.unselectItemByIndex=function(t){for(var e=0;e<this._selectedItemIndexes.length;e++)if(t===this._selectedItemIndexes[e]){this._items[t].unselect(),this._selectedItemIndexes.splice(e,1);break}},t.prototype.unselectItemByValue=function(t){for(var e=0;e<this._items.length;e++){var n=this._items[e];if(AutotaskItemSelectionSystem.ItemValueComparer.equals(n.value,t)){this.unselectItemByIndex(e);break}}},t}();t.ItemListSelectionCoordinator=e}(AutotaskMultipleRecipientSelector||(AutotaskMultipleRecipientSelector={})),function(t){var e=function(){function t(t){this._items=t,this._targetedItemIndex=null}return Object.defineProperty(t.prototype,"targetedItem",{get:function(){var t=null;return null!==this._targetedItemIndex&&(t=this._items[this._targetedItemIndex]),t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"targetedItemIndex",{get:function(){return this._targetedItemIndex},enumerable:!1,configurable:!0}),t.prototype.moveTargetDown=function(){null!==this._targetedItemIndex&&this._targetedItemIndex!==this._items.length-1&&this.targetItemByIndex(this._targetedItemIndex+1)},t.prototype.moveTargetUp=function(){null!==this._targetedItemIndex&&0!==this._targetedItemIndex&&this.targetItemByIndex(this._targetedItemIndex-1)},t.prototype.removeTargeting=function(){null!==this._targetedItemIndex&&(this._items[this._targetedItemIndex].removeTargeting(),this._targetedItemIndex=null)},t.prototype.targetFirstItem=function(){0!==this._items.length&&this.targetItemByIndex(0)},t.prototype.targetItemByIndex=function(t){t!==this._targetedItemIndex&&(this.removeTargeting(),this._items[t].target(),this._targetedItemIndex=t)},t}();t.ItemListTargetCoordinator=e}(AutotaskMultipleRecipientSelector||(AutotaskMultipleRecipientSelector={})),function(t){var e=function(e){function n(n,i,o,a,r,s,l,u,c,d,h,_,p,m,f){var y=e.call(this,n)||this;y._editorElement=AutotaskDomSystem.Document.getElementById(n);var g=y._editorElement,v=AutotaskDomSystem.Document.getChildElementByClassName(y._editorElement,"ContentContainer");y._loadingIndicatorElement=AutotaskDomSystem.Document.getChildElementByClassName(v,"LoadingIndicatorOverlay"),y._bindingPropertyName=o,y._searchBox=a,y._chipList=r,y._dialogButtonId=c,y._dialogRoute=d,y._maximumSelectionCount=h,y._maximumSelectionCountExceededMessage=_,y._applyFiltersHandlers=[],y._changeHandlers=[],y._dialogButton=null,y._immediateChangeHandlers=[],y._tabbingAwayHandlers=[],y._isDirty=!1,y._isEnabled=!0,y._originalValue=y._copyValue(y._chipList.value),y._value=y._copyValue(y._originalValue),y._valueWhenFocused=[];y._arrayComparer=new AutotaskEditorSystem.ArrayComparer((function(t,e){return AutotaskItemSelectionSystem.ItemValueComparer.equals(t,e)}),AutotaskItemSelectionSystem.ItemValueSorter.compare),y._dropDownCoordinator=new t.DropDownCoordinator(s,g);for(var b=0,E=y._value;b<E.length;b++){var S=E[b];y._dropDownCoordinator.itemSet.selectItemByValue(S)}return y._autoCompleteCoordinator=new t.AutoCompleteCoordinator(l,u,g,(function(t){return y._applyFiltersHandler(t)})),y._userInteractionCoordinator=new t.UserInteractionCoordinator(a,r,y._dropDownCoordinator,y._autoCompleteCoordinator,(function(t){y._valueChangedHandler(t)}),(function(){y._focusHandler()}),(function(){y._focusLostHandler()}),(function(){y._openDialog()}),f,y._maximumSelectionCount,y._maximumSelectionCountExceededMessage,m,p),y._chipList.addAllowedConcurrentlyVisibleOverlay(s),y._chipList.addAllowedConcurrentlyVisibleOverlay(l),null!==i&&y._changeHandlers.push(i),y}return __extends(n,e),Object.defineProperty(n.prototype,"isDirty",{get:function(){return this._isDirty},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isEnabled",{get:function(){return this._isEnabled},set:function(t){this._isEnabled=t},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"value",{get:function(){return new AutotaskItemSelectionSystem.ItemValueCollection(this._value)},enumerable:!1,configurable:!0}),n.prototype.addApplyFiltersHandler=function(t){this._applyFiltersHandlers.push(t)},n.prototype.addChangeHandler=function(t){this._changeHandlers.push(t)},n.prototype.addImmediateChangeHandler=function(t){this._immediateChangeHandlers.push(t)},n.prototype.addSelectionByValue=function(t){if(!this._chipList.contains(t)){var e=this._dropDownCoordinator.itemSet.findChipInformationByValue(t);null!==e&&(this._chipList.insert(e),this._value=this._copyValue(this._chipList.value),this._manageDirtyState(this._value),this._dropDownCoordinator.itemSet.selectItemByValue(t))}},n.prototype.addTabbingAwayHandler=function(t){var e=this;this._tabbingAwayHandlers.push(t),1===this._tabbingAwayHandlers.length&&(this._searchBox.tabbingAwayHandler=function(t,n){e._searchBoxTabbingAwayHandler(t,n)},this._dialogButton.addTabbingAwayHandler((function(t){e._dialogButtonTabbingAwayHandler(t)})))},n.prototype.applyFormTemplateChanges=function(t,e,n){this._applyFormTemplateRemovals(e,n),this._applyFormTemplateAdditions(t),this._value=this._copyValue(this._chipList.value),this._manageDirtyState(this._value)},n.prototype.clearSelection=function(){this._clearSelection(),this._value=[],this._manageDirtyState(this._value),this._clearSelectionDisplayOnlyState()},n.prototype.createRequestData=function(){var t=null;null!==this._bindingPropertyName&&(this._value.length>0?t=new AutotaskItemSelectionSystem.ItemValueCollection(this._value).__createRequestData(this._bindingPropertyName):(t={})[this._bindingPropertyName]=null);return t},n.prototype.focus=function(){this._searchBox.isFocused||(this._valueWhenFocused=this._copyValue(this._chipList.value),this._searchBox.isBlurEnabled=!0,this._searchBox.focus(),this._editorElement.classList.add("Focused"),this._editorElement.classList.remove("SelectionDisplayOnly"))},n.prototype.focusEnd=function(){this._dialogButton.focus()},n.prototype.focusStart=function(){this.focus()},n.prototype.getAllEmails=function(){return this._chipList.getAllEmails()},n.prototype.hideLoadingIndicator=function(){this._loadingIndicatorElement.classList.remove("Active")},n.prototype.removeSelectionByValue=function(t){this._chipList.contains(t)&&(this._removeSelectionByValue(t),this._value=this._copyValue(this._chipList.value),this._manageDirtyState(this._value),0===this._chipList.count&&this._clearSelectionDisplayOnlyState())},n.prototype.showLoadingIndicator=function(){this._loadingIndicatorElement.classList.add("Active")},n.prototype.updateDynamicRecipients=function(t){this._chipList.updateChips(t),this._dropDownCoordinator.itemSet.updateItems(t)},n.prototype.__initialize=function(){var t=this;this._dialogButton=autotask.find(this._dialogButtonId);var e=new AutotaskButtonSystem.ClickEventHandler((function(){t._dialogButtonClickHandler()}));this._dialogButton.addEventHandler(e),this._userInteractionCoordinator.initialize()},n.prototype._addFormTemplateSelection=function(t){if(null===t.overlayRoute){var e=this._dropDownCoordinator.itemSet.findChipInformationByValue(t.value);null!==e&&null!==e.overlayRoute&&t.__updateContextOverlayRoute(e.overlayRoute)}this._dropDownCoordinator.itemSet.selectItemByValue(t.value),this._chipList.insert(t)},n.prototype._applyFiltersHandler=function(t){for(var e=0,n=this._applyFiltersHandlers;e<n.length;e++){(0,n[e])(t)}},n.prototype._applyFormTemplateAdditions=function(t){if(null!==t)for(var e=0,n=t;e<n.length;e++){var i=n[e];this._chipList.contains(i.value)||this._addFormTemplateSelection(i)}},n.prototype._applyFormTemplateRemovals=function(t,e){if(null!==t)if(t)this._clearSelection();else if(null!==e)for(var n=0,i=e;n<i.length;n++){var o=i[n];this._chipList.contains(o)&&this._removeSelectionByValue(o)}},n.prototype._copyValue=function(t){for(var e=[],n=0,i=t;n<i.length;n++){var o=i[n];e.push(o)}return e},n.prototype._clearSelection=function(){this._dropDownCoordinator.itemSet.unselectAllItems(),this._chipList.clear()},n.prototype._clearSelectionDisplayOnlyState=function(){this._editorElement.classList.remove("SelectionDisplayOnly")},n.prototype._dialogButtonClickHandler=function(){this._openDialog()},n.prototype._dialogButtonTabbingAwayHandler=function(t){t.isShiftKeyPressed?this.focus():this._raiseTabbingAwayEvent(t.isShiftKeyPressed,(function(){t.cancel()}))},n.prototype._dialogOpenedHandler=function(t){var e=this,n=t.dialogId;autotask.find(n).__configure((function(t){e._dialogSelectionHandler(t)}),this._maximumSelectionCount,this._maximumSelectionCountExceededMessage)},n.prototype._dialogSelectionHandler=function(t){for(var e=[],n=0,i=t.chipInformation;n<i.length;n++){var o=i[n];e.push(o.value)}if(!this._arrayComparer.equals(this._value,e,!1)){var a=this._value;this._chipList.clear(),this._chipList.chipInformation=t.chipInformation,this._dropDownCoordinator.itemSet.unselectAllItems();for(var r=0,s=e;r<s.length;r++){var l=s[r];this._dropDownCoordinator.itemSet.selectItemByValue(l)}this._value=this._copyValue(this._chipList.value),this._manageDirtyState(this._value),this._raiseImmediateChangeEvent(a,this._value),this._raiseChangeEvent()}},n.prototype._focusHandler=function(){this._valueWhenFocused=this._copyValue(this._chipList.value),this._editorElement.classList.add("Focused"),this._editorElement.classList.remove("SelectionDisplayOnly")},n.prototype._focusLostHandler=function(){this._editorElement.classList.remove("Focused"),this._arrayComparer.equals(this._value,this._valueWhenFocused,!1)||(this._raiseChangeEvent(),this._valueWhenFocused=null)},n.prototype._manageDirtyState=function(t){var e=!1;return this._isDirty&&!this._arrayComparer.equals(t,this._originalValue,!1)||(this._isDirty=!this._isDirty,e=!0),e},n.prototype._openDialog=function(){var e=this,n=new t.ApplyFiltersEventArgs;this._chipList.value.length>0&&n.addItemValueCollection(this._dialogRoute.get_selectedValuesParameterName(),new AutotaskItemSelectionSystem.ItemValueCollection(this._chipList.value)),this._applyFiltersHandler(n),this._searchBox.blur(),this._dialogRoute.__recipientSelectionDialog(n.data,(function(t){e._dialogOpenedHandler(t)}))},n.prototype._raiseChangeEvent=function(){if(this._changeHandlers.length>0)for(var e=new t.ChangeEventArgs(this),n=0,i=this._changeHandlers;n<i.length;n++){(0,i[n])(e)}},n.prototype._raiseImmediateChangeEvent=function(e,n){if(this._immediateChangeHandlers.length>0)for(var i=new t.ImmediateChangeEventArgs(this,e,n),o=0,a=this._immediateChangeHandlers;o<a.length;o++){(0,a[o])(i)}},n.prototype._raiseTabbingAwayEvent=function(t,e){if(this._tabbingAwayHandlers.length>0)for(var n=new AutotaskEditorSystem.TabbingAwayEventArgs(this.id,t,e),i=0,o=this._tabbingAwayHandlers;i<o.length;i++){(0,o[i])(n)}},n.prototype._removeSelectionByValue=function(t){null!==this._dropDownCoordinator.itemSet.findChipInformationByValue(t)&&this._dropDownCoordinator.itemSet.unselectItemByValue(t),this._chipList.removeByValue(t)},n.prototype._searchBoxTabbingAwayHandler=function(t,e){t?this._raiseTabbingAwayEvent(t,e):this._dialogButton.focus()},n.prototype._valueChangedHandler=function(t){if(!this._arrayComparer.equals(this._value,t,!1)){var e=this._value;this._value=this._copyValue(t),this._manageDirtyState(this._value),this._raiseImmediateChangeEvent(e,this._value)}},n}(AutotaskEditorSystem.Editor);t.MultipleRecipientSelector=e}(AutotaskMultipleRecipientSelector||(AutotaskMultipleRecipientSelector={})),function(t){var e=function(){function t(t,e,n,i){var o=this;this._itemElement=t,this._chipInformation=e,this._clickDelegate=n,this._mouseOverDelegate=i;var a=AutotaskDomSystem.Document.getChildElementsByClassName(t,"Text");this._leftHalfTextElement=a[0],this._rightHalfTextElement=a[1],this._leftHalfOriginalText=this._leftHalfTextElement.textContent,this._rightHalfOriginalText=this._rightHalfTextElement.textContent,this._areInitialsMatched=!1,this._isLeftTextMatched=!1,this._isRightTextMatched=!1,this._isSelected=!1,this._itemSearchServices=new AutotaskEditorSystem.ItemSearchServices,this._itemElement.addEventListener("click",(function(){o._itemClickListener()})),this._itemElement.addEventListener("mouseover",(function(){o._itemMouseOverListener()}))}return Object.defineProperty(t.prototype,"chipInformation",{get:function(){return this._chipInformation},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"displayHeight",{get:function(){return this._itemElement.clientHeight},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return this._chipInformation.value},enumerable:!1,configurable:!0}),t.prototype.clearHighlighting=function(){(this._isLeftTextMatched||this._areInitialsMatched)&&this._clearLeftHalfHighlighting(),(this._isRightTextMatched||this._areInitialsMatched)&&this._clearRightHalfHighlighting(),this._areInitialsMatched&&(this._areInitialsMatched=!1)},t.prototype.dispose=function(){this._clickDelegate=null,this._mouseOverDelegate=null},t.prototype.performAdditiveSearch=function(t,e,n){var i=!0,o=!0,a=!0,r=!1,s=!0,l=!1;return this._isLeftTextMatched&&(r=this._itemSearchServices.attemptAdditiveSearchForElement(e,n,this._leftHalfTextElement,this._leftHalfOriginalText))&&(i=!1,a=!1),this._isRightTextMatched&&(l=this._itemSearchServices.attemptAdditiveSearchForElement(e,n,this._rightHalfTextElement,this._rightHalfOriginalText))&&(o=!1,s=!1),this._areInitialsMatched=this._attemptInitialHighlighting(t,e,a,s),this._clearHighlighting(this._areInitialsMatched,i,o),r||l||this._areInitialsMatched},t.prototype.performNewSearch=function(t,e){var n=!0,i=!0,o=!0,a=!0,r=this._attemptNewSearchForLeftTextElement(t,e);r&&(n=!1,o=!1);var s=this._attemptNewSearchForRightTextElement(t,e);return s&&(i=!1,a=!1),this._areInitialsMatched=this._attemptInitialHighlighting(t,e,o,a),this._clearHighlighting(this._areInitialsMatched,n,i),r||s||this._areInitialsMatched},t.prototype.performSubtractiveSearch=function(t,e){var n=!0,i=!0,o=!1,a=!1,r=!1,s=!1;return this._isLeftTextMatched?(this._itemSearchServices.highlightSubtractiveSearchForElement(e,this._leftHalfTextElement,this._leftHalfOriginalText),n=!1,a=!0):(a=this._attemptNewSearchForLeftTextElement(t,e))?n=!1:o=!0,this._isRightTextMatched?(this._itemSearchServices.highlightSubtractiveSearchForElement(e,this._rightHalfTextElement,this._rightHalfOriginalText),i=!1,s=!0):(s=this._attemptNewSearchForRightTextElement(t,e))?i=!1:r=!0,this._areInitialsMatched=this._attemptInitialHighlighting(t,e,o,r),this._clearHighlighting(this._areInitialsMatched,n,i),a||s||this._areInitialsMatched},t.prototype.removeTargeting=function(){this._itemElement.setAttribute("data-is-targeted","false")},t.prototype.select=function(){this._isSelected||(this._itemElement.setAttribute("data-is-selected","true"),this._isSelected=!0)},t.prototype.target=function(){this._itemElement.setAttribute("data-is-targeted","true")},t.prototype.unselect=function(){this._isSelected&&(this._itemElement.setAttribute("data-is-selected","false"),this._isSelected=!1)},t.prototype._attemptInitialHighlighting=function(t,e,n,i){var o=!1;if(2===e&&(n||i)){var a=this._leftHalfOriginalText.charAt(0),r=this._rightHalfOriginalText.charAt(0);t.charAt(0).toLowerCase()===a.toLowerCase()&&t.charAt(1).toLowerCase()===r.toLowerCase()&&(n&&this._itemSearchServices.highlightText(this._leftHalfTextElement,this._leftHalfOriginalText,a,this._leftHalfOriginalText.length,1),i&&this._itemSearchServices.highlightText(this._rightHalfTextElement,this._rightHalfOriginalText,r,this._rightHalfOriginalText.length,1),o=!0)}return o},t.prototype._attemptNewSearchForLeftTextElement=function(t,e){var n=this._itemSearchServices.attemptNewSearchForElement(t,e,this._leftHalfTextElement,this._leftHalfOriginalText);return n&&(this._isLeftTextMatched=!0),n},t.prototype._attemptNewSearchForRightTextElement=function(t,e){var n=this._itemSearchServices.attemptNewSearchForElement(t,e,this._rightHalfTextElement,this._rightHalfOriginalText);return n&&(this._isRightTextMatched=!0),n},t.prototype._clearHighlighting=function(t,e,n){t?(e&&(this._isLeftTextMatched=!1),n&&(this._isRightTextMatched=!1)):(e&&this._clearLeftHalfHighlighting(),n&&this._clearRightHalfHighlighting())},t.prototype._clearLeftHalfHighlighting=function(){this._itemSearchServices.clearHighlighting(this._leftHalfTextElement,this._leftHalfOriginalText),this._isLeftTextMatched=!1},t.prototype._clearRightHalfHighlighting=function(){this._itemSearchServices.clearHighlighting(this._rightHalfTextElement,this._rightHalfOriginalText),this._isRightTextMatched=!1},t.prototype._itemClickListener=function(){if(null!==this._clickDelegate){var t=parseInt(this._itemElement.dataset.index,10);this._clickDelegate(t)}},t.prototype._itemMouseOverListener=function(){if(null!==this._mouseOverDelegate){var t=parseInt(this._itemElement.dataset.index,10);this._mouseOverDelegate(t)}},t}();t.RecipientItem=e}(AutotaskMultipleRecipientSelector||(AutotaskMultipleRecipientSelector={})),function(t){var e=function(){function e(t){this._chipInformation=t}return e.prototype.create=function(e,n,i){return new t.RecipientItem(e,this._chipInformation,n,i)},e}();t.RecipientItemCreator=e}(AutotaskMultipleRecipientSelector||(AutotaskMultipleRecipientSelector={})),function(t){var e=function(t){function e(e,n){var i=t.call(this,e)||this;return i._itemCreators=n,i}return __extends(e,t),Object.defineProperty(e.prototype,"itemCreators",{get:function(){return this._itemCreators},enumerable:!1,configurable:!0}),e}(Autotask.LifecycleObject);t.RecipientItemCreatorContainer=e}(AutotaskMultipleRecipientSelector||(AutotaskMultipleRecipientSelector={})),function(t){var e=function(){function e(e,n,i,o){this._itemListElement=e,this._items=this._createItems(e,n),this._itemClickDelegate=i,this._targetChangeDelegate=o,this._isMouseOverTargetingEnabled=!0,this._targetCoordinator=new t.ItemListTargetCoordinator(this._items),this._searchCoordinator=new t.ItemListSearchCoordinator(this._items),this._selectionCoordinator=new t.ItemListSelectionCoordinator(this._items)}return Object.defineProperty(e.prototype,"isMouseOverTargetingEnabled",{get:function(){return this._isMouseOverTargetingEnabled},set:function(t){this._isMouseOverTargetingEnabled=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isTargetedItemSelected",{get:function(){var t=this._targetCoordinator.targetedItemIndex,e=!1;return null!==t&&(e=this._selectionCoordinator.isItemSelected(t)),e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"itemCount",{get:function(){return this._items.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"itemDisplayHeight",{get:function(){return this._items[0].displayHeight},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"targetedItemIndex",{get:function(){return this._targetCoordinator.targetedItemIndex},enumerable:!1,configurable:!0}),e.prototype.containsItem=function(t){for(var e=!1,n=0,i=this._items;n<i.length;n++){var o=i[n];if(AutotaskItemSelectionSystem.ItemValueComparer.equals(o.value,t)){e=!0;break}}return e},e.prototype.createChipInformationForTargetedItem=function(){var t=null;return null!==this._targetCoordinator.targetedItemIndex&&(t=this._items[this._targetCoordinator.targetedItemIndex].chipInformation),t},e.prototype.dispose=function(){for(var t=0,e=this._items;t<e.length;t++){e[t].dispose()}this._items.length=0},e.prototype.getTargetedItemValue=function(){var t=null,e=this._targetCoordinator.targetedItem;return null!==e&&(t=e.value),t},e.prototype.moveTargetDown=function(){this._targetCoordinator.moveTargetDown()},e.prototype.moveTargetUp=function(){this._targetCoordinator.moveTargetUp()},e.prototype.removeTargeting=function(){this._targetCoordinator.removeTargeting()},e.prototype.search=function(t){return this._searchCoordinator.search(t)},e.prototype.selectItemByIndex=function(t){this._selectionCoordinator.selectItemByIndex(t)},e.prototype.selectItemByValue=function(t){this._selectionCoordinator.selectItemByValue(t)},e.prototype.selectTargetedItem=function(){var t=this._targetCoordinator.targetedItemIndex;null!==t&&this._selectionCoordinator.selectItemByIndex(t)},e.prototype.targetFirstItem=function(){this._targetCoordinator.targetFirstItem()},e.prototype.targetItemByIndex=function(t){0!==this._items.length&&(t>=this._items.length?this._targetCoordinator.targetItemByIndex(this._items.length-1):this._targetCoordinator.targetItemByIndex(t))},e.prototype.unselectAllItems=function(){this._selectionCoordinator.unselectAllItems()},e.prototype.unselectItemByIndex=function(t){this._selectionCoordinator.unselectItemByIndex(t)},e.prototype.unselectItemByValue=function(t){this._selectionCoordinator.unselectItemByValue(t)},e.prototype.unselectTargetedItem=function(){var t=this._targetCoordinator.targetedItemIndex;null!==t&&this._selectionCoordinator.unselectItemByIndex(t)},e.prototype.updateItem=function(t,e){for(var n=null,i=0;i<this._items.length;i++)if(AutotaskItemSelectionSystem.ItemValueComparer.equals(this._items[i].value,t)){n=i;break}if(null!==n){this._items[n].dispose();var o=this._itemListElement.children[n];this._items[n]=this._createItem(o,e)}},e.prototype._createItem=function(t,e){var n=this;return e.create(t,(function(t){n._itemClickHandler(t)}),(function(t){n._itemMouseOverHandler(t)}))},e.prototype._createItems=function(t,e){for(var n=this,i=[],o=t.firstElementChild,a=0;null!==o;){var r=e[a];if(null!==r){var s=r.create(o,(function(t){n._itemClickHandler(t)}),(function(t){n._itemMouseOverHandler(t)}));i.push(s)}a++,o=o.nextElementSibling}return i},e.prototype._itemClickHandler=function(t){null!==this._itemClickDelegate&&this._itemClickDelegate(t,this._items[t],this._items[t].chipInformation)},e.prototype._itemMouseOverHandler=function(t){this.isMouseOverTargetingEnabled&&(this._targetCoordinator.targetItemByIndex(t),this._raiseTargetChangeEvent(t))},e.prototype._raiseTargetChangeEvent=function(t){this._targetChangeDelegate(t)},e}();t.RecipientItemList=e}(AutotaskMultipleRecipientSelector||(AutotaskMultipleRecipientSelector={})),function(t){var e=function(){function e(e,n,i,o){var a=this,r=AutotaskDomSystem.Document.getChildElementByClassName(e,"Left"),s=AutotaskDomSystem.Document.getChildElementByClassName(r,"ItemList");this._leftItemList=new t.RecipientItemList(s,n,(function(t,e,n){a._leftListItemClickHandler(t,e,n)}),(function(){a._leftListTargetChangeHandler()}));var l=AutotaskDomSystem.Document.getChildElementByClassName(e,"Right"),u=AutotaskDomSystem.Document.getChildElementByClassName(l,"ItemList");this._rightItemList=new t.RecipientItemList(u,i,(function(t,e,n){a._rightListItemClickHandler(t,e,n)}),(function(){a._rightListTargetChangeHandler()})),this._isLeftListTargeted=null,this._itemClickDelegate=o}return Object.defineProperty(e.prototype,"isMouseOverTargetingEnabled",{get:function(){return this._leftItemList.isMouseOverTargetingEnabled},set:function(t){this._leftItemList.isMouseOverTargetingEnabled=t,this._rightItemList.isMouseOverTargetingEnabled=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isTargetedItemSelected",{get:function(){return this._targetedItemList.isTargetedItemSelected},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_targetedItemList",{get:function(){return this._isLeftListTargeted?this._leftItemList:this._rightItemList},enumerable:!1,configurable:!0}),e.prototype.createChipInformationForTargetedItem=function(){return this._targetedItemList.createChipInformationForTargetedItem()},e.prototype.dispose=function(){this._leftItemList.dispose(),this._rightItemList.dispose()},e.prototype.getTargetedItemValue=function(){return this._targetedItemList.getTargetedItemValue()},e.prototype.moveTargetDown=function(){this._targetedItemList.moveTargetDown()},e.prototype.moveTargetLeft=function(){if(!this._isLeftListTargeted){var t=this._rightItemList.targetedItemIndex;null!==t&&(this._rightItemList.removeTargeting(),this._leftItemList.targetItemByIndex(t),this._isLeftListTargeted=!0)}},e.prototype.moveTargetRight=function(){if(this._isLeftListTargeted){var t=this._leftItemList.targetedItemIndex;null!==t&&(this._leftItemList.removeTargeting(),this._rightItemList.targetItemByIndex(t),this._isLeftListTargeted=!1)}},e.prototype.moveTargetUp=function(){this._targetedItemList.moveTargetUp()},e.prototype.search=function(t){var e=this._leftItemList.search(t),n=this._rightItemList.search(t);return e||n},e.prototype.selectItemByValue=function(t){this._leftItemList.selectItemByValue(t),this._rightItemList.selectItemByValue(t)},e.prototype.selectTargetedItem=function(){this._targetedItemList.selectTargetedItem()},e.prototype.targetFirstItem=function(){this._leftItemList.targetFirstItem(),this._isLeftListTargeted=!0},e.prototype.unselectAllItems=function(){this._leftItemList.unselectAllItems(),this._rightItemList.unselectAllItems()},e.prototype.unselectItemByValue=function(t){this._leftItemList.unselectItemByValue(t),this._rightItemList.unselectItemByValue(t)},e.prototype.unselectTargetedItem=function(){this._targetedItemList.unselectTargetedItem()},e.prototype._leftListItemClickHandler=function(e,n,i){var o=this,a=new t.ItemClickEventArgs(n,i,(function(){o._leftItemList.selectItemByIndex(e)}),(function(){o._leftItemList.unselectItemByIndex(e)}));this._itemClickDelegate(a)},e.prototype._leftListTargetChangeHandler=function(){this._isLeftListTargeted||(this._rightItemList.removeTargeting(),this._isLeftListTargeted=!0)},e.prototype._rightListItemClickHandler=function(e,n,i){var o=this,a=new t.ItemClickEventArgs(n,i,(function(){o._rightItemList.selectItemByIndex(e)}),(function(){o._rightItemList.unselectItemByIndex(e)}));this._itemClickDelegate(a)},e.prototype._rightListTargetChangeHandler=function(){this._isLeftListTargeted&&(this._leftItemList.removeTargeting(),this._isLeftListTargeted=!1)},e}();t.RecipientItemSet=e}(AutotaskMultipleRecipientSelector||(AutotaskMultipleRecipientSelector={})),function(t){var e=function(){function t(t,e){var n=this;this._searchBoxElement=AutotaskDomSystem.Document.getElementById(t),this._inputElement=this._searchBoxElement.children[0],this._inputElement.addEventListener("blur",(function(t){n._blurListener(t)})),this._inputElement.addEventListener("focus",(function(){n._focusListener()})),this._inputElement.addEventListener("input",(function(){n._inputListener()})),this._inputElement.addEventListener("keydown",(function(t){n._keyDownListener(t)})),this._inputElement.addEventListener("keyup",(function(t){n._keyUpListener(t)})),this._inputElement.addEventListener("mousedown",(function(){n._mouseDownListener()})),this._isEnabled=e,this._blurHandler=null,this._enterKeyHandler=null,this._escapeKeyHandler=null,this._focusHandler=null,this._isAlertDialogTriggeringEvent=!1,this._isBlurEnabled=!0,this._isFocused=!1,this._isTabKeyTrggeringBlur=!1,this._keyUpHandler=null,this._mouseDownHandler=null,this._navigationKeyHandler=null,this._searchTextChangedHandler=null,this._tabbingAwayHandler=null}return Object.defineProperty(t.prototype,"inputElement",{get:function(){return this._inputElement},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isAlertDialogTriggeringEvent",{set:function(t){this._isAlertDialogTriggeringEvent=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isBlurEnabled",{get:function(){return this._isBlurEnabled},set:function(t){this._isBlurEnabled=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isEnabled",{get:function(){return this._isEnabled},set:function(t){this._isEnabled!==t&&(this._isEnabled=t,this._isEnabled?(this._inputElement.removeAttribute("disabled"),this._searchBoxElement.classList.remove("Disabled")):(this._inputElement.setAttribute("disabled","true"),this._searchBoxElement.classList.add("Disabled")))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"searchText",{get:function(){return this._inputElement.value},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tabbingAwayHandler",{set:function(t){this._tabbingAwayHandler=t},enumerable:!1,configurable:!0}),t.prototype.blur=function(){this._inputElement.blur(),this._isFocused=!1},t.prototype.clearSearchText=function(){this._inputElement.value=""},t.prototype.focus=function(){this._inputElement.focus(),this._isFocused=!0},t.prototype.focusWithEvent=function(){this.focus(),this._raiseFocusEvent()},t.prototype.initialize=function(t,e,n,i,o,a,r,s){this._searchTextChangedHandler=t,this._focusHandler=e,this._blurHandler=n,this._enterKeyHandler=i,this._escapeKeyHandler=o,this._navigationKeyHandler=a,this._keyUpHandler=r,this._mouseDownHandler=s},t.prototype._blurListener=function(t){this._isBlurEnabled?this._isAlertDialogTriggeringEvent||(this._isFocused=!1,this._raiseBlurEvent(this._isTabKeyTrggeringBlur),this._isTabKeyTrggeringBlur=!1):(t.preventDefault(),this._inputElement.focus())},t.prototype._focusListener=function(){this._isAlertDialogTriggeringEvent||(this._isFocused=!0,this._raiseFocusEvent())},t.prototype._inputListener=function(){this._raiseSearchTextChangedEvent(this._inputElement.value)},t.prototype._isLeftArrowNavigationAvailable=function(){var t=this._inputElement.selectionStart;return t===this._inputElement.selectionEnd&&0===t},t.prototype._isRightArrowNavigationAvailable=function(){var t=this._inputElement.selectionStart;return t===this._inputElement.selectionEnd&&t===this._inputElement.value.length},t.prototype._keyDownListener=function(t){if(AutotaskDomSystem.KeyCode.isTab(t.keyCode))this._isTabKeyTrggeringBlur=!0,this._raiseTabbingAwayEvent(t.shiftKey,(function(){t.preventDefault()}));else if(AutotaskDomSystem.KeyCode.isEnter(t.keyCode))this._raiseEnterKeyEvent();else if(AutotaskDomSystem.KeyCode.isEscape(t.keyCode)){t.preventDefault();this._raiseEscapeKeyEvent((function(){t.preventDefault()}),(function(){t.stopPropagation()}))}else AutotaskDomSystem.KeyCode.isDown(t.keyCode)||AutotaskDomSystem.KeyCode.isUp(t.keyCode)?(t.preventDefault(),this._raiseNavigationKeyEvent(t.keyCode)):AutotaskDomSystem.KeyCode.isLeft(t.keyCode)?this._isLeftArrowNavigationAvailable()&&null!==this._navigationKeyHandler&&this._navigationKeyHandler(t.keyCode):AutotaskDomSystem.KeyCode.isRight(t.keyCode)&&this._isRightArrowNavigationAvailable()&&null!==this._navigationKeyHandler&&this._navigationKeyHandler(t.keyCode)},t.prototype._keyUpListener=function(t){null!==this._keyUpHandler&&this._keyUpHandler(t)},t.prototype._mouseDownListener=function(){this._raiseMouseDownEvent()},t.prototype._raiseBlurEvent=function(t){null!==this._blurHandler&&this._blurHandler(t)},t.prototype._raiseEnterKeyEvent=function(){null!==this._enterKeyHandler&&this._enterKeyHandler()},t.prototype._raiseEscapeKeyEvent=function(t,e){null!==this._escapeKeyHandler&&this._escapeKeyHandler(t,e)},t.prototype._raiseFocusEvent=function(){null!==this._focusHandler&&this._focusHandler()},t.prototype._raiseMouseDownEvent=function(){null!==this._mouseDownHandler&&this._mouseDownHandler()},t.prototype._raiseNavigationKeyEvent=function(t){null!==this._navigationKeyHandler&&this._navigationKeyHandler(t)},t.prototype._raiseSearchTextChangedEvent=function(t){null!==this._searchTextChangedHandler&&this._searchTextChangedHandler(t)},t.prototype._raiseTabbingAwayEvent=function(t,e){null!==this._tabbingAwayHandler&&this._tabbingAwayHandler(t,e)},t}();t.SearchBox=e}(AutotaskMultipleRecipientSelector||(AutotaskMultipleRecipientSelector={})),function(t){var e=function(){function e(t,e,n,i,o,a,r,s,l,u,c,d,h){var _=this;this._searchBox=t,this._chipList=e,this._dropDownCoordinator=n,this._autoCompleteCoordinator=i,this._valueChangedHandler=o,this._focusHandler=a,this._focusLostHandler=r,this._openDialogDelegate=s,this._alertDialog=l,this._maximumSelectionCount=u,this._maximumSelectionCountExceededMessage=c,this._emailAddressIconGenerator=d,this._notAnEmailMessage=h,this._searchBox.initialize((function(t){_._searchBoxTextChangedHandler(t)}),(function(){_._searchBoxFocusHandler()}),(function(t){_._searchBoxBlurHandler(t)}),(function(){_._searchBoxEnterKeyHandler()}),(function(t,e){_._searchBoxEscapeKeyHandler(t,e)}),(function(t){_._searchBoxNavigationKeyHandler(t)}),(function(t){_._searchBoxKeyUpHandler(t)}),(function(){_._searchBoxMouseDownHandler()})),this._chipList.addChipRemovedHandler((function(t){_._chipListChipRemovedHandler(t)})),this._chipList.setMouseDownHandler((function(){_._chipListMouseDownHandler()})),this._dropDownCoordinator.setItemClickHandler((function(t){_._dropDownOverlayItemClickedHandler(t)})),this._dropDownCoordinator.setOverlayHideCompletedHandler((function(){_._dropDownOverlayHideCompletedHandler()})),this._dropDownCoordinator.setOverlayMouseDownHandler((function(){_._overlayMouseDownHandler()})),this._dropDownCoordinator.setOverlayMouseLeaveHandler((function(){_._overlayMouseLeaveHandler()})),this._autoCompleteCoordinator.setItemClickHandler((function(t){_._autoCompleteOverlayItemClickedHandler(t)})),this._autoCompleteCoordinator.setOverlayHideCompletedHandler((function(){_._autoCompleteOverlayHideCompletedHandler()})),this._autoCompleteCoordinator.setOverlayMouseDownHandler((function(){_._overlayMouseDownHandler()})),this._autoCompleteCoordinator.setOverlayMouseLeaveHandler((function(){_._overlayMouseLeaveHandler()})),this._openDialogItemId="73FBBD97-3449-4bb8-BE17-2450B411EF9D",this._emailAddressValidator=new AutotaskEditorSystem.EmailAddressFormatValidator,this._queuedAlertMessage=null,this._notAnEmailMessage=h}return e.prototype.initialize=function(){},e.prototype._addEmailChip=function(e){var n=new AutotaskItemSelectionSystem.ItemValue(e,null),i=new t.ChipInformation(n,e,!1,this._emailAddressIconGenerator,[e],null);this._chipList.insert(i),this._valueChangedHandler(this._chipList.value)},e.prototype._addEmailChipsFromText=function(e){var n=!1;if(this._emailAddressValidator.validate(e))this._addEmailChip(e),n=!0;else{for(var i=/[^\s,;]+/g,o=null;null!==(o=i.exec(e));)if(this._emailAddressValidator.validate(o[0])){var a=new AutotaskItemSelectionSystem.ItemValue(o[0],null),r=new t.ChipInformation(a,o[0],!1,this._emailAddressIconGenerator,[o[0]],null);this._chipList.insert(r),n=!0}n&&this._valueChangedHandler(this._chipList.value)}return n},e.prototype._applyEnterKeyToAutoCompleteOverlay=function(){this._searchBox.clearSearchText();var t=this._autoCompleteCoordinator.itemSet;if(null!==t){var e=t.getTargetedItemValue();if(t.isTargetedItemSelected)null!==e&&(this._chipList.removeByValue(e),t.unselectTargetedItem(),this._dropDownCoordinator.itemSet.unselectItemByValue(e),this._valueChangedHandler(this._chipList.value));else if(this._chipList.count<this._maximumSelectionCount){if(null!==e){t.selectTargetedItem(),this._dropDownCoordinator.itemSet.selectItemByValue(e);var n=t.createChipInformationForTargetedItem();null!==n&&this._chipList.insert(n),this._valueChangedHandler(this._chipList.value)}}else this._queuedAlertMessage=this._maximumSelectionCountExceededMessage}this._autoCompleteCoordinator.hideOverlay()},e.prototype._applyEnterKeyToDropDownOverlay=function(){var t=this._dropDownCoordinator.itemSet,e=t.getTargetedItemValue();if(null!==e&&e.get_primaryValue()===this._openDialogItemId)this._openDialogDelegate();else if(t.isTargetedItemSelected){if(t.unselectTargetedItem(),null!==e){var n=this._chipList.height;this._chipList.removeByValue(e),n!==this._chipList.height&&this._dropDownCoordinator.positionOverlay()}this._valueChangedHandler(this._chipList.value)}else if(this._chipList.count<this._maximumSelectionCount){t.selectTargetedItem();var i=t.createChipInformationForTargetedItem();if(null!==i){n=this._chipList.height;this._chipList.insert(i),n!==this._chipList.height&&this._dropDownCoordinator.positionOverlay()}this._valueChangedHandler(this._chipList.value)}else this._queuedAlertMessage=this._maximumSelectionCountExceededMessage},e.prototype._autoCompleteOverlayHideCompletedHandler=function(){this._searchBox.isBlurEnabled=!0},e.prototype._autoCompleteOverlayItemClickedHandler=function(t){this._searchBox.clearSearchText(),t.isSelected?(t.unselect(),this._chipList.removeByValue(t.itemValue),this._dropDownCoordinator.itemSet.unselectItemByValue(t.itemValue),this._valueChangedHandler(this._chipList.value)):this._chipList.count<this._maximumSelectionCount?(t.select(),this._dropDownCoordinator.itemSet.selectItemByValue(t.itemValue),this._chipList.insert(t.createChipInformation()),this._valueChangedHandler(this._chipList.value)):this._showAlert(this._maximumSelectionCountExceededMessage),this._dropDownCoordinator.showOverlay()},e.prototype._chipListChipRemovedHandler=function(t){this._searchBox.searchText.length>0&&this._searchBox.clearSearchText(),this._autoCompleteCoordinator.isOverlayVisible&&this._autoCompleteCoordinator.hideOverlay(),this._dropDownCoordinator.isOverlayVisible&&this._dropDownCoordinator.hideOverlay(),this._dropDownCoordinator.itemSet.unselectItemByValue(t.value),this._valueChangedHandler(this._chipList.value)},e.prototype._chipListMouseDownHandler=function(){this._searchBox.isFocused||this._searchBox.focusWithEvent()},e.prototype._dropDownOverlayItemClickedHandler=function(t){if(t.itemValue.get_primaryValue()===this._openDialogItemId)this._openDialogDelegate();else if(t.isSelected){t.unselect();var e=this._chipList.height;this._chipList.removeByValue(t.itemValue),e!==this._chipList.height&&this._dropDownCoordinator.positionOverlay(),this._valueChangedHandler(this._chipList.value)}else if(this._chipList.count<this._maximumSelectionCount){t.select();e=this._chipList.height;this._chipList.insert(t.createChipInformation()),e!==this._chipList.height&&this._dropDownCoordinator.positionOverlay(),this._valueChangedHandler(this._chipList.value)}else this._showAlert(this._maximumSelectionCountExceededMessage)},e.prototype._dropDownOverlayHideCompletedHandler=function(){this._searchBox.isBlurEnabled=!0,this._dropDownCoordinator.itemSet.targetFirstItem()},e.prototype._overlayMouseDownHandler=function(){this._searchBox.isBlurEnabled=!1},e.prototype._overlayMouseLeaveHandler=function(){this._searchBox.isBlurEnabled=!0},e.prototype._searchBoxBlurHandler=function(t){var e=this._searchBox.searchText;e.length>0&&this._autoCompleteCoordinator.cancelAutoComplete(),this._dropDownCoordinator.isOverlayVisible?(t&&this._applyEnterKeyToDropDownOverlay(),this._dropDownCoordinator.hideOverlay()):this._autoCompleteCoordinator.isOverlayVisible?(t&&this._applyEnterKeyToAutoCompleteOverlay(),this._autoCompleteCoordinator.hideOverlay()):e.length>0&&this._addEmailChipsFromText(e),e.length>0&&this._searchBox.clearSearchText(),this._focusLostHandler()},e.prototype._searchBoxEnterKeyHandler=function(){var t=this._searchBox.searchText;t.length>0?this._autoCompleteCoordinator.isOverlayVisible?this._applyEnterKeyToAutoCompleteOverlay():this._addEmailChipsFromText(t)?this._searchBox.clearSearchText():this._queuedAlertMessage=this._notAnEmailMessage:this._dropDownCoordinator.isOverlayVisible?this._applyEnterKeyToDropDownOverlay():this._dropDownCoordinator.showOverlay()},e.prototype._searchBoxEscapeKeyHandler=function(t,e){this._searchBox.searchText.length>0?(this._searchBox.clearSearchText(),this._autoCompleteCoordinator.isOverlayVisible&&this._autoCompleteCoordinator.hideOverlay()):this._dropDownCoordinator.isOverlayVisible&&this._dropDownCoordinator.hideOverlay()},e.prototype._searchBoxFocusHandler=function(){this._focusHandler()},e.prototype._searchBoxKeyUpHandler=function(t){if(AutotaskDomSystem.KeyCode.isEnter(t.which)&&null!==this._queuedAlertMessage){var e=this._queuedAlertMessage;this._queuedAlertMessage=null,this._showAlert(e)}},e.prototype._searchBoxMouseDownHandler=function(){0!==this._searchBox.searchText.length||this._dropDownCoordinator.isOverlayVisible||this._dropDownCoordinator.showOverlay()},e.prototype._searchBoxNavigationKeyHandler=function(t){this._autoCompleteCoordinator.isOverlayVisible&&null!==this._autoCompleteCoordinator.itemSet?AutotaskDomSystem.KeyCode.isDown(t)?this._autoCompleteCoordinator.itemSet.moveTargetDown():AutotaskDomSystem.KeyCode.isUp(t)?this._autoCompleteCoordinator.itemSet.moveTargetUp():AutotaskDomSystem.KeyCode.isLeft(t)?this._autoCompleteCoordinator.itemSet.moveTargetLeft():AutotaskDomSystem.KeyCode.isRight(t)&&this._autoCompleteCoordinator.itemSet.moveTargetRight():this._dropDownCoordinator.isOverlayVisible?this._dropDownCoordinator.isOverlayVisible&&(AutotaskDomSystem.KeyCode.isDown(t)?this._dropDownCoordinator.itemSet.moveTargetDown():AutotaskDomSystem.KeyCode.isUp(t)?this._dropDownCoordinator.itemSet.moveTargetUp():AutotaskDomSystem.KeyCode.isLeft(t)?this._dropDownCoordinator.itemSet.moveTargetLeft():AutotaskDomSystem.KeyCode.isRight(t)&&this._dropDownCoordinator.itemSet.moveTargetRight()):this._dropDownCoordinator.showOverlay()},e.prototype._searchBoxTextChangedHandler=function(t){t.length>0?(this._dropDownCoordinator.isOverlayVisible&&this._dropDownCoordinator.hideOverlay(),this._autoCompleteCoordinator.autoComplete(t,this._chipList.value)):(this._autoCompleteCoordinator.isSearchInProgress&&this._autoCompleteCoordinator.cancelAutoComplete(),this._autoCompleteCoordinator.isOverlayVisible&&this._autoCompleteCoordinator.hideOverlay(),this._dropDownCoordinator.showOverlay())},e.prototype._showAlert=function(t){var e=this;this._searchBox.isAlertDialogTriggeringEvent=!0,this._alertDialog.show(t,(function(){e._searchBox.focusWithEvent(),e._searchBox.isAlertDialogTriggeringEvent=!1}))},e}();t.UserInteractionCoordinator=e}(AutotaskMultipleRecipientSelector||(AutotaskMultipleRecipientSelector={})),function(t){var e=function(){function t(t){this._editorInstance=t}return Object.defineProperty(t.prototype,"editorInstance",{get:function(){return this._editorInstance},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"instanceId",{get:function(){return this._editorInstance.id},enumerable:!1,configurable:!0}),t}();t.ChangeEventArgs=e}(AutotaskPasswordBox||(AutotaskPasswordBox={})),function(t){var e=function(){function t(t,e,n){this._editorInstance=t,this._previousValue=e,this._currentValue=n}return Object.defineProperty(t.prototype,"currentValue",{get:function(){return this._currentValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"editorInstance",{get:function(){return this._editorInstance},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"previousValue",{get:function(){return this._previousValue},enumerable:!1,configurable:!0}),t}();t.ImmediateChangeEventArgs=e}(AutotaskPasswordBox||(AutotaskPasswordBox={})),function(t){var e=function(e){function n(t,n,i,o,a,r){var s=e.call(this,t)||this;return s._inputElement=AutotaskDomSystem.Document.getElementById(t),s._inputElement.addEventListener("change",(function(){s._changeListener()})),s._inputElement.addEventListener("focus",(function(){s._focusListener()})),s._inputElement.addEventListener("input",(function(){s._inputListener()})),s._value=s._inputElement.value,s._originalValue=s._value,s._isEnabled=n,s._changeHandlers=[],null!==i&&s._changeHandlers.push(i),s._immediateChangeHandlers=[],null!==o&&s._immediateChangeHandlers.push(o),s._bindingPropertyName=a,s._passwordBoxValidation=r,s._passwordBoxValidation.addRequiredStateChangedHandler((function(){s._validationRequiredStateChanged()})),s._passwordBoxValidation.addValidationCorrectedHandler((function(){s._validationCorrected()})),s._passwordBoxValidation.addValidationFailedHandler((function(){s._validationFailed()})),s._broadcastKeyUpHandlers=[],s._dirtyStateChangeHandlers=[],s._tabbingAwayHandlers=[],s._invalidCssClass="Invalid",s._isDirty=!1,s._isValidationFrequencyElevated=!1,s._isValidationOverdue=!0,s._isValidationOverlayDismissed=!1,s}return __extends(n,e),Object.defineProperty(n.prototype,"participantValidation",{get:function(){return this._passwordBoxValidation},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isEnabled",{get:function(){return this._isEnabled},set:function(t){t!==this._isEnabled&&(this._isEnabled=t,this._inputElement.disabled=!t,t?this._isValidationFrequencyElevated&&this._validate(!1):(this._isValidationOverdue=!this._passwordBoxValidation.validationResult.isValid,this._passwordBoxValidation.resetValidationResult(this._inputElement)))},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isDirty",{get:function(){return this._isDirty},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"value",{get:function(){return this._value},set:function(t){var e=null===t?"":t;e!==this._value&&(this._value=e,this._inputElement.value=this._value,this._manageDirtyState(this._value)&&this._raiseDirtyStateChangeEvent(this._isDirty),this._isValidationOverdue=!0,this._isValidationFrequencyElevated&&this._validate(!1))},enumerable:!1,configurable:!0}),n.prototype.addBroadcastKeyUpHandler=function(t){var e=this;this._broadcastKeyUpHandlers.push(t),1===this._broadcastKeyUpHandlers.length&&this._inputElement.addEventListener("keyup",(function(t){e._keyUpListener(t)}))},n.prototype.addChangeHandler=function(t){this._changeHandlers.push(t)},n.prototype.addDirtyStateChangeHandler=function(t){this._dirtyStateChangeHandlers.push(t)},n.prototype.addImmediateChangeHandler=function(t){this._immediateChangeHandlers.push(t)},n.prototype.addTabbingAwayHandler=function(t){var e=this;this._tabbingAwayHandlers.push(t),1===this._tabbingAwayHandlers.length&&this._inputElement.addEventListener("keydown",(function(t){e._keyDownListener(t)}))},n.prototype.createRequestData=function(){var t=null;if(null!==this._bindingPropertyName){var e=null;this._isEnabled&&(e=this._value),(t={})[this._bindingPropertyName]=e}return t},n.prototype.focus=function(){this._inputElement.focus()},n.prototype.focusEnd=function(){this.focus()},n.prototype.focusStart=function(){this.focus()},n.prototype.resetValidation=function(){this._isValidationOverdue=!0},n.prototype.validate=function(){return this._validate(!1)},n.prototype.__initialize=function(){this._passwordBoxValidation.initialize()},n.prototype._changeListener=function(){this._raiseChangeEvent(),this._validate(!0)},n.prototype._focusListener=function(){this._isValidationOverlayDismissed||!this._isValidationFrequencyElevated||this._passwordBoxValidation.validationResult.isValid||this._showValidationOverlay()},n.prototype._inputListener=function(){var t=this._value;this._value=this._inputElement.value;var e=this._manageDirtyState(this._value);this._raiseImmediateChangeEvent(t,this._value),e&&this._raiseDirtyStateChangeEvent(this._isDirty),this._isValidationOverdue=!0,this._isValidationFrequencyElevated&&this._validate(!0)},n.prototype._keyDownListener=function(t){AutotaskDomSystem.KeyCode.isTab(t.which)&&this._raiseTabbingAwayEvent(t.shiftKey,(function(){t.preventDefault()}))},n.prototype._keyUpListener=function(t){(AutotaskDomSystem.KeyCode.isEnter(t.which)||AutotaskDomSystem.KeyCode.isEscape(t.which))&&this._raiseBroadcastKeyUpEvent(t.which)},n.prototype._manageDirtyState=function(t){var e=!1;return this._isDirty&&t!==this._originalValue||(this._isDirty=!this._isDirty,e=!0),e},n.prototype._raiseBroadcastKeyUpEvent=function(t){if(this._broadcastKeyUpHandlers.length>0)for(var e=new AutotaskEditorSystem.BroadcastKeyUpEventArgs(this.id,t),n=0,i=this._broadcastKeyUpHandlers;n<i.length;n++){(0,i[n])(e)}},n.prototype._raiseChangeEvent=function(){if(this._changeHandlers.length>0)for(var e=new t.ChangeEventArgs(this),n=0,i=this._changeHandlers;n<i.length;n++){(0,i[n])(e)}},n.prototype._raiseDirtyStateChangeEvent=function(t){if(this._dirtyStateChangeHandlers.length>0)for(var e=new AutotaskDirtyStateSystem.DirtyStateChangeEventArgs(t),n=0,i=this._dirtyStateChangeHandlers;n<i.length;n++){(0,i[n])(e)}},n.prototype._raiseImmediateChangeEvent=function(e,n){if(this._immediateChangeHandlers.length>0)for(var i=new t.ImmediateChangeEventArgs(this,e,n),o=0,a=this._immediateChangeHandlers;o<a.length;o++){(0,a[o])(i)}},n.prototype._raiseTabbingAwayEvent=function(t,e){if(this._tabbingAwayHandlers.length>0)for(var n=new AutotaskEditorSystem.TabbingAwayEventArgs(this.id,t,e),i=0,o=this._tabbingAwayHandlers;i<o.length;i++){(0,o[i])(n)}},n.prototype._showValidationOverlay=function(){var t=this;autotask.globalValidationOverlay.show(this._inputElement,this.id,this._passwordBoxValidation.validationResult.message,!0,(function(){t._validationOverlayClosed()}),null)},n.prototype._validate=function(t){var e=this._passwordBoxValidation.validationResult.isValid;return this._isValidationOverdue&&this._isEnabled&&(e=this._passwordBoxValidation.validate(this._value,t,this._inputElement),this._isValidationOverdue=!1),e?autotask.globalValidationOverlay.hide(this.id):this._showValidationOverlay(),e},n.prototype._validationCorrected=function(){this._inputElement.classList.remove(this._invalidCssClass)},n.prototype._validationFailed=function(){this._inputElement.classList.add(this._invalidCssClass),this._isValidationFrequencyElevated=!0},n.prototype._validationOverlayClosed=function(){this._isValidationOverlayDismissed=!0},n.prototype._validationRequiredStateChanged=function(){this.resetValidation(),this._isValidationFrequencyElevated&&this._validate(!0)},n}(AutotaskEditorSystem.Editor);t.PasswordBox=e}(AutotaskPasswordBox||(AutotaskPasswordBox={})),function(t){var e=function(t){function e(e,n,i){var o=t.call(this,e)||this;return o._requiredValidatorProvider=n,o._regularExpressionValidator=i,o._requiredValidator=null,o}return __extends(e,t),Object.defineProperty(e.prototype,"_isRequired",{get:function(){return null!==this._requiredValidator},enumerable:!1,configurable:!0}),e.prototype.initialize=function(){var t=this;null!==this._requiredValidatorProvider&&(this._requiredValidatorProvider.initialize(),this._requiredValidatorProvider.addRequiredStateChangedHandler((function(){t._requiredStateChanged()})),this._requiredValidator=this._requiredValidatorProvider.createValidator())},e.prototype.resetValidationResult=function(t){this._updateValidationResult(new AutotaskEditorSystem.ValidResult,!1,t,!0)},e.prototype.validate=function(t,e,n){var i=new AutotaskEditorSystem.ValidResult;return null!==this._requiredValidator&&(i=this._requiredValidator.validate(t)),i.isValid&&null!==this._regularExpressionValidator&&(i=this._regularExpressionValidator.validate(t)),this._updateValidationResult(i,e,n,!0),i.isValid},e.prototype._requiredStateChanged=function(){var t=this._requiredValidatorProvider;this._requiredValidator=t.createValidator(),this._raiseRequiredStateChanged()},e}(AutotaskEditorSystem.EditorValidation);t.PasswordBoxValidation=e}(AutotaskPasswordBox||(AutotaskPasswordBox={})),function(t){var e=function(){function t(t){this._editorInstance=t}return Object.defineProperty(t.prototype,"editorInstance",{get:function(){return this._editorInstance},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"instanceId",{get:function(){return this._editorInstance.id},enumerable:!1,configurable:!0}),t}();t.ChangeEventArgs=e}(AutotaskPercentageBox||(AutotaskPercentageBox={})),function(t){var e=function(){function t(t,e,n){this._editorInstance=t,this._previousValue=e,this._currentValue=n}return Object.defineProperty(t.prototype,"currentValue",{get:function(){return this._currentValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"editorInstance",{get:function(){return this._editorInstance},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"previousValue",{get:function(){return this._previousValue},enumerable:!1,configurable:!0}),t}();t.ImmediateChangeEventArgs=e}(AutotaskPercentageBox||(AutotaskPercentageBox={})),function(t){var e=function(e){function n(t,n,i,o,a,r,s,l){var u=this,c=AutotaskDomSystem.Document.getElementById(t);return(u=e.call(this,t,c,n,i,s,!1,l)||this)._numberOfDecimalPlaces=r,u._percentageBoxValidation=l,u._changeHandlers=new Array,u._immediateChangeHandlers=new Array,null!==o&&u._changeHandlers.push(o),null!==a&&u._immediateChangeHandlers.push(a),u}return __extends(n,e),n.prototype.addChangeHandler=function(t){this._changeHandlers.push(t)},n.prototype.addImmediateChangeHandler=function(t){this._immediateChangeHandlers.push(t)},n.prototype.__initialize=function(){this._percentageBoxValidation.initialize()},n.prototype._convertNumberToString=function(t){return null},n.prototype._convertNumberToDisplayString=function(t){var e=null;if(null!==t){var n=100*t;e=window.autotask.convert.decimalToString(n,this._numberOfDecimalPlaces,null)}return e},n.prototype._convertNumberToSerializedString=function(t){var e=null;if(null!==t){var n=this._numberOfDecimalPlaces+2;e=window.autotask.convert.decimalToString(t,n,null)}return e},n.prototype._convertDisplayStringToNumber=function(t){var e=this._numberOfDecimalPlaces+2,n=window.autotask.convert.stringToDecimal(t,e);return parseFloat((n/100).toFixed(e))},n.prototype._raiseChangeEvent=function(){if(this._changeHandlers.length>0)for(var e=new t.ChangeEventArgs(this),n=0,i=this._changeHandlers;n<i.length;n++){(0,i[n])(e)}},n.prototype._raiseImmediateChangeEvent=function(e,n){if(this._immediateChangeHandlers.length>0)for(var i=new t.ImmediateChangeEventArgs(this,e,n),o=0,a=this._immediateChangeHandlers;o<a.length;o++){(0,a[o])(i)}},n}(AutotaskEditorSystem.NumberBox);t.PercentageBox=e}(AutotaskPercentageBox||(AutotaskPercentageBox={})),function(t){var e=function(t){function e(e,n,i,o){var a=t.call(this,e)||this;return a._invalidNumberMessage=n,a._requiredValidatorProvider=i,a._rangeValidator=o,a._requiredValidator=null,a}return __extends(e,t),Object.defineProperty(e.prototype,"_isRequired",{get:function(){return null!==this._requiredValidator},enumerable:!1,configurable:!0}),e.prototype.initialize=function(){var t=this;null!==this._requiredValidatorProvider&&(this._requiredValidatorProvider.initialize(),this._requiredValidatorProvider.addRequiredStateChangedHandler((function(){t._requiredStateChanged()})),this._requiredValidator=this._requiredValidatorProvider.createValidator())},e.prototype.resetValidationResult=function(t){this._updateValidationResult(new AutotaskEditorSystem.ValidResult,!1,t,!0)},e.prototype.validate=function(t,e,n,i){var o=new AutotaskEditorSystem.ValidResult;return e||(o=new AutotaskEditorSystem.InvalidResult(this._invalidNumberMessage,null)),o.isValid&&null!==this._requiredValidator&&(o=this._requiredValidator.validate(t)),o.isValid&&null!==this._rangeValidator&&(o=this._rangeValidator.validate(t)),this._updateValidationResult(o,n,i,!0),o.isValid},e.prototype._requiredStateChanged=function(){var t=this._requiredValidatorProvider;this._requiredValidator=t.createValidator(),this._raiseRequiredStateChanged()},e}(AutotaskEditorSystem.EditorValidation);t.PercentageBoxValidation=e}(AutotaskPercentageBox||(AutotaskPercentageBox={})),function(t){var e=function(){function t(t,e){this._editorInstance=t,this._isSelected=e}return Object.defineProperty(t.prototype,"editorInstance",{get:function(){return this._editorInstance},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"instanceId",{get:function(){return this._editorInstance.id},enumerable:!1,configurable:!0}),t}();t.ChangeEventArgs=e}(AutotaskRadioButton||(AutotaskRadioButton={})),function(t){var e=function(e){function n(t,n,i,o,a,r,s){var l=e.call(this,t)||this,u=AutotaskDomSystem.Document.getElementById(t);return l._radioButtonElement=AutotaskDomSystem.Document.getFirstElementChild(u),l._radioButtonElement.addEventListener("click",(function(){l._clickListener()})),l._radioButtonElement.addEventListener("blur",(function(){l._blurListener()})),l._radioButtonElement.addEventListener("focus",(function(){l.focus()})),l._radioButtonElement.addEventListener("keydown",(function(t){l._keyDownListener(t)})),l._radioButtonElement.addEventListener("keyup",(function(t){l._keyUpListener(t)})),l._originalIsSelected=n,l._isSelected=l._originalIsSelected,l._groupValue="",l._groupId=u.dataset.rbgId,l._individualValue=i,l._isEnabled=o,l._changeHandlers=[],null!==a&&l._changeHandlers.push(a),l._bindingPropertyName=r,l._labelId=s,l._dirtyStateChangeHandlers=[],l._tabbingAwayHandlers=[],l._isDirty=!1,l._isTabKeyDownHandled=!1,l._label=null,l._radioButtons=[],l}return __extends(n,e),Object.defineProperty(n.prototype,"isEnabled",{get:function(){return this._isEnabled},set:function(t){t!==this._isEnabled&&(this._isEnabled=t,this._radioButtonElement.classList.toggle("Disabled"),null!==this._label&&(this._label.isEnabled=t))},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isDirty",{get:function(){return this._isDirty},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"_value",{set:function(t){this._groupValue!==t&&(this._groupValue=t,this._isSelected=this._groupValue===this._individualValue,this._radioButtonElement.classList.toggle("Selected",this._isSelected),this._manageDirtyState(this._isSelected)&&this._raiseDirtyStateChangeEvent(this._isDirty))},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"value",{get:function(){return this._groupValue},set:function(t){var e=this;this._value=t,this._radioButtons.forEach((function(t){t._value=e._groupValue}))},enumerable:!1,configurable:!0}),n.prototype.addChangeHandler=function(t){this._changeHandlers.push(t)},n.prototype.addDirtyStateChangeHandler=function(t){this._dirtyStateChangeHandlers.push(t)},n.prototype.addTabbingAwayHandler=function(t){this._tabbingAwayHandlers.push(t)},n.prototype.createRequestData=function(){var t=null;if(null!==this._bindingPropertyName&&this._isSelected){var e=null;this._isEnabled&&(e=this._groupValue),(t={})[this._bindingPropertyName]=e}return t},n.prototype.focus=function(){this._radioButtonElement.focus()},n.prototype.focusEnd=function(){this.focus()},n.prototype.focusStart=function(){this.focus()},n.prototype.removeFocus=function(){this._radioButtonElement.blur()},n.prototype.__initialize=function(){var t=this;void 0!==this._groupId&&this._initializeGroupValue(this._groupId),null!==this._labelId&&(this._label=autotask.find(this._labelId),this._label.addClickHandler((function(){t._clickListener()})),this._label.setMouseDownHandler((function(){t._labelMouseDownListener()})),this._label.setMouseEnterHandler((function(){t._labelMouseEnterListener()})),this._label.setMouseLeaveHandler((function(){t._labelMouseLeaveListener()})),this._label.setMouseUpHandler((function(){t._labelMouseUpListener()})))},n.prototype._initializeGroupValue=function(t){for(var e=this._radioButtonElement.parentElement;null!==e&&void 0===e.dataset.postedContainer&&e!==document.body;)e=e.parentElement;null===e&&(e=document),this._isSelected&&(this._groupValue=this._individualValue);for(var n=e.querySelectorAll(".RadioButton[data-rbg-id='"+t+"']"),i=0;i<n.length;i++)if(this.id!==n[i].id){var o=autotask.find(n[i].id);this._radioButtons.push(o),this._isSelected&&(o._groupValue=this._individualValue)}},n.prototype._blurListener=function(){this._isTabKeyDownHandled=!1},n.prototype._changeValue=function(){for(var t=null,e=function(e){if(e._isSelected)return t=function(){e._raiseChangeEvent()},"break"},n=0,i=this._radioButtons;n<i.length;n++){if("break"===e(i[n]))break}this.value=this._individualValue,this._raiseChangeEvent(),null!==t&&t()},n.prototype._clickListener=function(){this._isEnabled&&!this._isSelected&&this._changeValue()},n.prototype._keyDownListener=function(t){AutotaskDomSystem.KeyCode.isTab(t.which)?(this._isTabKeyDownHandled=!0,this._raiseTabbingAwayEvent(t.shiftKey,(function(){t.preventDefault()})),this._radioButtonElement.classList.remove("Active")):this._isEnabled&&AutotaskDomSystem.KeyCode.isSpace(t.which)&&(t.preventDefault(),this._radioButtonElement.classList.add("Active"))},n.prototype._keyUpListener=function(t){AutotaskDomSystem.KeyCode.isTab(t.which)&&this._isTabKeyDownHandled?this._isTabKeyDownHandled=!1:this._isEnabled&&AutotaskDomSystem.KeyCode.isSpace(t.which)&&(t.preventDefault(),this._radioButtonElement.classList.remove("Active"),this._isSelected||this._changeValue())},n.prototype._labelMouseDownListener=function(){this._isEnabled&&this._radioButtonElement.classList.add("Active")},n.prototype._labelMouseEnterListener=function(){this._isEnabled&&this._radioButtonElement.classList.add("Hover")},n.prototype._labelMouseLeaveListener=function(){this._isEnabled&&this._radioButtonElement.classList.remove("Hover")},n.prototype._labelMouseUpListener=function(){this._isEnabled&&this._radioButtonElement.classList.remove("Active")},n.prototype._manageDirtyState=function(t){var e=!1;return this._isDirty&&t!==this._originalIsSelected||(this._isDirty=!this._isDirty,e=!0),e},n.prototype._raiseChangeEvent=function(){if(this._changeHandlers.length>0)for(var e=new t.ChangeEventArgs(this,this._isSelected),n=0,i=this._changeHandlers;n<i.length;n++){(0,i[n])(e)}},n.prototype._raiseDirtyStateChangeEvent=function(t){if(this._dirtyStateChangeHandlers.length>0)for(var e=new AutotaskDirtyStateSystem.DirtyStateChangeEventArgs(t),n=0,i=this._dirtyStateChangeHandlers;n<i.length;n++){(0,i[n])(e)}},n.prototype._raiseTabbingAwayEvent=function(t,e){if(this._tabbingAwayHandlers.length>0)for(var n=new AutotaskEditorSystem.TabbingAwayEventArgs(this.id,t,e),i=0,o=this._tabbingAwayHandlers;i<o.length;i++){(0,o[i])(n)}},n}(AutotaskEditorSystem.Editor);t.RadioButton=e}(AutotaskRadioButton||(AutotaskRadioButton={})),function(t){var e=function(){function t(){this._findDescendantsHandler=null,this._findParentHandler=null,this._selectedRange=null}return Object.defineProperty(t.prototype,"findDescendantsHandler",{set:function(t){this._findDescendantsHandler=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"findParentHandler",{set:function(t){this._findParentHandler=t},enumerable:!1,configurable:!0}),t.prototype._findDescendants=function(t){var e=[];return null!==this._findDescendantsHandler&&(e=this._findDescendantsHandler(t)),e},t.prototype._findParent=function(t,e){var n=null;return null!==this._findParentHandler&&(n=this._findParentHandler(t,e)),n},t.prototype._restoreSelection=function(){if(null!==this._selectedRange){var t=document.getSelection();null!==t&&(t.removeAllRanges(),t.addRange(this._selectedRange))}},t.prototype._saveSelection=function(){var t=null,e=document.getSelection();null!==e&&e.rangeCount>0&&(t=e.getRangeAt(0)),this._selectedRange=t},t}();t.ToolBar=e}(AutotaskRichTextBox||(AutotaskRichTextBox={})),function(t){var e=function(t){function e(e,n,i,o,a,r,s,l,u,c){var d=t.call(this)||this;return d._linkButtonId=e,d._linkDialogRoute=n,d._anchorButtonId=i,d._anchorDialogRoute=o,d._hrefParameterName=a,d._anchorNameParameterName=r,d._anchorNamesParameterName=s,d._uniqueAnchorNamePrefix=l,d._anchorImagePath=u,d._anchorCssClass=c,d._tabbingAwayHandlers=[],d._anchorButtonInstance=null,d._linkButtonInstance=null,d._editingAnchor=null,d._editingLink=null,d._selectedAnchor=null,d._selectedLink=null,d}return __extends(e,t),Object.defineProperty(e.prototype,"_anchorButton",{get:function(){return this._anchorButtonInstance},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_linkButton",{get:function(){return this._linkButtonInstance},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isEnabled",{set:function(t){this._anchorButton.isEnabled=t,this._linkButton.isEnabled=t},enumerable:!1,configurable:!0}),e.prototype.addTabbingAwayHandler=function(t){this._tabbingAwayHandlers.push(t)},e.prototype.createAnchor=function(t){if(this._restoreSelection(),null!==this._editingAnchor)this._editingAnchor.id=this._createUniqueAnchorId(t);else{var e=document.createElement("img");e.src=this._anchorImagePath,e.id=this._createUniqueAnchorId(t),e.classList.add(this._anchorCssClass),document.execCommand("insertHTML",!1,e.outerHTML)}},e.prototype.createLink=function(t){this._restoreSelection(),null!==this._editingLink?this._editingLink.href=t:document.execCommand("createLink",!1,t)},e.prototype.focusEnd=function(){this._anchorButton.focus()},e.prototype.focusStart=function(){this._linkButton.focus()},e.prototype.selectionChanged=function(t){var e=t.selection.anchorNode,n=t.selection.focusNode,i=null,o=this._findAnchorParent(e);if(null!==o){var a=o;n!==e&&(a=this._findAnchorParent(n)),o===a&&(i=o)}var r=t.selection.getRangeAt(0);this._linkButton.isEnabled=null!==i||!r.collapsed,this._linkButton.isSelected=null!==i,this._selectedLink=i,this._anchorButton.isEnabled=!0;var s=e instanceof HTMLImageElement&&e===n;this._anchorButton.isSelected=s,this._selectedAnchor=s?e:null},e.prototype.selectionCleared=function(){this.isEnabled=!1,this._selectedAnchor=null,this._selectedLink=null},e.prototype.__initialize=function(){var t=this;this._linkButtonInstance=autotask.find(this._linkButtonId);var e=new AutotaskButtonSystem.ClickEventHandler((function(){t._linkButtonClickHandler()}));this._linkButtonInstance.addEventHandler(e),this._linkButtonInstance.addTabbingAwayHandler((function(e){t._linkButtonTabbingAwayHandler(e)})),this._anchorButtonInstance=autotask.find(this._anchorButtonId);var n=new AutotaskButtonSystem.ClickEventHandler((function(){t._anchorButtonClickHandler()}));this._anchorButtonInstance.addEventHandler(n),this._anchorButtonInstance.addTabbingAwayHandler((function(e){t._anchorButtonTabbingAwayHandler(e)}))},e.prototype._anchorButtonClickHandler=function(){this._saveSelection(),this._editingAnchor=this._selectedAnchor;var t=new AutotaskRequestDataSystem.RequestData;null!==this._selectedAnchor&&t.addString(this._anchorNameParameterName,this._createReadableAnchorName(this._selectedAnchor.id));for(var e=[],n=0,i=this._findAnchorNames();n<i.length;n++){var o=i[n];e.push(this._createReadableAnchorName(o))}t.addString(this._anchorNamesParameterName,e.join("|")),this._anchorDialogRoute.makeRequest(t,null)},e.prototype._anchorButtonTabbingAwayHandler=function(t){t.isShiftKeyPressed||this._raiseTabbingAwayEvent(t)},e.prototype._createUniqueAnchorId=function(t){return this._uniqueAnchorNamePrefix+"_"+t.replace(/ /g,"-")},e.prototype._createReadableAnchorName=function(t){return t.split("_")[1].replace(/-/g," ")},e.prototype._linkButtonClickHandler=function(){this._saveSelection(),this._editingLink=this._selectedLink;var t=new AutotaskRequestDataSystem.RequestData;if(null!==this._selectedLink){var e=this._selectedLink.getAttribute("href");t.addString(this._hrefParameterName,e)}t.addString(this._anchorNamesParameterName,this._findAnchorNames().join("|")),this._linkDialogRoute.makeRequest(t,null)},e.prototype._linkButtonTabbingAwayHandler=function(t){t.isShiftKeyPressed&&this._raiseTabbingAwayEvent(t)},e.prototype._findAnchorNames=function(){for(var t=[],e=0,n=this._findDescendants("."+this._anchorCssClass);e<n.length;e++){var i=n[e];t.push(i.id)}return t},e.prototype._findAnchorParent=function(t){return this._findParent(t,(function(t){return t instanceof HTMLAnchorElement}))},e.prototype._raiseTabbingAwayEvent=function(t){for(var e=0,n=this._tabbingAwayHandlers;e<n.length;e++){(0,n[e])(t.isShiftKeyPressed,(function(){t.cancel()}))}},e}(t.ToolBar);t.AnchorToolBar=e}(AutotaskRichTextBox||(AutotaskRichTextBox={})),function(t){var e=function(t){function e(e){var n=t.call(this)||this;return n._clearStyleButtonId=e,n._tabbingAwayHandlers=[],n._clearStyleButtonInstance=null,n}return __extends(e,t),Object.defineProperty(e.prototype,"isEnabled",{set:function(t){this._clearStyleButtonInstance.isEnabled=t},enumerable:!1,configurable:!0}),e.prototype.focusEnd=function(){this._clearStyleButtonInstance.focus()},e.prototype.focusStart=function(){this.focusEnd()},e.prototype.addTabbingAwayHandler=function(t){this._tabbingAwayHandlers.push(t)},e.prototype.selectionChanged=function(){this.isEnabled=!0},e.prototype.selectionCleared=function(){this.isEnabled=!1},e.prototype.__initialize=function(){var t=this;this._clearStyleButtonInstance=autotask.find(this._clearStyleButtonId);var e=new AutotaskButtonSystem.ClickEventHandler((function(){t._clearStyleButtonClickHandler()}));this._clearStyleButtonInstance.addEventHandler(e),this._clearStyleButtonInstance.addTabbingAwayHandler((function(e){t._clearStyleButtonTabbingAwayHandler(e)}))},e.prototype._clearStyleButtonClickHandler=function(){document.execCommand("removeFormat")},e.prototype._clearStyleButtonTabbingAwayHandler=function(t){this._raiseTabbingAwayEvent(t)},e.prototype._raiseTabbingAwayEvent=function(t){for(var e=0,n=this._tabbingAwayHandlers;e<n.length;e++){(0,n[e])(t.isShiftKeyPressed,(function(){t.cancel()}))}},e}(t.ToolBar);t.ClearStyleToolBar=e}(AutotaskRichTextBox||(AutotaskRichTextBox={})),function(t){var e=function(t){function e(e,n,i,o,a){var r=t.call(this)||this;return r._foreColorButtonElement=AutotaskDomSystem.Document.getElementById(e),r._foreColorButtonId=n,r._hiliteColorButtonElement=AutotaskDomSystem.Document.getElementById(i),r._hiliteColorButtonId=o,r._colorSetName=a,r._tabbingAwayHandlers=[],r._isForeColorContextMenuVisible=!1,r._isHiliteColorContextMenuVisible=!1,r._foreColorButtonInstance=null,r._hiliteColorButtonInstance=null,r._selectedForeColor=null,r._selectedHiliteColor=null,r}return __extends(e,t),Object.defineProperty(e.prototype,"isEnabled",{set:function(t){this._foreColorButtonInstance.isEnabled=t,this._hiliteColorButtonInstance.isEnabled=t,t||autotask.globalColorPicker.hide()},enumerable:!1,configurable:!0}),e.prototype.addTabbingAwayHandler=function(t){this._tabbingAwayHandlers.push(t)},e.prototype.focusEnd=function(){this._hiliteColorButtonInstance.focus()},e.prototype.focusStart=function(){this._foreColorButtonInstance.focus()},e.prototype.selectionChanged=function(t){this.isEnabled=!0;var e=t.selection.anchorNode,n=t.selection.focusNode;if(null!==e.parentElement&&n===e){var i=getComputedStyle(e.parentElement);this._selectedForeColor=AutotaskColorPickerSystem.ColorConverter.convertToHexadecimalColor(i.color),this._selectedHiliteColor=AutotaskColorPickerSystem.ColorConverter.convertToHexadecimalColor(i.backgroundColor)}else this._selectedForeColor=null,this._selectedHiliteColor=null},e.prototype.selectionCleared=function(){this.isEnabled=!1,this._selectedForeColor=null,this._selectedHiliteColor=null},e.prototype.__initialize=function(){var t=this;this._foreColorButtonInstance=autotask.find(this._foreColorButtonId);var e=new AutotaskButtonSystem.ClickEventHandler((function(){t._foreColorButtonClickHandler()}));this._foreColorButtonInstance.addEventHandler(e),this._foreColorButtonInstance.addTabbingAwayHandler((function(e){t._foreColorButtonTabbingAwayHandler(e)})),this._hiliteColorButtonInstance=autotask.find(this._hiliteColorButtonId);var n=new AutotaskButtonSystem.ClickEventHandler((function(){t._hiliteColorButtonClickHandler()}));this._hiliteColorButtonInstance.addEventHandler(n),this._hiliteColorButtonInstance.addTabbingAwayHandler((function(e){t._hiliteColorButtonTabbingAwayHandler(e)}))},e.prototype._foreColorButtonClickHandler=function(){var t=this;this._isForeColorContextMenuVisible?autotask.globalColorPicker.hide():(autotask.globalColorPicker.showWithHexadecimal(this._foreColorButtonElement,this._colorSetName,(function(e,n,i){t._foreColorSelectedHandler(i)}),(function(){t._foreColorContextMenuHideCompletedHandler()}),this._selectedForeColor),this._isForeColorContextMenuVisible=!0)},e.prototype._foreColorContextMenuHideCompletedHandler=function(){this._isForeColorContextMenuVisible=!1},e.prototype._foreColorSelectedHandler=function(t){null===t&&autotask.throwArgumentNullException("colorHexadecimal"),document.execCommand("foreColor",!1,t),this._selectedForeColor=t},e.prototype._foreColorButtonTabbingAwayHandler=function(t){t.isShiftKeyPressed?(this._hiliteColorButtonInstance.focus(),t.cancel()):this._raiseTabbingAwayEvent(t)},e.prototype._hiliteColorButtonClickHandler=function(){var t=this;this._isHiliteColorContextMenuVisible?autotask.globalColorPicker.hide():(autotask.globalColorPicker.showWithHexadecimal(this._hiliteColorButtonElement,this._colorSetName,(function(e,n,i){t._hiliteColorSelectedHandler(i)}),(function(){t._hiliteColorContextMenuHideCompletedHandler()}),this._selectedHiliteColor),this._isHiliteColorContextMenuVisible=!0)},e.prototype._hiliteColorContextMenuHideCompletedHandler=function(){this._isHiliteColorContextMenuVisible=!1},e.prototype._hiliteColorSelectedHandler=function(t){null===t&&autotask.throwArgumentNullException("colorHexadecimal"),document.execCommand("hiliteColor",!1,t),this._selectedHiliteColor=t},e.prototype._hiliteColorButtonTabbingAwayHandler=function(t){t.isShiftKeyPressed?this._raiseTabbingAwayEvent(t):(this._foreColorButtonInstance.focus(),t.cancel())},e.prototype._raiseTabbingAwayEvent=function(t){for(var e=0,n=this._tabbingAwayHandlers;e<n.length;e++){(0,n[e])(t.isShiftKeyPressed,(function(){t.cancel()}))}},e}(t.ToolBar);t.ColorToolBar=e}(AutotaskRichTextBox||(AutotaskRichTextBox={})),function(t){var e=function(){function t(t){this._imageUploadButtonId=t,this._tabbingAwayHandlers=[],this._imageUploadButton=null,this._insertImageFileListHandler=null}return Object.defineProperty(t.prototype,"isEnabled",{set:function(t){this._imageUploadButton.isEnabled=t},enumerable:!1,configurable:!0}),t.prototype.addTabbingAwayHandler=function(t){this._tabbingAwayHandlers.push(t)},t.prototype.focusEnd=function(){this._imageUploadButton.focus()},t.prototype.focusStart=function(){this.focusEnd()},t.prototype.registerHandlers=function(t){var e=this;this._insertImageFileListHandler=t,this._imageUploadButton=autotask.find(this._imageUploadButtonId),this._imageUploadButton.addFileListChangedHandler((function(t){e._imageUploadButtonFileListChangedHandler(t)})),this._imageUploadButton.addTabbingAwayHandler((function(t,n){e._imageUploadButtonTabbingAwayHandler(t,n)}))},t.prototype._imageUploadButtonFileListChangedHandler=function(t){this._raiseInsertImageFileListEvent(t)},t.prototype._imageUploadButtonTabbingAwayHandler=function(t,e){this._raiseTabbingAwayEvent(t,e)},t.prototype._raiseInsertImageFileListEvent=function(t){null!==this._insertImageFileListHandler&&this._insertImageFileListHandler(t)},t.prototype._raiseTabbingAwayEvent=function(t,e){for(var n=0,i=this._tabbingAwayHandlers;n<i.length;n++){(0,i[n])(t,e)}},t}();t.ImageToolBar=e}(AutotaskRichTextBox||(AutotaskRichTextBox={})),function(t){var e=function(t){function e(e,n){var i=t.call(this)||this;return i._tabbingAwayHandlers=[],i._indentButtonId=e,i._outdentButtonId=n,i._indentButton=null,i._outdentButton=null,i}return __extends(e,t),Object.defineProperty(e.prototype,"isEnabled",{set:function(t){this._indentButton.isEnabled=t,this._outdentButton.isEnabled=t},enumerable:!1,configurable:!0}),e.prototype.addTabbingAwayHandler=function(t){this._tabbingAwayHandlers.push(t)},e.prototype.focusStart=function(){this._outdentButton.focus()},e.prototype.focusEnd=function(){this._indentButton.focus()},e.prototype.selectionChanged=function(){this.isEnabled=!0},e.prototype.selectionCleared=function(){this.isEnabled=!1},e.prototype.__initialize=function(){var t=this;this._indentButton=autotask.find(this._indentButtonId);var e=new AutotaskButtonSystem.ClickEventHandler((function(){t._indentButtonClickHandler()}));this._indentButton.addEventHandler(e),this._indentButton.addTabbingAwayHandler((function(e){t._indentButtonTabbingAwayHandler(e)})),this._outdentButton=autotask.find(this._outdentButtonId);var n=new AutotaskButtonSystem.ClickEventHandler((function(){t._outdentButtonClickHandler()}));this._outdentButton.addEventHandler(n),this._outdentButton.addTabbingAwayHandler((function(e){t._outdentButtonTabbingAwayHandler(e)}))},e.prototype._indentButtonClickHandler=function(){document.execCommand("indent")},e.prototype._indentButtonTabbingAwayHandler=function(t){t.isShiftKeyPressed?(this._outdentButton.focus(),t.cancel()):this._raiseTabbingAwayEvent(t)},e.prototype._outdentButtonClickHandler=function(){document.execCommand("outdent")},e.prototype._outdentButtonTabbingAwayHandler=function(t){t.isShiftKeyPressed?this._raiseTabbingAwayEvent(t):(this._indentButton.focus(),t.cancel())},e.prototype._raiseTabbingAwayEvent=function(t){for(var e=0,n=this._tabbingAwayHandlers;e<n.length;e++){(0,n[e])(t.isShiftKeyPressed,(function(){t.cancel()}))}},e}(t.ToolBar);t.IndentationToolBar=e}(AutotaskRichTextBox||(AutotaskRichTextBox={})),function(t){var e=function(t){function e(e,n,i){var o=t.call(this)||this;return o._justifyLeftButtonId=e,o._justifyCenterButtonId=n,o._justifyRightButtonId=i,o._tabbingAwayHandlers=[],o._justifyLeftButton=null,o._justifyCenterButton=null,o._justifyRightButton=null,o._selection=null,o}return __extends(e,t),Object.defineProperty(e.prototype,"_isJustifyCenterButtonSelected",{set:function(t){this._justifyCenterButton.isSelected=t,!0===t&&(this._isJustifyLeftButtonSelected=!1,this._isJustifyRightButtonSelected=!1)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_isJustifyLeftButtonSelected",{set:function(t){this._justifyLeftButton.isSelected=t,!0===t&&(this._isJustifyCenterButtonSelected=!1,this._isJustifyRightButtonSelected=!1)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_isJustifyRightButtonSelected",{set:function(t){this._justifyRightButton.isSelected=t,!0===t&&(this._isJustifyLeftButtonSelected=!1,this._isJustifyCenterButtonSelected=!1)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isEnabled",{set:function(t){this._justifyLeftButton.isEnabled=t,this._justifyCenterButton.isEnabled=t,this._justifyRightButton.isEnabled=t},enumerable:!1,configurable:!0}),e.prototype.addTabbingAwayHandler=function(t){this._tabbingAwayHandlers.push(t)},e.prototype.focusEnd=function(){this._justifyRightButton.focus()},e.prototype.focusStart=function(){this._justifyLeftButton.focus()},e.prototype.selectionChanged=function(t){this._selection=t.selection,this.isEnabled=!0;var e=t.selection.anchorNode,n=t.selection.focusNode;this._toggleJustifyLeftButtonSelection(e,n),this._toggleJustifyCenterButtonSelection(e,n),this._toggleJustifyRightButtonSelection(e,n)},e.prototype.selectionCleared=function(){this._selection=null,this.isEnabled=!1,this._isJustifyLeftButtonSelected=!1,this._isJustifyCenterButtonSelected=!1,this._isJustifyRightButtonSelected=!1},e.prototype.__initialize=function(){var t=this;this._justifyLeftButton=autotask.find(this._justifyLeftButtonId);var e=new AutotaskButtonSystem.ClickEventHandler((function(){t._justifyLeftButtonClickHandler()}));this._justifyLeftButton.addEventHandler(e),this._justifyLeftButton.addTabbingAwayHandler((function(e){t._justifyLeftButtonTabbingAwayHandler(e)})),this._justifyCenterButton=autotask.find(this._justifyCenterButtonId);var n=new AutotaskButtonSystem.ClickEventHandler((function(){t._justifyCenterButtonClickHandler()}));this._justifyCenterButton.addEventHandler(n),this._justifyCenterButton.addTabbingAwayHandler((function(e){t._justifyCenterButtonTabbingAwayHandler(e)})),this._justifyRightButton=autotask.find(this._justifyRightButtonId);var i=new AutotaskButtonSystem.ClickEventHandler((function(){t._justifyRightButtonClickHandler()}));this._justifyRightButton.addEventHandler(i),this._justifyRightButton.addTabbingAwayHandler((function(e){t._justifyRightButtonTabbingAwayHandler(e)}))},e.prototype._findJustifyParent=function(t){return this._findParent(t,(function(t){return t instanceof HTMLDivElement||t instanceof HTMLLIElement}))},e.prototype._isJustifiedCenter=function(t){return"center"===t},e.prototype._isJustifiedLeft=function(t){return"left"===t},e.prototype._isJustifiedRight=function(t){return"right"===t},e.prototype._justifyCenterButtonClickHandler=function(){null!==this._selection&&(document.execCommand("justifyCenter"),this._selection.getRangeAt(0).collapsed?this._isJustifyCenterButtonSelected=!0:this._toggleJustifyCenterButtonSelection(this._selection.anchorNode,this._selection.focusNode))},e.prototype._justifyCenterButtonTabbingAwayHandler=function(t){t.isShiftKeyPressed?this._justifyLeftButton.focus():this._justifyRightButton.focus(),t.cancel()},e.prototype._justifyLeftButtonClickHandler=function(){null!==this._selection&&(document.execCommand("justifyLeft"),this._selection.getRangeAt(0).collapsed?this._isJustifyLeftButtonSelected=!0:this._toggleJustifyLeftButtonSelection(this._selection.anchorNode,this._selection.focusNode))},e.prototype._justifyLeftButtonTabbingAwayHandler=function(t){t.isShiftKeyPressed?this._raiseTabbingAwayEvent(t):(this._justifyCenterButton.focus(),t.cancel())},e.prototype._justifyRightButtonClickHandler=function(){null!==this._selection&&(document.execCommand("justifyRight"),this._selection.getRangeAt(0).collapsed?this._isJustifyRightButtonSelected=!0:this._toggleJustifyRightButtonSelection(this._selection.anchorNode,this._selection.focusNode))},e.prototype._justifyRightButtonTabbingAwayHandler=function(t){t.isShiftKeyPressed?(this._justifyCenterButton.focus(),t.cancel()):this._raiseTabbingAwayEvent(t)},e.prototype._raiseTabbingAwayEvent=function(t){for(var e=0,n=this._tabbingAwayHandlers;e<n.length;e++){(0,n[e])(t.isShiftKeyPressed,(function(){t.cancel()}))}},e.prototype._toggleJustifyCenterButtonSelection=function(t,e){var n=!1,i=this._findJustifyParent(t);if(null!==i){var o=i;e!==t&&(o=this._findJustifyParent(e)),n=o===i&&this._isJustifiedCenter(i.style.textAlign)}this._isJustifyCenterButtonSelected=n},e.prototype._toggleJustifyLeftButtonSelection=function(t,e){var n=!1,i=this._findJustifyParent(t);if(null!==i){var o=i;e!==t&&(o=this._findJustifyParent(e)),n=o===i&&this._isJustifiedLeft(i.style.textAlign)}this._isJustifyLeftButtonSelected=n},e.prototype._toggleJustifyRightButtonSelection=function(t,e){var n=!1,i=this._findJustifyParent(t);if(null!==i){var o=i;e!==t&&(o=this._findJustifyParent(e)),n=o===i&&this._isJustifiedRight(i.style.textAlign)}this._isJustifyRightButtonSelected=n},e}(t.ToolBar);t.JustificationToolBar=e}(AutotaskRichTextBox||(AutotaskRichTextBox={})),function(t){var e=function(){function t(t,e){this._orderedListButtonId=t,this._unorderedListButtonId=e,this._formattingButtons=[],this._tabbingAwayHandlers=[],this._orderedListButton=null,this._unorderedListButton=null,this._insertOrderedListHandler=null,this._insertUnorderedListHandler=null}return Object.defineProperty(t.prototype,"isEnabled",{set:function(t){for(var e=0,n=this._formattingButtons;e<n.length;e++){n[e].isEnabled=t}},enumerable:!1,configurable:!0}),t.prototype.addTabbingAwayHandler=function(t){this._tabbingAwayHandlers.push(t)},t.prototype.focusEnd=function(){this._unorderedListButton.focus()},t.prototype.focusStart=function(){this._orderedListButton.focus()},t.prototype.registerHandlers=function(t,e){var n=this;this._insertOrderedListHandler=t,this._insertUnorderedListHandler=e,this._orderedListButton=autotask.find(this._orderedListButtonId);var i=new AutotaskButtonSystem.ClickEventHandler((function(){n._orderedListButtonClickHandler()}));this._orderedListButton.addEventHandler(i),this._orderedListButton.addTabbingAwayHandler((function(t){n._orderedListButtonTabbingAwayHandler(t)})),this._formattingButtons.push(this._orderedListButton),this._unorderedListButton=autotask.find(this._unorderedListButtonId);var o=new AutotaskButtonSystem.ClickEventHandler((function(){n._unorderedListButtonClickHandler()}));this._unorderedListButton.addEventHandler(o),this._unorderedListButton.addTabbingAwayHandler((function(t){n._unorderedListButtonTabbingAwayHandler(t)})),this._formattingButtons.push(this._unorderedListButton)},t.prototype.toggleOrderedListSelection=function(t){this._orderedListButton.isSelected=t},t.prototype.toggleUnorderedListSelection=function(t){this._unorderedListButton.isSelected=t},t.prototype._orderedListButtonClickHandler=function(){this._raiseInsertOrderedListEvent()},t.prototype._orderedListButtonTabbingAwayHandler=function(t){t.isShiftKeyPressed?this._raiseTabbingAwayEvent(t.isShiftKeyPressed,(function(){t.cancel()})):(this._unorderedListButton.focus(),t.cancel())},t.prototype._raiseInsertOrderedListEvent=function(){null!==this._insertOrderedListHandler&&this._insertOrderedListHandler()},t.prototype._raiseInsertUnorderedListEvent=function(){null!==this._insertUnorderedListHandler&&this._insertUnorderedListHandler()},t.prototype._raiseTabbingAwayEvent=function(t,e){for(var n=0,i=this._tabbingAwayHandlers;n<i.length;n++){(0,i[n])(t,e)}},t.prototype._unorderedListButtonClickHandler=function(){this._raiseInsertUnorderedListEvent()},t.prototype._unorderedListButtonTabbingAwayHandler=function(t){t.isShiftKeyPressed?(this._orderedListButton.focus(),t.cancel()):this._raiseTabbingAwayEvent(t.isShiftKeyPressed,(function(){t.cancel()}))},t}();t.ListToolBar=e}(AutotaskRichTextBox||(AutotaskRichTextBox={})),function(t){var e=function(){function t(){this._newLine="\n",this._tab="\t"}return t.prototype.generatePlainText=function(t){var e=this._interpretNode(t).trim();return e=(e=e.replace(/[ ]+/g," ")).replace(/ \n | \n|\n /g,this._newLine)},t.prototype._interpretBlockElement=function(t){var e=this._newLine;return t.parentElement.firstChild===t&&(e=""),e.concat(this._interpretNode(t))},t.prototype._interpretBreakRow=function(t){var e=this._newLine;return t.parentElement.lastChild===t?this._isBlockElement(t.previousSibling)||(e=""):this._isBlockElement(t.nextSibling)?e="":this._isBlockElement(t.previousSibling)&&(e=e.concat(this._newLine)),e},t.prototype._interpretNode=function(t){for(var e="",n=0;n<t.childNodes.length;n++)switch(t.childNodes[n].constructor){case HTMLBRElement:e=e.concat(this._interpretBreakRow(t.childNodes[n]));break;case HTMLDivElement:case HTMLOListElement:case HTMLUListElement:case HTMLLIElement:case HTMLTableElement:case HTMLTableRowElement:e=e.concat(this._interpretBlockElement(t.childNodes[n]));break;case HTMLTableCellElement:e=e.concat(this._interpretTableCell(t.childNodes[n]));break;case Text:e=e.concat(this._interpretText(t.childNodes[n]));break;default:e=e.concat(this._interpretNode(t.childNodes[n]))}return e},t.prototype._interpretTableCell=function(t){var e=this._interpretNode(t);return t.nextElementSibling instanceof HTMLTableCellElement&&(e=e.concat(this._tab)),e},t.prototype._interpretText=function(t){var e=t.textContent;return e=e.replace(/[ \f\n\r\t\v\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/g," ")},t.prototype._isBlockElement=function(t){return t instanceof HTMLDivElement||t instanceof HTMLOListElement||t instanceof HTMLUListElement||t instanceof HTMLTableElement},t}();t.PlainTextGenerator=e}(AutotaskRichTextBox||(AutotaskRichTextBox={})),function(t){var e=function(t){function e(e,n){var i=t.call(this)||this;return i._tabbingAwayHandlers=[],i._redoButtonId=e,i._undoButtonId=n,i._redoButton=null,i._undoButton=null,i}return __extends(e,t),Object.defineProperty(e.prototype,"isEnabled",{set:function(t){this._redoButton.isEnabled=t,this._undoButton.isEnabled=t},enumerable:!1,configurable:!0}),e.prototype.addTabbingAwayHandler=function(t){this._tabbingAwayHandlers.push(t)},e.prototype.focusEnd=function(){this._redoButton.focus()},e.prototype.focusStart=function(){this._undoButton.focus()},e.prototype.selectionChanged=function(){this.isEnabled=!0},e.prototype.selectionCleared=function(){this.isEnabled=!1},e.prototype.__initialize=function(){var t=this;this._redoButton=autotask.find(this._redoButtonId);var e=new AutotaskButtonSystem.ClickEventHandler((function(){t._redoButtonClickHandler()}));this._redoButton.addEventHandler(e),this._redoButton.addTabbingAwayHandler((function(e){t._redoButtonTabbingAwayHandler(e)})),this._undoButton=autotask.find(this._undoButtonId);var n=new AutotaskButtonSystem.ClickEventHandler((function(){t._undoButtonClickHandler()}));this._undoButton.addEventHandler(n),this._undoButton.addTabbingAwayHandler((function(e){t._undoButtonTabbingAwayHandler(e)}))},e.prototype._raiseTabbingAwayEvent=function(t,e){for(var n=0,i=this._tabbingAwayHandlers;n<i.length;n++){(0,i[n])(t,e)}},e.prototype._redoButtonClickHandler=function(){document.execCommand("redo")},e.prototype._redoButtonTabbingAwayHandler=function(t){t.isShiftKeyPressed?(this._undoButton.focus(),t.cancel()):this._raiseTabbingAwayEvent(t.isShiftKeyPressed,(function(){t.cancel()}))},e.prototype._undoButtonClickHandler=function(){document.execCommand("undo")},e.prototype._undoButtonTabbingAwayHandler=function(t){t.isShiftKeyPressed?this._raiseTabbingAwayEvent(t.isShiftKeyPressed,(function(){t.cancel()})):(this._redoButton.focus(),t.cancel())},e}(t.ToolBar);t.RepeatActionToolBar=e}(AutotaskRichTextBox||(AutotaskRichTextBox={})),function(t){var e=function(e){function n(n,i,o,a,r,s,l,u,c,d){var h=e.call(this,n)||this;h._editorElement=AutotaskDomSystem.Document.getElementById(n);var _=h._editorElement.children[0].children[1];h._editableElement=_.children[0],h._editableElement.addEventListener("dragover",(function(t){h._editableElementDragOverListener(t)})),h._editableElement.addEventListener("drop",(function(t){h._editableElementDropListener(t)})),h._editableElement.addEventListener("focus",(function(){h._editableElementFocusListener()})),h._editableElement.addEventListener("input",(function(){h._editableElementInputListener()})),h._editableElement.addEventListener("keydown",(function(t){h._editableElementKeyDownListener(t)})),h._editableElement.addEventListener("paste",(function(t){h._editableElementPasteListener(t)})),new MutationObserver((function(t){h._mutationCallback(t)})).observe(h._editableElement,{childList:!0,subtree:!0}),h._originalHtmlValue=h._getHtml(),h._htmlValue=h._originalHtmlValue,h._dropAreaElement=_.children[1],h._dropAreaElement.addEventListener("dragover",(function(t){h._dropAreaDragOverListener(t)})),h._dropAreaElement.addEventListener("drop",(function(t){h._dropAreaDropListener(t)})),h._standardToolBar=i,h._listToolBar=o,h._imageToolBar=a,h._anchorToolBar=null,h._tableToolBar=null,h._advancedToolBars=r;for(var p=0;p<r.length;p++)r[p].findDescendantsHandler=function(t){return Array.from(h._editableElement.querySelectorAll(t))},r[p].findParentHandler=function(t,e){return h._findParent(t,e)},r[p]instanceof t.AnchorToolBar?h._anchorToolBar=r[p]:r[p]instanceof t.TableToolBar&&(h._tableToolBar=r[p]);return h._featureSetName=s,h._isEnabled=l,h._bindingPropertyName=u,h._richTextBoxValidation=c,h._richTextBoxValidation.addRequiredStateChangedHandler((function(){h._validationRequiredStateChanged()})),h._richTextBoxValidation.addValidationCorrectedHandler((function(){h._validationCorrected()})),h._richTextBoxValidation.addValidationFailedHandler((function(){h._validationFailed()})),null!==h._richTextBoxValidation.maximumLength?h._characterInformationElement=h._editorElement.children[1]:h._characterInformationElement=null,h._imageFileUploader=d,document.execCommand("styleWithCss"),document.execCommand("defaultParagraphSeparator",!1,"div"),document.addEventListener("dragleave",(function(){h._documentDragLeaveListener()})),document.addEventListener("dragover",(function(t){h._documentDragOverListener(t)})),document.addEventListener("drop",(function(){h._documentDropListener()})),document.addEventListener("selectionchange",(function(){h._selectionChangeListener()})),h._dirtyStateChangeHandlers=[],h._removedImageKeys=[],h._tabbingAwayHandlers=[],h._activeCssClass="Active",h._importantCssClass="Important",h._invalidCssClass="Invalid",h._disabledTitle=null,h._dragOverTimeoutId=null,h._imageFileUploadValidationFailedHandler=null,h._isDirty=!1,h._isDraggingOverDocument=!1,h._isSelectionListDescendant=!1,h._isValidationFrequencyElevated=!1,h._isValidationOverdue=!1,h._isValidationOverlayDismissed=!1,h}return __extends(n,e),Object.defineProperty(n.prototype,"imageFileUploadValidationFailedHandler",{set:function(t){this._imageFileUploadValidationFailedHandler=t},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"disabledTitle",{set:function(t){this._disabledTitle=t,null!==this._disabledTitle&&this._enableTitle(this._disabledTitle)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isDirty",{get:function(){return this._isDirty},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isEnabled",{get:function(){return this._isEnabled},set:function(t){if(t!==this._isEnabled)if(this._isEnabled=t,this._editorElement.classList.toggle("Disabled"),t)this._selectionChanged(),this._editableElement.contentEditable="true",this._isValidationFrequencyElevated&&this._validate(!1),this._clearTitle();else{this._standardToolBar.isEnabled=!1,this._listToolBar.isEnabled=!1,this._imageToolBar.isEnabled=!1;for(var e=0,n=this._advancedToolBars;e<n.length;e++){n[e].isEnabled=!1}this._editableElement.contentEditable="false",this._isValidationOverdue=!this._richTextBoxValidation.validationResult.isValid,this._richTextBoxValidation.resetValidationResult(this._editableElement),null!==this._disabledTitle&&this._enableTitle(this._disabledTitle)}},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"participantValidation",{get:function(){return this._richTextBoxValidation},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"plainTextValue",{get:function(){var t="";return this._richTextBoxValidation.validationResult.isValid&&(t=this._generatePlainText()),t},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"value",{get:function(){var e=null;return this._richTextBoxValidation.validationResult.isValid&&(e=new t.RichTextValue(this._getHtml(),this._generatePlainText(),this._removedImageKeys,this._isDirty,this._featureSetName)),e},set:function(t){var e=this.value,n=!1;if(null===t)null!==e&&(this._editableElement.innerText="",n=!0);else if(null===e||!t.equals(e)){if(null!==t.html&&t.html.length>0)this._editableElement.innerHTML=t.html;else{var i="";null!==t.plainText&&t.plainText.length>0&&(i=t.plainText),this._editableElement.innerText=i}n=!0}n&&(this._htmlValue=this._getHtml(),this._manageDirtyState(this._htmlValue)&&this._raiseDirtyStateChangeEvent(this._isDirty),null!==this._richTextBoxValidation.maximumLength&&this._updateCharacterInformation(),this._isValidationOverdue=!0,this._isValidationFrequencyElevated&&this._validate(!1))},enumerable:!1,configurable:!0}),n.prototype.addDirtyStateChangeHandler=function(t){this._dirtyStateChangeHandlers.push(t)},n.prototype.addTabbingAwayHandler=function(t){this._tabbingAwayHandlers.push(t)},n.prototype.adjustTableLayout=function(t,e){null!==this._tableToolBar&&this._tableToolBar.adjustLayout(t,e)},n.prototype.adjustTableProperties=function(t){null!==this._tableToolBar&&this._tableToolBar.adjustProperties(t)},n.prototype.createAnchor=function(t){null!==this._anchorToolBar&&this._anchorToolBar.createAnchor(t)},n.prototype.createLink=function(t){null!==this._anchorToolBar&&this._anchorToolBar.createLink(t)},n.prototype.createRequestData=function(){var t=null;if(null!==this._bindingPropertyName){if(this._isEnabled){var e=this.value;null!==e&&(t=e.createRequestData(this._bindingPropertyName))}null===t&&((t={})[this._bindingPropertyName]=null)}return t},n.prototype.focus=function(){this._editableElement.focus()},n.prototype.focusEnd=function(){this.focus()},n.prototype.focusStart=function(){this.focus()},n.prototype.insertTable=function(t,e,n){null!==this._tableToolBar&&this._tableToolBar.insertTable(e,t,n)},n.prototype.resetValidation=function(){this._isValidationOverdue=!0},n.prototype.validate=function(){return this._validate(!1)},n.prototype.__initialize=function(){var t=this;this._standardToolBar.registerHandlers((function(){t._toggleBoldHandler()}),(function(){t._toggleItalicHandler()}),(function(){t._toggleUnderlineHandler()})),this._listToolBar.registerHandlers((function(){t._insertOrderedListHandler()}),(function(){t._insertUnorderedListHandler()})),this._imageToolBar.registerHandlers((function(e){t._insertImageFileListHandler(e)})),this._richTextBoxValidation.initialize();for(var e=0,n=this._advancedToolBars;e<n.length;e++){n[e].__initialize()}},n.prototype._calculateDepth=function(t,e){for(var n,i=e,o=0;o<t.childNodes.length;o++)(n=this._calculateDepth(t.childNodes[o],e+1))>i&&(i=n);return i},n.prototype._clearTitle=function(){this._editorElement.title=""},n.prototype._collectImageKey=function(t){var e=null;return void 0!==t.dataset.permanentKey&&(e=t.dataset.permanentKey),e},n.prototype._collectImages=function(t){for(var e=[],n=0;n<t.length;n++)if(t[n]instanceof HTMLImageElement)e.push(t[n]);else for(var i=0,o=this._collectImages(t[n].childNodes);i<o.length;i++){var a=o[i];e.push(a)}return e},n.prototype._documentDragLeaveListener=function(){this._isDraggingOverDocument=!1},n.prototype._documentDragOverListener=function(t){var e=this;this.isEnabled&&this._isFileDragEvent(t.dataTransfer)&&(t.preventDefault(),this._dropAreaElement.classList.add(this._activeCssClass),this._isDraggingOverDocument=!0,null!==this._dragOverTimeoutId&&window.clearTimeout(this._dragOverTimeoutId),this._dragOverTimeoutId=window.setTimeout((function(){e._dragOverTimeoutHandler()}),200))},n.prototype._documentDropListener=function(){this._isDraggingOverDocument=!1},n.prototype._dragOverTimeoutHandler=function(){this._isDraggingOverDocument||this._dropAreaElement.classList.remove(this._activeCssClass)},n.prototype._dropAreaDragOverListener=function(t){t.preventDefault()},n.prototype._dropAreaDropListener=function(t){var e=this;if(this._isDraggingOverDocument=!1,this._dropAreaElement.classList.remove(this._activeCssClass),t.preventDefault(),null!==t.dataTransfer)for(var n=0;n<t.dataTransfer.files.length;n++){var i=this._imageFileUploader.validate(t.dataTransfer.files[n]);if(!i.isValid){this._raiseImageFileUploadValidationFailed(i.message,i.detailedMessage);break}this._imageFileUploader.uploadFile(t.dataTransfer.files[n],(function(t){return e._insertImagePreview(t)}))}},n.prototype._editableElementDragOverListener=function(t){t.preventDefault(),null!==t.dataTransfer&&(t.dataTransfer.dropEffect="none")},n.prototype._editableElementDropListener=function(t){t.preventDefault()},n.prototype._editableElementFocusListener=function(){this._isValidationOverlayDismissed||!this._isValidationFrequencyElevated||this._richTextBoxValidation.validationResult.isValid||this._showValidationOverlay()},n.prototype._editableElementInputListener=function(){this._manageInputChange()},n.prototype._editableElementKeyDownListener=function(t){AutotaskDomSystem.KeyCode.isB(t.which)&&t.ctrlKey?(this._toggleBold(),t.preventDefault(),t.stopPropagation()):AutotaskDomSystem.KeyCode.isI(t.which)&&t.ctrlKey?(this._toggleItalic(),t.preventDefault(),t.stopPropagation()):AutotaskDomSystem.KeyCode.isU(t.which)&&t.ctrlKey?(this._toggleUnderline(),t.preventDefault(),t.stopPropagation()):AutotaskDomSystem.KeyCode.isTab(t.which)&&this._raiseTabbingAwayEvent(t.shiftKey,(function(){t.preventDefault()}))},n.prototype._formatPastedText=function(t){for(var e="",n=!0,i=0,o=t.replace(/\r\n/g,"\n").split(/\n/g);i<o.length;i++){var a=o[i];if(n){if(a.trim().length>0){var r=document.createElement("span");r.innerText=a,e+=r.outerHTML}else e+=document.createElement("br").outerHTML;n=!1}else{var s=document.createElement("div");a.trim().length>0?s.innerText=a:s.appendChild(document.createElement("br")),e+=s.outerHTML}}return e},n.prototype._editableElementPasteListener=function(t){var e=this;if(t.preventDefault(),null!==t.clipboardData){var n=t.clipboardData.getData("text/plain"),i=this._formatPastedText(n);document.execCommand("insertHTML",!1,i);for(var o=0;o<t.clipboardData.files.length;o++){var a=this._imageFileUploader.validate(t.clipboardData.files[o]);if(!a.isValid){this._raiseImageFileUploadValidationFailed(a.message,a.detailedMessage);break}this._imageFileUploader.uploadFile(t.clipboardData.files[o],(function(t){return e._insertImagePreview(t)}))}}},n.prototype._enableTitle=function(t){this._isEnabled||(this._editorElement.title=t)},n.prototype._findListParent=function(t){return this._findParent(t,(function(t){return t instanceof HTMLOListElement||t instanceof HTMLUListElement}))},n.prototype._findParent=function(t,e){var n=null;if(e(t))n=t;else{for(var i=t;null!==i.parentElement&&i.parentElement!==this._editableElement;){if(e(i.parentElement)){n=i.parentElement;break}i=null==i?void 0:i.parentElement}i.parentElement===this._editableElement&&e(i.parentElement)&&(n=this._editableElement)}return n},n.prototype._findTableParent=function(t){return this._findParent(t,(function(t){return t instanceof HTMLTableElement}))},n.prototype._generatePlainText=function(){return(new t.PlainTextGenerator).generatePlainText(this._editableElement)},n.prototype._getHtml=function(){var t="";return this._hasNonWhitespaceContent(this._editableElement)&&(t=this._editableElement.innerHTML),t},n.prototype._getSelection=function(){var t=document.getSelection();return null!==t&&null!==t.anchorNode&&null!==t.focusNode&&this._editableElement.contains(t.anchorNode)&&this._editableElement.contains(t.focusNode)||(t=null),t},n.prototype._hasNonWhitespaceContent=function(t){var e=!1;if(t.childNodes.length>0){for(var n=0;n<t.childNodes.length;n++)if(this._hasNonWhitespaceContent(t.childNodes[n])){e=!0;break}}else switch(t.nodeName){case"#text":e=null!==t.textContent&&t.textContent.trim().length>0;break;case"IMG":e=!0}return e},n.prototype._insertImagePreview=function(t){var e=this._getSelection();if(null===e){var n=document.createRange();n.selectNodeContents(this._editableElement),n.collapse(!1),null!==(e=document.getSelection())&&(e.removeAllRanges(),e.addRange(n))}var i=this.id+"preview";t.id=i;var o=document.createElement("div");o.appendChild(t),document.execCommand("insertHTML",!1,o.outerHTML);var a=document.getElementById(i);return a.removeAttribute("id"),a},n.prototype._insertImageFileListHandler=function(t){for(var e=this,n=0;n<t.length;n++){var i=this._imageFileUploader.validate(t[n]);if(!i.isValid){this._raiseImageFileUploadValidationFailed(i.message,i.detailedMessage);break}this._imageFileUploader.uploadFile(t[n],(function(t){return e._insertImagePreview(t)}))}},n.prototype._insertOrderedListHandler=function(){document.execCommand("insertOrderedList")},n.prototype._insertUnorderedListHandler=function(){document.execCommand("insertUnorderedList")},n.prototype._isFileDragEvent=function(t){var e=!1;if(null!==t)for(var n=0,i=t.types;n<i.length;n++){if("Files"===i[n]){e=!0;break}}return e},n.prototype._isFontStyleItalic=function(t){return"italic"===t},n.prototype._isFontWeightBold=function(t){return"bold"===t||"700"===t},n.prototype._isSelectionTableDescendant=function(t){var e=!1,n=this._findTableParent(t.anchorNode);if(null!==n){var i=n;t.focusNode!==t.anchorNode&&(i=this._findTableParent(t.focusNode)),i===n&&(e=!0)}return e},n.prototype._isTextDecorationLineUnderline=function(t){return"underline"===t},n.prototype._manageDirtyState=function(t){var e=!1;return this._isDirty&&t!==this._originalHtmlValue||(this._isDirty=!this._isDirty,e=!0),e},n.prototype._manageInputChange=function(){var t=this._getHtml();t!==this._htmlValue&&(this._htmlValue=t,this._isValidationOverdue=!0,this._manageDirtyState(this._htmlValue)&&this._raiseDirtyStateChangeEvent(this._isDirty),null!==this._richTextBoxValidation.maximumLength&&this._updateCharacterInformation(),this._isValidationFrequencyElevated&&this._validate(!0))},n.prototype._mutationCallback=function(t){for(var e=0,n=t;e<n.length;e++){var i=n[e];if("childList"===i.type){for(var o=[],a=0,r=this._collectImages(i.removedNodes);a<r.length;a++){var s=r[a];null!==(d=this._collectImageKey(s))&&o.push(d)}this._trackRemovedImageKeys(o);for(var l=[],u=0,c=this._collectImages(i.addedNodes);u<c.length;u++){var d;s=c[u];null!==(d=this._collectImageKey(s))&&l.push(d)}this._trackAddedImageKeys(l)}}},n.prototype._raiseImageFileUploadValidationFailed=function(t,e){null!==this._imageFileUploadValidationFailedHandler&&this._imageFileUploadValidationFailedHandler(t,e)},n.prototype._raiseDirtyStateChangeEvent=function(t){if(this._dirtyStateChangeHandlers.length>0)for(var e=new AutotaskDirtyStateSystem.DirtyStateChangeEventArgs(t),n=0,i=this._dirtyStateChangeHandlers;n<i.length;n++){(0,i[n])(e)}},n.prototype._raiseTabbingAwayEvent=function(t,e){if(this._tabbingAwayHandlers.length>0)for(var n=new AutotaskEditorSystem.TabbingAwayEventArgs(this.id,t,e),i=0,o=this._tabbingAwayHandlers;i<o.length;i++){(0,o[i])(n)}},n.prototype._selectionChanged=function(){var e=this._getSelection();if(this.isEnabled&&null!==e){this._standardToolBar.isEnabled=!0,this._standardToolBar.isStylingEnabled=!0,this._listToolBar.isEnabled=!0,this._imageToolBar.isEnabled=!0,this._toggleBoldButtonSelection(e.anchorNode,e.focusNode),this._toggleItalicButtonSelection(e.anchorNode,e.focusNode),this._toggleUnderlineButtonSelection(e.anchorNode,e.focusNode),this._toggleListButtonSelection(e.anchorNode,e.focusNode);for(var n=0,i=this._advancedToolBars;n<i.length;n++){i[n].selectionChanged(new t.RichTextSelection(e,this._isSelectionListDescendant,this._isSelectionTableDescendant(e)))}}else{this._standardToolBar.isEnabled=!1,this._listToolBar.isEnabled=!1,this._imageToolBar.isEnabled=!1;for(var o=0,a=this._advancedToolBars;o<a.length;o++){a[o].selectionCleared()}}},n.prototype._selectionChangeListener=function(){this._selectionChanged()},n.prototype._showValidationOverlay=function(){var t=this;autotask.globalValidationOverlay.show(this._editableElement,this.id,this._richTextBoxValidation.validationResult.message,!0,(function(){t._validationOverlayDismissed()}),null)},n.prototype._toggleBold=function(){var t=this._getSelection();null!==t&&(document.execCommand("bold"),t.getRangeAt(0).collapsed?this._standardToolBar.toggleBoldSelection(!this._standardToolBar.isBoldButtonSelected):this._toggleBoldButtonSelection(t.anchorNode,t.focusNode))},n.prototype._toggleBoldButtonSelection=function(t,e){var n=!1;if(null!==t.parentElement&&e===t){var i=getComputedStyle(t.parentElement);n=this._isFontWeightBold(i.fontWeight)}this._standardToolBar.toggleBoldSelection(n)},n.prototype._toggleBoldHandler=function(){this._toggleBold()},n.prototype._toggleItalic=function(){var t=this._getSelection();null!==t&&(document.execCommand("italic"),t.getRangeAt(0).collapsed?this._standardToolBar.toggleItalicSelection(!this._standardToolBar.isItalicButtonSelected):this._toggleItalicButtonSelection(t.anchorNode,t.focusNode))},n.prototype._toggleItalicButtonSelection=function(t,e){var n=!1;if(null!==t.parentElement&&e===t){var i=getComputedStyle(t.parentElement);n=this._isFontStyleItalic(i.fontStyle)}this._standardToolBar.toggleItalicSelection(n)},n.prototype._toggleItalicHandler=function(){this._toggleItalic()},n.prototype._toggleListButtonSelection=function(t,e){var n=this._findListParent(t);if(null!==n){var i=n;e!==t&&(i=this._findListParent(e)),i===n&&(this._isSelectionListDescendant=!0,this._listToolBar.toggleOrderedListSelection(n instanceof HTMLOListElement),this._listToolBar.toggleUnorderedListSelection(n instanceof HTMLUListElement))}else this._isSelectionListDescendant=!1,this._listToolBar.toggleOrderedListSelection(!1),this._listToolBar.toggleUnorderedListSelection(!1)},n.prototype._toggleUnderline=function(){var t=this._getSelection();null!==t&&(document.execCommand("underline"),t.getRangeAt(0).collapsed?this._standardToolBar.toggleUnderlineSelection(!this._standardToolBar.isUnderlineButtonSelected):this._toggleUnderlineButtonSelection(t.anchorNode,t.focusNode))},n.prototype._toggleUnderlineButtonSelection=function(t,e){var n=!1;if(null!==t.parentElement&&e===t)for(var i=this._findParent(t.parentElement,(function(t){return t instanceof HTMLSpanElement}));null!==i&&!(n=this._isTextDecorationLineUnderline(i.style.textDecorationLine));)i=this._findParent(i.parentElement,(function(t){return t instanceof HTMLSpanElement}));this._standardToolBar.toggleUnderlineSelection(n)},n.prototype._toggleUnderlineHandler=function(){this._toggleUnderline()},n.prototype._trackAddedImageKeys=function(t){for(var e=0,n=t;e<n.length;e++){var i=n[e],o=this._removedImageKeys.indexOf(i);o>=0&&this._removedImageKeys.splice(o,1)}},n.prototype._trackRemovedImageKeys=function(t){for(var e=0,n=t;e<n.length;e++){var i=n[e];this._removedImageKeys.indexOf(i)<0&&this._removedImageKeys.push(i)}},n.prototype._updateCharacterInformation=function(){var t=this._characterInformationElement,e=this._richTextBoxValidation.maximumLength,n=this._getHtml(),i=this._generatePlainText(),o=n.length>0?i.length:0,a=e-o;t.textContent=window.autotask.convert.integerToString(a),t.title=window.autotask.convert.integerToString(o)+"/"+window.autotask.convert.integerToString(e),a<0?t.classList.add(this._importantCssClass):t.classList.remove(this._importantCssClass)},n.prototype._validate=function(t){var e=this._richTextBoxValidation.validationResult.isValid;if(this._isValidationOverdue&&this._isEnabled){var n=this._calculateDepth(this._editableElement,0);e=this._richTextBoxValidation.validate(this._htmlValue,this._generatePlainText(),t,this._editableElement,n),this._isValidationOverdue=!1}return e?autotask.globalValidationOverlay.hide(this.id):this._showValidationOverlay(),e},n.prototype._validationCorrected=function(){this._editorElement.classList.remove(this._invalidCssClass)},n.prototype._validationFailed=function(){this._editorElement.classList.add(this._invalidCssClass),this._isValidationFrequencyElevated=!0},n.prototype._validationOverlayDismissed=function(){this._isValidationOverlayDismissed=!0},n.prototype._validationRequiredStateChanged=function(){this.resetValidation(),this._isValidationFrequencyElevated&&this._validate(!0)},n}(AutotaskEditorSystem.Editor);t.RichTextBox=e}(AutotaskRichTextBox||(AutotaskRichTextBox={})),function(t){var e=function(t){function e(e,n,i,o){var a=t.call(this,e)||this;return a._requiredValidatorProvider=n,a._lengthValidator=i,a._depthValidator=o,a._requiredValidator=null,a}return __extends(e,t),Object.defineProperty(e.prototype,"_isRequired",{get:function(){return null!==this._requiredValidator},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maximumLength",{get:function(){return this._lengthValidator?this._lengthValidator.maximumLength:null},enumerable:!1,configurable:!0}),e.prototype.initialize=function(){var t=this;null!==this._requiredValidatorProvider&&(this._requiredValidatorProvider.initialize(),this._requiredValidatorProvider.addRequiredStateChangedHandler((function(){t._requiredStateChanged()})),this._requiredValidator=this._requiredValidatorProvider.createValidator())},e.prototype.resetValidationResult=function(t){this._updateValidationResult(new AutotaskEditorSystem.ValidResult,!1,t,!0)},e.prototype.validate=function(t,e,n,i,o){var a=new AutotaskEditorSystem.ValidResult;return null!==this._requiredValidator&&(a=this._requiredValidator.validate(t)),a.isValid&&null!==this._lengthValidator&&(a=this._lengthValidator.validate(e)),a.isValid&&(a=this._depthValidator.validate(o)),this._updateValidationResult(a,n,i,!0),a.isValid},e.prototype._requiredStateChanged=function(){var t=this._requiredValidatorProvider;this._requiredValidator=t.createValidator(),this._raiseRequiredStateChanged()},e}(AutotaskEditorSystem.EditorValidation);t.RichTextBoxValidation=e}(AutotaskRichTextBox||(AutotaskRichTextBox={})),function(t){var e=function(){function t(t,e,n){this._selection=t,this._isListDescendant=e,this._isTableDescendant=n}return Object.defineProperty(t.prototype,"isListDescendant",{get:function(){return this._isListDescendant},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isTableDescendant",{get:function(){return this._isTableDescendant},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"selection",{get:function(){return this._selection},enumerable:!1,configurable:!0}),t}();t.RichTextSelection=e}(AutotaskRichTextBox||(AutotaskRichTextBox={})),function(t){var e=function(){function t(t,e,n,i,o){this._html=t,this._plainText=e,this._removedImageKeys=n,this._isDirty=i,this._featureSetName=o}return Object.defineProperty(t.prototype,"isEmpty",{get:function(){return null===this._html||0===this._html.trim().length},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"html",{get:function(){return this._html},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"plainText",{get:function(){return this._plainText},enumerable:!1,configurable:!0}),t.prototype.createRequestData=function(t){var e={};return e[t]=this._html,e[t+"_p"]=this._plainText,e[t+"_r"]=this._removedImageKeys.join("|"),e[t+"_d"]=AutotaskRequestDataSystem.ValueSerializer.serializeBoolean(this._isDirty),e[t+"_f"]=this._featureSetName,e},t.prototype.equals=function(t){return t.plainText===this._plainText&&t.html===this._html},t}();t.RichTextValue=e}(AutotaskRichTextBox||(AutotaskRichTextBox={})),function(t){var e=function(){function t(t,e,n,i,o){document.getElementById(t).addEventListener("mousedown",(function(t){t.preventDefault()})),this._boldButtonId=e,this._italicButtonId=n,this._underlineButtonId=i,this._isEnabled=o,this._isStylingEnabled=!1,this._tabbingAwayHandlers=[],this._stylingButtons=[],this._boldButton=null,this._italicButton=null,this._underlineButton=null,this._toggleBoldHandler=null,this._toggleItalicHandler=null,this._toggleUnderlineHandler=null}return Object.defineProperty(t.prototype,"isBoldButtonSelected",{get:function(){return this._boldButton.isSelected},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isEnabled",{set:function(t){this._isEnabled=t;for(var e=0,n=this._stylingButtons;e<n.length;e++){n[e].isEnabled=this._isStylingEnabled&&t}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isItalicButtonSelected",{get:function(){return this._italicButton.isSelected},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isStylingEnabled",{set:function(t){if(this._isStylingEnabled=t,this._isEnabled)for(var e=0,n=this._stylingButtons;e<n.length;e++){n[e].isEnabled=t}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isUnderlineButtonSelected",{get:function(){return this._underlineButton.isSelected},enumerable:!1,configurable:!0}),t.prototype.addTabbingAwayHandler=function(t){this._tabbingAwayHandlers.push(t)},t.prototype.focusEnd=function(){this._underlineButton.focus()},t.prototype.focusStart=function(){this._boldButton.focus()},t.prototype.registerHandlers=function(t,e,n){var i=this;this._toggleBoldHandler=t,this._toggleItalicHandler=e,this._toggleUnderlineHandler=n,this._boldButton=autotask.find(this._boldButtonId);var o=new AutotaskButtonSystem.ClickEventHandler((function(){i._boldButtonClickHandler()}));this._boldButton.addEventHandler(o),this._boldButton.addTabbingAwayHandler((function(t){i._boldButtonTabbingAwayHandler(t)})),this._stylingButtons.push(this._boldButton),this._italicButton=autotask.find(this._italicButtonId);var a=new AutotaskButtonSystem.ClickEventHandler((function(){i._italicButtonClickHandler()}));this._italicButton.addEventHandler(a),this._italicButton.addTabbingAwayHandler((function(t){i._italicButtonTabbingAwayHandler(t)})),this._stylingButtons.push(this._italicButton),this._underlineButton=autotask.find(this._underlineButtonId);var r=new AutotaskButtonSystem.ClickEventHandler((function(){i._underlineButtonClickHandler()}));this._underlineButton.addEventHandler(r),this._underlineButton.addTabbingAwayHandler((function(t){i._underlineButtonTabbingAwayHandler(t)})),this._stylingButtons.push(this._underlineButton)},t.prototype.toggleBoldSelection=function(t){this._boldButton.isSelected=t},t.prototype.toggleItalicSelection=function(t){this._italicButton.isSelected=t},t.prototype.toggleUnderlineSelection=function(t){this._underlineButton.isSelected=t},t.prototype._boldButtonClickHandler=function(){this._raiseToggleBoldEvent()},t.prototype._boldButtonTabbingAwayHandler=function(t){t.isShiftKeyPressed?this._raiseTabbingAwayEvent(t.isShiftKeyPressed,(function(){t.cancel()})):(this._italicButton.focus(),t.cancel())},t.prototype._italicButtonClickHandler=function(){this._raiseToggleItalicEvent()},t.prototype._italicButtonTabbingAwayHandler=function(t){t.isShiftKeyPressed?this._boldButton.focus():this._underlineButton.focus(),t.cancel()},t.prototype._raiseTabbingAwayEvent=function(t,e){for(var n=0,i=this._tabbingAwayHandlers;n<i.length;n++){(0,i[n])(t,e)}},t.prototype._raiseToggleBoldEvent=function(){null!==this._toggleBoldHandler&&this._toggleBoldHandler()},t.prototype._raiseToggleItalicEvent=function(){null!==this._toggleItalicHandler&&this._toggleItalicHandler()},t.prototype._raiseToggleUnderlineEvent=function(){null!==this._toggleUnderlineHandler&&this._toggleUnderlineHandler()},t.prototype._underlineButtonClickHandler=function(){this._raiseToggleUnderlineEvent()},t.prototype._underlineButtonTabbingAwayHandler=function(t){t.isShiftKeyPressed?(this._italicButton.focus(),t.cancel()):this._raiseTabbingAwayEvent(t.isShiftKeyPressed,(function(){t.cancel()}))},t}();t.StandardToolBar=e}(AutotaskRichTextBox||(AutotaskRichTextBox={})),function(t){var e=function(t){function e(e,n,i,o,a,r,s,l,u,c,d,h,_,p,m,f,y,g,v,b,E,S,k,C,A,D,I,w,H,x){var T=t.call(this)||this;return T._tableButtonElement=AutotaskDomSystem.Document.getElementById(e),T._tableButtonId=n,T._cellBackgroundButtonElement=AutotaskDomSystem.Document.getElementById(i),T._cellBackgroundButtonId=o,T._contextMenuId=a,T._insertTableButtonId=r,T._adjustPropertiesButtonId=s,T._addRowAboveButtonId=l,T._addRowBelowButtonId=u,T._addColumnBeforeButtonId=c,T._addColumnAfterButtonId=d,T._removeRowButtonId=h,T._removeColumnButtonId=_,T._adjustLayoutButtonId=p,T._deleteTableButtonId=m,T._insertTableDialogRoute=f,T._adjustLayoutDialogRoute=y,T._columnWidthParameterName=g,T._rowHeightParameterName=v,T._adjustPropertiesDialogRoute=b,T._includeHeadersParameterName=E,T._columnCountParameterName=S,T._rowCountParameterName=k,T._maximumRowCount=C,T._maximumRowCountExceededMessage=A,T._maximumColumnCount=D,T._maximumColumnCountExceededMessage=I,T._defaultHeaderText=w,T._defaultWidth=H,T._colorSetName=x,T._tabbingAwayHandlers=[],T._selectedCells=[],T._isCellBackgroundColorContextMenuVisible=!1,T._isTableContextMenuVisible=!1,T._addColumnAfterButtonInstance=null,T._addColumnBeforeButtonInstance=null,T._addRowAboveButtonInstance=null,T._addRowBelowButtonInstance=null,T._adjustLayoutButtonInstance=null,T._adjustPropertiesButtonInstance=null,T._cellBackgroundButtonInstance=null,T._deleteTableButtonInstance=null,T._insertTableButtonInstance=null,T._removeColumnButtonInstance=null,T._removeRowButtonInstance=null,T._selectedCellBackgroundColor=null,T._selection=null,T._tableButtonInstance=null,T._tableContextMenuInstance=null,T}return __extends(e,t),Object.defineProperty(e.prototype,"isEnabled",{set:function(t){this._tableButtonInstance.isEnabled=t,this._cellBackgroundButtonInstance.isEnabled=t,t||(this._tableContextMenuInstance.__hideWithoutDelay(),autotask.globalColorPicker.hide())},enumerable:!1,configurable:!0}),e.prototype.addTabbingAwayHandler=function(t){this._tabbingAwayHandlers.push(t)},e.prototype.adjustLayout=function(t,e){this._restoreSelection();var n="AutotaskRichTextTableCell",i=this._selectedCells[0];i.id=n;var o=i.parentElement,a=this._findTableParent(i),r=a.cloneNode(!0),s=this._findColumnGroup(r);if(null!==t){if(null===s){s=document.createElement("colgroup");for(var l=0;l<o.cells.length;l++)s.appendChild(this._createColumn());r.insertAdjacentElement("afterbegin",s)}s.children[i.cellIndex].style.width=t}else null!==s&&s.remove();r.rows[o.rowIndex].style.height=e,r.style.width=null!==t?"auto":"";var u=document.createRange();u.selectNode(a);var c=this._selection;c.removeAllRanges(),c.addRange(u),document.execCommand("insertHTML",!1,r.outerHTML);var d=AutotaskDomSystem.Document.getElementById(n);d.removeAttribute("id"),this._setCollapsedSelectionRange(c,d)},e.prototype.adjustProperties=function(t){this._restoreSelection();var e="AutotaskRichTextTableCell",n=this._selectedCells[0];n.id=e;var i="AutotaskRichTextTable",o=this._findTableParent(n);o.id=i;var a=o.cloneNode(!0),r=a.tBodies[0].rows[0].cells.length;if(t){for(var s=document.createElement("thead"),l=document.createElement("tr"),u=0;u<r;u++)l.appendChild(this._createHeaderCell());s.appendChild(l),a.tBodies[0].insertAdjacentElement("beforebegin",s)}else null!==a.tHead&&a.tHead.remove();var c=document.createRange();c.selectNode(o);var d=this._selection;d.removeAllRanges(),d.addRange(c),document.execCommand("insertHTML",!1,a.outerHTML);var h=AutotaskDomSystem.Document.getElementById(i);h.removeAttribute("id");var _=document.getElementById(e);null!==_?_.removeAttribute("id"):_=h.tBodies[0].rows[0].cells[0],this._setCollapsedSelectionRange(d,_)},e.prototype.focusEnd=function(){this._tableButtonInstance.focus(),this._cellBackgroundButtonInstance.focus()},e.prototype.focusStart=function(){this.focusEnd()},e.prototype.insertTable=function(t,e,n){var i;this._restoreSelection();var o=document.createElement("table");if(o.id="AutotaskRichTextTable",n){for(var a=document.createElement("thead"),r=document.createElement("tr"),s=0;s<e;s++)r.appendChild(this._createHeaderCell());a.appendChild(r),o.appendChild(a)}for(var l=document.createElement("tbody"),u=0;u<t;u++)l.appendChild(this._createRow(e));o.appendChild(l);var c="<br>"+o.outerHTML+"<br>";document.execCommand("insertHTML",!1,c);var d=document.getSelection();if(null!==d){var h=AutotaskDomSystem.Document.getElementById(o.id);h.removeAttribute("id");var _=void 0;_=n?null===(i=h.tHead)||void 0===i?void 0:i.rows[0].cells[0]:h.tBodies[0].rows[0].cells[0],this._setCollapsedSelectionRange(d,_)}},e.prototype.selectionChanged=function(t){if(this.isEnabled=!0,this._selection=t.selection,t.isTableDescendant){var e=t.selection.anchorNode,n=t.selection.focusNode;this._toggleColumnButtonEnabled(e,n),this._toggleRowButtonEnabled(e,n),this._selectedCells=this._findSelectedTableCells(e,n);for(var i=this._selectedCells[0].style.backgroundColor,o=1;o<this._selectedCells.length;o++)if(this._selectedCells[o].style.backgroundColor!==i){i="";break}i.length>0?this._selectedCellBackgroundColor=AutotaskColorPickerSystem.ColorConverter.convertToHexadecimalColor(i):this._selectedCellBackgroundColor=null,this._adjustLayoutButtonInstance.set_enabled(1===this._selectedCells.length)}else this._addColumnAfterButtonInstance.set_enabled(!1),this._addColumnAfterButtonInstance.set_title(null),this._addColumnBeforeButtonInstance.set_enabled(!1),this._addColumnBeforeButtonInstance.set_title(null),this._removeColumnButtonInstance.set_enabled(!1),this._addRowAboveButtonInstance.set_enabled(!1),this._addRowAboveButtonInstance.set_title(null),this._addRowBelowButtonInstance.set_enabled(!1),this._addRowBelowButtonInstance.set_title(null),this._removeRowButtonInstance.set_enabled(!1),this._adjustLayoutButtonInstance.set_enabled(!1),this._selectedCellBackgroundColor=null;this._cellBackgroundButtonInstance.isEnabled=t.isTableDescendant,this._insertTableButtonInstance.set_enabled(!t.isTableDescendant),this._adjustPropertiesButtonInstance.set_enabled(t.isTableDescendant),this._deleteTableButtonInstance.set_enabled(t.isTableDescendant)},e.prototype.selectionCleared=function(){this.isEnabled=!1},e.prototype.__initialize=function(){var t=this;this._tableButtonInstance=autotask.find(this._tableButtonId);var e=new AutotaskButtonSystem.ClickEventHandler((function(){t._tableButtonClickHandler()}));this._tableButtonInstance.addEventHandler(e),this._tableButtonInstance.addTabbingAwayHandler((function(e){t._tableButtonTabbingAwayHandler(e)})),this._cellBackgroundButtonInstance=autotask.find(this._cellBackgroundButtonId);var n=new AutotaskButtonSystem.ClickEventHandler((function(){t._cellBackgroundButtonClickHandler()}));this._cellBackgroundButtonInstance.addEventHandler(n),this._cellBackgroundButtonInstance.addTabbingAwayHandler((function(e){t._cellBackgroundButtonTabbingAwayHandler(e)})),this._tableContextMenuInstance=autotask.find(this._contextMenuId),this._tableContextMenuInstance.addHideCompletedHandler((function(){t._tableContextMenuHideCompletedHandler()})),this._tableContextMenuInstance.addShowCompletedHandler((function(){t._tableContextMenuShowCompletedHandler()})),this._addColumnAfterButtonInstance=autotask.find(this._addColumnAfterButtonId),this._addColumnAfterButtonInstance.__addClick((function(){t._addColumnAfter()})),this._addColumnBeforeButtonInstance=autotask.find(this._addColumnBeforeButtonId),this._addColumnBeforeButtonInstance.__addClick((function(){t._addColumnBefore()})),this._addRowAboveButtonInstance=autotask.find(this._addRowAboveButtonId),this._addRowAboveButtonInstance.__addClick((function(){t._addRowAbove()})),this._addRowBelowButtonInstance=autotask.find(this._addRowBelowButtonId),this._addRowBelowButtonInstance.__addClick((function(){t._addRowBelow()})),this._adjustLayoutButtonInstance=autotask.find(this._adjustLayoutButtonId),this._adjustLayoutButtonInstance.__addClick((function(){t._adjustLayoutButtonClickHandler()})),this._adjustPropertiesButtonInstance=autotask.find(this._adjustPropertiesButtonId),this._adjustPropertiesButtonInstance.__addClick((function(){t._adjustPropertiesButtonClickHandler()})),this._deleteTableButtonInstance=autotask.find(this._deleteTableButtonId),this._deleteTableButtonInstance.__addClick((function(){t._removeTable()})),this._insertTableButtonInstance=autotask.find(this._insertTableButtonId),this._insertTableButtonInstance.__addClick((function(){t._insertTableButtonClickHandler()})),this._removeColumnButtonInstance=autotask.find(this._removeColumnButtonId),this._removeColumnButtonInstance.__addClick((function(){t._removeColumn()})),this._removeRowButtonInstance=autotask.find(this._removeRowButtonId),this._removeRowButtonInstance.__addClick((function(){t._removeRow()}))},e.prototype._addColumn=function(t){var e=this._selection,n=this._findTableCellParent(e.anchorNode),i=n.parentElement.parentElement.parentElement,o=i.cloneNode(!0),a=n.cellIndex,r=this._findColumnGroup(o);if(null!==r&&a<r.children.length){var s=this._createColumn();t(r.children[a],s)}var l=null;if(null!==o.tBodies)for(var u=void 0,c=0;c<o.tBodies[0].rows.length;c++)a<o.tBodies[0].rows[c].cells.length&&(u=this._createCell(),0===c&&(l=u),t(o.tBodies[0].rows[c].cells[a],u));if(null!==o.tHead&&a<o.tHead.rows[0].cells.length){var d=this._createHeaderCell();l=d,t(o.tHead.rows[0].cells[a],d)}null!==l&&(l.id="AutotaskRichTextTableCell"),o.style.width="";var h=document.createRange();if(h.selectNode(i),e.removeAllRanges(),e.addRange(h),document.execCommand("insertHTML",!1,o.outerHTML),null!==l){var _=AutotaskDomSystem.Document.getElementById(l.id);_.removeAttribute("id"),this._setCollapsedSelectionRange(e,_)}},e.prototype._addColumnAfter=function(){this._addColumn((function(t,e){t.after(e)}))},e.prototype._addColumnBefore=function(){this._addColumn((function(t,e){t.before(e)}))},e.prototype._addRow=function(t){var e=this._selection,n=this._findTableRowParent(e.anchorNode),i=n.parentElement.parentElement,o=i.cloneNode(!0),a=n.sectionRowIndex,r=this._createRow(n.cells.length);r.id="AutotaskRichTextTableRow",t(o.tBodies[0].rows[a],r);var s=document.createRange();s.selectNode(i),e.removeAllRanges(),e.addRange(s),document.execCommand("insertHTML",!1,o.outerHTML);var l=AutotaskDomSystem.Document.getElementById(r.id);l.removeAttribute("id"),this._setCollapsedSelectionRange(e,l.cells[0])},e.prototype._addRowAbove=function(){this._addRow((function(t,e){t.before(e)}))},e.prototype._addRowBelow=function(){this._addRow((function(t,e){t.after(e)}))},e.prototype._adjustLayoutButtonClickHandler=function(){this._saveSelection();var t=new AutotaskRequestDataSystem.RequestData,e=this._selectedCells[0],n=this._findTableParent(e),i=this._findColumnGroup(n);if(null!==i){var o=i.children[e.cellIndex];t.addString(this._columnWidthParameterName,o.style.width)}var a=e.parentElement;t.addString(this._rowHeightParameterName,a.style.height),this._adjustLayoutDialogRoute.makeRequest(t,null)},e.prototype._adjustPropertiesButtonClickHandler=function(){this._saveSelection();var t=new AutotaskRequestDataSystem.RequestData,e=this._selectedCells[0],n=this._findTableParent(e);t.addBoolean(this._includeHeadersParameterName,null!==n.tHead),t.addInteger(this._columnCountParameterName,n.tBodies[0].rows[0].cells.length),t.addInteger(this._rowCountParameterName,n.tBodies[0].rows.length),this._adjustPropertiesDialogRoute.makeRequest(t,null)},e.prototype._cellBackgroundButtonClickHandler=function(){var t=this;this._isCellBackgroundColorContextMenuVisible?autotask.globalColorPicker.hide():(autotask.globalColorPicker.showWithHexadecimal(this._cellBackgroundButtonElement,this._colorSetName,(function(e,n,i){t._cellBackgroundColorSelectedHandler(i)}),(function(){t._cellBackgroundColorContextMenuHideCompletedHandler()}),this._selectedCellBackgroundColor),this._isCellBackgroundColorContextMenuVisible=!0)},e.prototype._cellBackgroundButtonTabbingAwayHandler=function(t){t.isShiftKeyPressed||this._raiseTabbingAwayEvent(t.isShiftKeyPressed,(function(){t.cancel()}))},e.prototype._cellBackgroundColorContextMenuHideCompletedHandler=function(){this._isCellBackgroundColorContextMenuVisible=!1},e.prototype._cellBackgroundColorSelectedHandler=function(t){for(var e="AutotaskRichTextTableCell",n=this._selection,i=n.anchorNode,o=this._findTableParent(i),a=o.cloneNode(!0),r=!0,s=0,l=this._selectedCells;s<l.length;s++){var u=l[s],c=u.parentElement;r&&(a.rows[c.rowIndex].cells[u.cellIndex].id=e,r=!1),a.rows[c.rowIndex].cells[u.cellIndex].style.backgroundColor=null===t?"":t}var d=document.createRange();d.selectNode(o),n.removeAllRanges(),n.addRange(d),document.execCommand("insertHTML",!1,a.outerHTML);var h=AutotaskDomSystem.Document.getElementById(e);h.removeAttribute("id"),this._setCollapsedSelectionRange(n,h),this._selectedCellBackgroundColor=t},e.prototype._createCell=function(){var t=document.createElement("td");return t.appendChild(document.createElement("br")),t},e.prototype._createColumn=function(){var t=document.createElement("col");return t.style.width=this._defaultWidth,t},e.prototype._createHeaderCell=function(){var t=document.createElement("th"),e=document.createElement("span");return e.style.fontWeight="bold",e.innerText=this._defaultHeaderText,t.appendChild(e),t},e.prototype._createRow=function(t){for(var e=document.createElement("tr"),n=0;n<t;n++)e.appendChild(this._createCell());return e},e.prototype._findColumnGroup=function(t){var e=null;return"COLGROUP"===t.firstElementChild.nodeName&&(e=t.firstElementChild),e},e.prototype._findSelectedTableCells=function(t,e){var n,i,o,a,r,s=this._findTableCellParent(t),l=this._findTableCellParent(e),u=this._findTableRowParent(s),c=this._findTableRowParent(l);if(u.rowIndex<c.rowIndex?(n=u,i=c,o=s.cellIndex,a=l.cellIndex):u.rowIndex===c.rowIndex?(n=u,i=c,o=Math.min(s.cellIndex,l.cellIndex),a=Math.max(s.cellIndex,l.cellIndex)):(n=c,i=u,o=l.cellIndex,a=s.cellIndex),n===i)r=Array.from(n.cells).slice(o,a+1);else{r=Array.from(n.cells).slice(o,n.cells.length);for(var d=this._findTableParent(n),h=n.rowIndex+1;h<i.rowIndex;h++)r=r.concat(Array.from(d.rows[h].cells));r=r.concat(Array.from(i.cells).slice(0,a+1))}return r},e.prototype._findTableParent=function(t){var e=null,n=this._findTableRowParent(t);return null!==n&&(e=n.parentElement.parentElement),e},e.prototype._findTableCellParent=function(t){return this._findParent(t,(function(t){return t instanceof HTMLTableCellElement}))},e.prototype._findTableRowParent=function(t){var e=null,n=this._findTableCellParent(t);return null!==n&&(e=n.parentElement),e},e.prototype._insertTableButtonClickHandler=function(){this._saveSelection(),this._insertTableDialogRoute.makeRequest(null,null)},e.prototype._raiseTabbingAwayEvent=function(t,e){for(var n=0,i=this._tabbingAwayHandlers;n<i.length;n++){(0,i[n])(t,e)}},e.prototype._removeColumn=function(){var t=this._selection,e=this._findTableCellParent(t.anchorNode),n=e.parentElement.parentElement.parentElement,i=n.cloneNode(!0);i.id="AutotaskRichTextTable";var o=e.cellIndex,a=this._findColumnGroup(i);if(null!==a&&o<a.children.length&&a.children[o].remove(),null!==i.tHead&&o<i.tHead.rows[0].cells.length&&i.tHead.rows[0].cells[o].remove(),null!==i.tBodies)for(var r=0;r<i.tBodies[0].rows.length;r++)o<i.tBodies[0].rows[r].cells.length&&i.tBodies[0].rows[r].cells[o].remove();var s=document.createRange();s.selectNode(n),t.removeAllRanges(),t.addRange(s),document.execCommand("insertHTML",!1,i.outerHTML);var l=0===o?0:o-1,u=AutotaskDomSystem.Document.getElementById(i.id);u.removeAttribute("id"),null!==u.tHead?(l>=u.tHead.rows[0].cells.length&&(l=u.tHead.rows[0].cells.length),this._setCollapsedSelectionRange(t,u.tHead.rows[0].cells[l])):null!==u.tBodies&&(l>=u.tBodies[0].rows[0].cells.length&&(l=u.tBodies[0].rows[0].cells.length),this._setCollapsedSelectionRange(t,u.tBodies[0].rows[0].cells[l]))},e.prototype._removeTable=function(){var t,e=this._selection,n=this._findTableParent(e.anchorNode);t=null!==n.previousSibling?n.previousSibling:null!==n.nextSibling?n.nextSibling:n.parentNode;var i=document.createRange();i.selectNode(n),e.removeAllRanges(),e.addRange(i),document.execCommand("delete"),this._setCollapsedSelectionRange(e,t)},e.prototype._removeRow=function(){var t=this._selection,e=this._findTableRowParent(t.anchorNode),n=e.parentElement.parentElement,i=n.cloneNode(!0);i.id="AutotaskRichTextTable";var o=e.sectionRowIndex;i.tBodies[0].rows[o].remove();var a=document.createRange();a.selectNode(n),t.removeAllRanges(),t.addRange(a),document.execCommand("insertHTML",!1,i.outerHTML);var r=0===o?0:o-1,s=AutotaskDomSystem.Document.getElementById(i.id);s.removeAttribute("id"),this._setCollapsedSelectionRange(t,s.tBodies[0].rows[r].cells[0])},e.prototype._setCollapsedSelectionRange=function(t,e){var n=document.createRange();n.setStart(e,0),n.collapse(!0),t.removeAllRanges(),t.addRange(n)},e.prototype._tableButtonClickHandler=function(){this._isTableContextMenuVisible?this._tableContextMenuInstance.__hideWithoutDelay():this._tableContextMenuInstance.show(this._tableButtonElement)},e.prototype._tableButtonTabbingAwayHandler=function(t){t.isShiftKeyPressed&&this._raiseTabbingAwayEvent(t.isShiftKeyPressed,(function(){t.cancel()}))},e.prototype._toggleColumnButtonEnabled=function(t,e){var n=!1,i=0,o=this._findTableCellParent(t);if(null!==o){var a=o;if(e!==t&&(a=this._findTableCellParent(e)),n=o===a)i=o.parentElement.cells.length}var r=i>=this._maximumColumnCount,s=n&&!r,l=n&&i>1,u=r?this._maximumColumnCountExceededMessage:null;this._addColumnAfterButtonInstance.set_enabled(s),this._addColumnAfterButtonInstance.set_title(u),this._addColumnBeforeButtonInstance.set_enabled(s),this._addColumnBeforeButtonInstance.set_title(u),this._removeColumnButtonInstance.set_enabled(l)},e.prototype._tableContextMenuHideCompletedHandler=function(){this._isTableContextMenuVisible=!1},e.prototype._tableContextMenuShowCompletedHandler=function(){this._isTableContextMenuVisible=!0},e.prototype._toggleRowButtonEnabled=function(t,e){var n=!1,i=0,o=this._findTableRowParent(t);if(!(null!==o&&"THEAD"===o.parentElement.nodeName)&&null!==o){var a=o;if(e!==t&&(a=this._findTableRowParent(e)),n=o===a)i=o.parentElement.rows.length}var r=i>=this._maximumRowCount,s=n&&!r,l=n&&i>1,u=r?this._maximumRowCountExceededMessage:null;this._addRowAboveButtonInstance.set_enabled(s),this._addRowAboveButtonInstance.set_title(u),this._addRowBelowButtonInstance.set_enabled(s),this._addRowBelowButtonInstance.set_title(u),this._removeRowButtonInstance.set_enabled(l)},e}(t.ToolBar);t.TableToolBar=e}(AutotaskRichTextBox||(AutotaskRichTextBox={})),function(t){var e=function(t){function e(e,n){var i=t.call(this,e,n)||this;return i._textElement=i._primaryElement.firstElementChild,i}return __extends(e,t),e.prototype.showSelection=function(t){this._textElement.innerText=t},e}(AutotaskButtons.EditorButton);t.TextStyleContextMenuButton=e}(AutotaskRichTextBox||(AutotaskRichTextBox={})),function(t){var e=function(t){function e(e,n,i,o,a){var r=t.call(this)||this;return r._styleButtonElement=AutotaskDomSystem.Document.getElementById(e),r._styleButtonId=n,r._contextMenuId=i,r._menuButtonIds=o,r._styleNames=a,r._tabbingAwayHandlers=[],r._isContextMenuVisible=!1,r._contextMenuInstance=null,r._styleButtonInstance=null,r}return __extends(e,t),Object.defineProperty(e.prototype,"_styleButton",{get:function(){return this._styleButtonInstance},enumerable:!1,configurable:!0}),e.prototype.focusEnd=function(){this._styleButton.focus()},e.prototype.focusStart=function(){this.focusEnd()},Object.defineProperty(e.prototype,"isEnabled",{set:function(t){this._styleButton.isEnabled=t,t||this._contextMenuInstance.__hideWithoutDelay()},enumerable:!1,configurable:!0}),e.prototype.addTabbingAwayHandler=function(t){this._tabbingAwayHandlers.push(t)},e.prototype.selectionChanged=function(t){this._styleButton.isEnabled=!0;var e=t.selection.anchorNode,n=t.selection.focusNode,i=0;if(null!==e.parentElement&&n===e){var o=getComputedStyle(e.parentElement);i=this._determineKey(o.fontSize,o.fontFamily)}this._styleButton.showSelection(this._styleNames[i])},e.prototype.selectionCleared=function(){this._styleButton.showSelection(this._styleNames[0]),this.isEnabled=!1},e.prototype.__initialize=function(){var t=this;this._styleButtonInstance=autotask.find(this._styleButtonId),this._styleButtonInstance.addClickHandler((function(){t._styleButtonClickHandler()})),this._styleButtonInstance.addTabbingAwayHandler((function(e,n){t._styleButtonTabbingAwayHandler(e,n)})),this._contextMenuInstance=autotask.find(this._contextMenuId),this._contextMenuInstance.addHideCompletedHandler((function(){t._contextMenuHideCompletedHandler()})),this._contextMenuInstance.addShowCompletedHandler((function(){t._contextMenuShowCompletedHandler()}));for(var e=function(e){autotask.find(n._menuButtonIds[e]).__addClick((function(){t._menuButtonClickHandler(e)}))},n=this,i=0;i<this._menuButtonIds.length;i++)e(i)},e.prototype._contextMenuHideCompletedHandler=function(){this._isContextMenuVisible=!1},e.prototype._contextMenuShowCompletedHandler=function(){this._isContextMenuVisible=!0},e.prototype._determineKey=function(t,e){var n;switch(t){case"10px":n=5;break;case"13px":n="courier"===e?6:0;break;case"16px":n=4;break;case"18px":n=3;break;case"24px":n=2;break;case"32px":n=1;break;default:n=0}return n},e.prototype._menuButtonClickHandler=function(t){switch(t){case 0:this._toggleTextStyle("2",null);break;case 1:this._toggleTextStyle("6",null);break;case 2:this._toggleTextStyle("5",null);break;case 3:this._toggleTextStyle("4",null);break;case 4:this._toggleTextStyle("3",null);break;case 5:this._toggleTextStyle("1",null);break;case 6:this._toggleTextStyle("2","courier");break;default:autotask.throwException("Unexpected key")}this._styleButton.showSelection(this._styleNames[t])},e.prototype._raiseTabbingAwayEvent=function(t,e){for(var n=0,i=this._tabbingAwayHandlers;n<i.length;n++){(0,i[n])(t,e)}},e.prototype._styleButtonClickHandler=function(){this._isContextMenuVisible?this._contextMenuInstance.__hideWithoutDelay():this._contextMenuInstance.show(this._styleButtonElement)},e.prototype._styleButtonTabbingAwayHandler=function(t,e){this._raiseTabbingAwayEvent(t,e)},e.prototype._toggleTextStyle=function(t,e){document.execCommand("fontSize",!1,t);var n=null===e?"inherit":e;document.execCommand("fontName",!1,n)},e}(t.ToolBar);t.TextStyleToolBar=e}(AutotaskRichTextBox||(AutotaskRichTextBox={})),function(t){var e=function(){function t(t,e,n,i){var o=this;this._autoCompleteRoute=e,this._overlay=t,this._overlayLaunchingElement=n,this._applyFiltersHandler=i,this._ajaxRequestCanceler=null,this._timeoutDuration=300,this._timeoutId=null,this._overlay.addHideCompletedHandler((function(){o._overlayHideCompletedHandler()}))}return Object.defineProperty(t.prototype,"isOverlayVisible",{get:function(){return this._overlay.isVisible},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isSearchInProgress",{get:function(){return null!==this._ajaxRequestCanceler},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"itemSet",{get:function(){return this._overlay.itemSet},enumerable:!1,configurable:!0}),t.prototype.autoComplete=function(t,e){var n=this;this._cancelTimer(),this._startTimer((function(){null!==n._timeoutId&&(n._timeoutId=null,n._cancelAutoCompleteRequest(),n._overlay.show(n._overlayLaunchingElement),n._overlay.clearItemSet(),n._overlay.showLoadingIndicator(),n._autoComplete(t,e))}))},t.prototype.cancelAutoComplete=function(){this._cancelTimer(),this._cancelAutoCompleteRequest()},t.prototype.hideOverlay=function(){this._hideOverlay()},t.prototype.setItemClickHandler=function(t){this._overlay.setItemClickHandler(t)},t.prototype.setOverlayHideCompletedHandler=function(t){this._overlay.setHideCompletedHandler(t)},t.prototype.setOverlayMouseDownHandler=function(t){this._overlay.setMouseDownHandler(t)},t.prototype.setOverlayMouseLeaveHandler=function(t){this._overlay.setMouseDownHandler(t)},t.prototype.showOverlay=function(){this._overlay.show(this._overlayLaunchingElement)},t.prototype._autoComplete=function(t,e){var n=this,i=new AutotaskDataSelector.ApplyFiltersEventArgs,o=this._autoCompleteRoute.get_searchCriteriaParameterName();i.addString(o,t),this._applyFiltersHandler(i);this._ajaxRequestCanceler=this._autoCompleteRoute.autoComplete(i.data,(function(i,o){n._autoCompleteSuccessHandler(i,o,t,e)}))},t.prototype._autoCompleteSuccessHandler=function(t,e,n,i){this._ajaxRequestCanceler=null,this._overlay.isVisible&&(null!==t&&null!==e?(this._overlay.hideLoadingIndicator(),this._overlay.applyItemSetHtml(t,e),null!==this._overlay.itemSet&&(null!==i&&this._overlay.itemSet.selectItemByValue(i),this._overlay.itemSet.search(n)),this._overlay.__reposition()):this._hideOverlay())},t.prototype._cancelAutoCompleteRequest=function(){null!==this._ajaxRequestCanceler&&(this._ajaxRequestCanceler.__cancelRequest(),this._ajaxRequestCanceler=null)},t.prototype._cancelTimer=function(){null!==this._timeoutId&&(window.clearTimeout(this._timeoutId),this._timeoutId=null)},t.prototype._hideOverlay=function(){this._overlay.hide()},t.prototype._overlayHideCompletedHandler=function(){this._cancelAutoCompleteRequest(),this._cancelTimer(),null!==this._overlay.itemSet&&this._overlay.clearItemSet()},t.prototype._startTimer=function(t){this._timeoutId=window.setTimeout(t,this._timeoutDuration)},t}();t.AutoCompleteCoordinator=e}(AutotaskSingleDataSelector||(AutotaskSingleDataSelector={})),function(t){var e=function(e){function n(t){var n=e.call(this,t,!1)||this,i=AutotaskDomSystem.Document.getElementById(t).firstElementChild;return n._contentElement=i.firstElementChild,n._loadingIndicatorElement=n._contentElement.firstElementChild,n._defaultStyleCoordinator=new AutotaskOverlaySystem.DefaultStyleCoordinator(n._overlayElementStyleApplicator),n._itemClickHandler=null,n._itemSet=null,n._mouseDownHandler=null,n._mouseLeaveHandler=null,n._scrollCoordinator=new AutotaskEditorSystem.ItemOverlayScrollCoordinator(n),n._contentElement.addEventListener("mousedown",(function(t){n._mouseDownListener(t)})),n._contentElement.addEventListener("mouseleave",(function(){n._mouseLeaveListener()})),n._contentElement.addEventListener("wheel",(function(t){n._mouseWheelListener(t)})),n}return __extends(n,e),Object.defineProperty(n.prototype,"contentHeight",{get:function(){return this._contentElement.clientHeight},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"contentScrollTop",{get:function(){return this._contentElement.scrollTop},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"itemSet",{get:function(){return this._itemSet},enumerable:!1,configurable:!0}),n.prototype.clearItemSet=function(){null!==this._itemSet&&(null!==this._contentElement.lastChild&&this._contentElement.removeChild(this._contentElement.lastChild),this._itemSet.dispose(),this._itemSet=null)},n.prototype.hideLoadingIndicator=function(){this._loadingIndicatorElement.classList.remove("Active")},n.prototype.applySize=function(t){this._contentElement.style.minHeight=t.minimumHeightValue.toString()+"px",this._contentElement.style.maxHeight=(t.maximumHeightValue-6).toString()+"px",this._contentElement.style.minWidth=t.minimumWidthValue.toString()+"px",this._contentElement.style.maxWidth=t.maximumWidthValue.toString()+"px"},n.prototype.applyItemSetHtml=function(t,e){if(this.clearItemSet(),null!==t&&null!==e){this._contentElement.insertAdjacentHTML("beforeend",t);var n=AutotaskDomSystem.Document.getChildElementByClassName(this._contentElement,"ItemSet");this._intitalizeItemSet(n,e)}this.__reposition()},n.prototype.scrollContent=function(t){this._contentElement.scrollTop=t},n.prototype.setHideCompletedHandler=function(t){this.addHideCompletedHandler(t)},n.prototype.setItemClickHandler=function(t){this._itemClickHandler=t},n.prototype.setMouseDownHandler=function(t){this._mouseDownHandler=t},n.prototype.setMouseLeaveHandler=function(t){this._mouseLeaveHandler=t},n.prototype.show=function(t){this.showLoadingIndicator(),this._clearSizeStyles(),this._show(t)},n.prototype.showLoadingIndicator=function(){this._loadingIndicatorElement.classList.add("Active")},Object.defineProperty(n.prototype,"_delayBeforeHiding",{get:function(){return 0},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"_delayBeforeShowing",{get:function(){return 0},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"_styleCoordinator",{get:function(){return this._defaultStyleCoordinator},enumerable:!1,configurable:!0}),n.prototype._createPositionCoordinator=function(t){var e=this._calculateMinimumHeight(),i=n._contentMaxHeight,o=new AutotaskEditorSystem.DropDownOverlayPositionCoordinator(e,i,this),a=new AutotaskPositionApplicatorSystem.Default(this._defaultStyleCoordinator,t,null,null);o.addPositionAndApplicator(new AutotaskEditorSystem.DropDownOverlayBottomAlignedLeftPosition(0,-1),a);var r=new AutotaskPositionApplicatorSystem.Default(this._defaultStyleCoordinator,t,null,"Top");return o.addPositionAndApplicator(new AutotaskEditorSystem.DropDownOverlayTopAlignedLeftPosition(0,1),r),o},n.prototype._calculateMinimumHeight=function(){var t=n._defaultContentMinHeight;if(null!==this._itemSet){var e=this._itemSet.itemCount;e>0&&e<6&&(t=this._itemSet.itemCount*this._itemSet.itemDisplayHeight)}return t},n.prototype._clearSizeStyles=function(){this._contentElement.style.minHeight="",this._contentElement.style.maxHeight="",this._contentElement.style.minWidth="",this._contentElement.style.maxWidth=""},n.prototype._intitalizeItemSet=function(e,n){var i=this;this._itemSet=new t.ItemSet(e,n,this._scrollCoordinator),this._itemSet.targetFirstItem(),this._itemSet.setItemClickHandler((function(t){i._itemSetItemClickHandler(t)}))},n.prototype._itemSetItemClickHandler=function(t){null!==this._itemClickHandler&&this._itemClickHandler(t)},n.prototype._mouseDownListener=function(t){t.preventDefault(),null!==this._mouseDownHandler&&this._mouseDownHandler()},n.prototype._mouseLeaveListener=function(){null!==this._mouseLeaveHandler&&this._mouseLeaveHandler()},n.prototype._mouseWheelListener=function(t){var e=this._contentElement.scrollTop,n=this._contentElement.scrollHeight,i=this._contentElement.clientHeight;!1===(t.deltaY<0?e>0:e+i<n)&&t.preventDefault()},n._contentMaxHeight=364,n._defaultContentMinHeight=106,n}(AutotaskOverlaySystem.ContextOverlay);t.AutoCompleteOverlay=e}(AutotaskSingleDataSelector||(AutotaskSingleDataSelector={})),function(t){var e=function(){function t(t){this._editorInstance=t}return Object.defineProperty(t.prototype,"editorInstance",{get:function(){return this._editorInstance},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"instanceId",{get:function(){return this._editorInstance.id},enumerable:!1,configurable:!0}),t}();t.ChangeEventArgs=e}(AutotaskSingleDataSelector||(AutotaskSingleDataSelector={})),function(t){var e=function(t){function e(e,n,i,o){var a=t.call(this,e,n,null!==i?[i]:[],o)||this;return a._chipInformation=i,a._contextOverlayRoute=null,a}return __extends(e,t),Object.defineProperty(e.prototype,"chipInformation",{get:function(){return null!==this._chipInformation?this._chipInformation.copy():null},set:function(t){if(this.clear(),null!==t){var e=t.copy();this._insert(e),this._chipInformation=e}else this._chipInformation=null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return this.values.length>0?this.values[0]:null},enumerable:!1,configurable:!0}),e.prototype.blur=function(){this._blur()},e.prototype.enableContextOverlay=function(t){this._contextOverlayRoute=t,this._enableContextOverlay()},e.prototype.focus=function(){this._focus()},e.prototype._clear=function(){t.prototype._clear.call(this),this._chipInformation=null},e.prototype._determineContextOverlayRoute=function(t){return null===this._contextOverlayRoute?autotask.throwException("The context overlay route is null."):this._contextOverlayRoute},e.prototype._removeByIndex=function(e){t.prototype._removeByIndex.call(this,e),this._chipInformation=null},e}(AutotaskEditorSystem.ChipList);t.ChipList=e}(AutotaskSingleDataSelector||(AutotaskSingleDataSelector={})),function(t){var e=function(){function t(t){this._chipInformation=t}return Object.defineProperty(t.prototype,"chipInformation",{get:function(){return this._chipInformation},enumerable:!1,configurable:!0}),t}();t.DialogSelectedEventArgs=e}(AutotaskSingleDataSelector||(AutotaskSingleDataSelector={})),function(t){var e=function(){function t(t,e){this._overlay=t,this._overlayLaunchingElement=e}return Object.defineProperty(t.prototype,"isOverlayVisible",{get:function(){return this._overlay.isVisible},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"itemSet",{get:function(){return this._overlay.itemSet},enumerable:!1,configurable:!0}),t.prototype.applyItemSetHtml=function(t,e){this._overlay.applyItemSetHtml(t,e)},t.prototype.clearItemSet=function(){this._overlay.clearItemSet()},t.prototype.hideOverlay=function(){this._overlay.hide()},t.prototype.setItemClickHandler=function(t){this._overlay.setItemClickHandler(t)},t.prototype.setOverlayHideCompletedHandler=function(t){this._overlay.setHideCompletedHandler(t)},t.prototype.setOverlayMouseDownHandler=function(t){this._overlay.setMouseDownHandler(t)},t.prototype.setOverlayMouseLeaveHandler=function(t){this._overlay.setMouseDownHandler(t)},t.prototype.showOverlay=function(){this._overlay.show(this._overlayLaunchingElement)},t}();t.DropDownCoordinator=e}(AutotaskSingleDataSelector||(AutotaskSingleDataSelector={})),function(t){var e=function(e){function n(t,n){var i=e.call(this,t,!1)||this,o=AutotaskDomSystem.Document.getElementById(t).firstElementChild;return i._contentElement=o.firstElementChild,i._defaultStyleCoordinator=new AutotaskOverlaySystem.DefaultStyleCoordinator(i._overlayElementStyleApplicator),i._itemSet=null,i._itemClickHandler=null,i._mouseDownHandler=null,i._mouseLeaveHandler=null,i._scrollCoordinator=new AutotaskEditorSystem.ItemOverlayScrollCoordinator(i),i._contentElement.addEventListener("mousedown",(function(t){i._mouseDownListener(t)})),i._contentElement.addEventListener("mouseleave",(function(){i._mouseLeaveListener()})),i._contentElement.addEventListener("wheel",(function(t){i._mouseWheelListener(t)})),i._itemSet=null,null!==i._contentElement.firstElementChild&&null!==n&&i._intitalizeItemSet(i._contentElement.firstElementChild,n),i}return __extends(n,e),Object.defineProperty(n.prototype,"contentHeight",{get:function(){return this._contentElement.clientHeight},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"contentScrollTop",{get:function(){return this._contentElement.scrollTop},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"itemSet",{get:function(){return this._itemSet},enumerable:!1,configurable:!0}),n.prototype.applyItemSetHtml=function(t,e){if(this.clearItemSet(),null!==t&&null!==e){this._contentElement.insertAdjacentHTML("beforeend",t);var n=AutotaskDomSystem.Document.getChildElementByClassName(this._contentElement,"ItemSet");this._intitalizeItemSet(n,e)}},n.prototype.applySize=function(t){this._contentElement.style.minHeight=t.minimumHeightValue.toString()+"px",this._contentElement.style.maxHeight=(t.maximumHeightValue-6).toString()+"px",this._contentElement.style.minWidth=t.minimumWidthValue.toString()+"px",this._contentElement.style.maxWidth=t.maximumWidthValue.toString()+"px"},n.prototype.clearItemSet=function(){if(null!==this._itemSet){var t=this._contentElement.getElementsByClassName("ItemSet");t.length>0&&(this._contentElement.removeChild(t[0]),this._itemSet.dispose(),this._itemSet=null)}},n.prototype.scrollContent=function(t){this._contentElement.scrollTop=t},n.prototype.setHideCompletedHandler=function(t){this.addHideCompletedHandler(t)},n.prototype.setItemClickHandler=function(t){this._itemClickHandler=t},n.prototype.setMouseDownHandler=function(t){this._mouseDownHandler=t},n.prototype.setMouseLeaveHandler=function(t){this._mouseLeaveHandler=t},n.prototype.show=function(t){this._clearSizeStyles(),this._show(t)},Object.defineProperty(n.prototype,"_delayBeforeHiding",{get:function(){return 0},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"_delayBeforeShowing",{get:function(){return 0},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"_styleCoordinator",{get:function(){return this._defaultStyleCoordinator},enumerable:!1,configurable:!0}),n.prototype._createPositionCoordinator=function(t){var e=this._calculateMinimumHeight(),i=n._contentMaxHeight,o=new AutotaskEditorSystem.DropDownOverlayPositionCoordinator(e,i,this),a=new AutotaskPositionApplicatorSystem.Default(this._defaultStyleCoordinator,t,null,null);o.addPositionAndApplicator(new AutotaskEditorSystem.DropDownOverlayBottomAlignedLeftPosition(0,-1),a);var r=new AutotaskPositionApplicatorSystem.Default(this._defaultStyleCoordinator,t,null,"Top");return o.addPositionAndApplicator(new AutotaskEditorSystem.DropDownOverlayTopAlignedLeftPosition(0,1),r),o},n.prototype._calculateMinimumHeight=function(){var t=n._defaultContentMinHeight;if(null!==this._itemSet){var e=this._itemSet.itemCount;e>0&&e<6&&(t=this._itemSet.itemCount*this._itemSet.itemDisplayHeight)}return t},n.prototype._clearSizeStyles=function(){this._contentElement.style.minHeight="",this._contentElement.style.maxHeight="",this._contentElement.style.minWidth="",this._contentElement.style.maxWidth=""},n.prototype._intitalizeItemSet=function(e,n){var i=this;this._itemSet=new t.ItemSet(e,n,this._scrollCoordinator),this._itemSet.targetFirstItem(),this._itemSet.setItemClickHandler((function(t){i._itemSetItemClickHandler(t)}))},n.prototype._itemSetItemClickHandler=function(t){null!==this._itemClickHandler&&this._itemClickHandler(t)},n.prototype._mouseDownListener=function(t){t.preventDefault(),null!==this._mouseDownHandler&&this._mouseDownHandler()},n.prototype._mouseLeaveListener=function(){null!==this._mouseLeaveHandler&&this._mouseLeaveHandler()},n.prototype._mouseWheelListener=function(t){var e=this._contentElement.scrollTop,n=this._contentElement.scrollHeight,i=this._contentElement.clientHeight;!1===(t.deltaY<0?e>0:e+i<n)&&t.preventDefault()},n._contentMaxHeight=364,n._defaultContentMinHeight=106,n}(AutotaskOverlaySystem.ContextOverlay);t.DropDownOverlay=e}(AutotaskSingleDataSelector||(AutotaskSingleDataSelector={})),function(t){var e=function(){function t(t,e,n){this._editorInstance=t,this._previousValue=e,this._currentValue=n}return Object.defineProperty(t.prototype,"currentValue",{get:function(){return this._currentValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"editorInstance",{get:function(){return this._editorInstance},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"previousValue",{get:function(){return this._previousValue},enumerable:!1,configurable:!0}),t}();t.ImmediateChangeEventArgs=e}(AutotaskSingleDataSelector||(AutotaskSingleDataSelector={})),function(t){var e=function(){function e(e,n,i){var o=this;this._itemListElement=e,this._items=this._createItems(e,n),this._targetCoordinator=new AutotaskDataSelector.ItemListTargetCoordinator(this._items,i),this._searchCoordinator=new AutotaskDataSelector.ItemListSearchCoordinator(this._items),this._selectionCoordinator=new t.ItemListSelectionCoordinator(this._items),this._itemClickDelegate=null,this._isMouseOverTargetingEnabled=!0,this._mouseMoveDelegate=function(t){o._itemListMouseMoveListener(t)},this._mouseMoveInitialPositionX=null,this._mouseMoveInitialPositionY=null}return Object.defineProperty(e.prototype,"isTargetedItemSelected",{get:function(){var t=this._targetCoordinator.targetedItemIndex,e=!1;return null!==t&&(e=this._selectionCoordinator.isItemSelected(t)),e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"itemCount",{get:function(){return this._items.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"itemDisplayHeight",{get:function(){return this._items[0].displayHeight},enumerable:!1,configurable:!0}),e.prototype.containsItem=function(t){for(var e=!1,n=0,i=this._items;n<i.length;n++){var o=i[n];if(AutotaskItemSelectionSystem.ItemValueComparer.equals(o.value,t)){e=!0;break}}return e},e.prototype.createChipInformationForTargetedItem=function(){var t=null;return null!==this._targetCoordinator.targetedItemIndex&&(t=this._items[this._targetCoordinator.targetedItemIndex].chipInformation),t},e.prototype.dispose=function(){for(var t=0,e=this._items;t<e.length;t++){e[t].dispose()}this._items.length=0},e.prototype.enableMouseOverTargeting=function(){this._isMouseOverTargetingEnabled||this._enableMouseOverTargeting()},e.prototype.getTargetedItemValue=function(){var t=null,e=this._targetCoordinator.targetedItem;return null!==e&&(t=e.value),t},e.prototype.moveTargetDown=function(){this._isMouseOverTargetingEnabled&&this._disableMouseOverTargeting(),this._targetCoordinator.moveTargetDown()},e.prototype.moveTargetUp=function(){this._isMouseOverTargetingEnabled&&this._disableMouseOverTargeting(),this._targetCoordinator.moveTargetUp()},e.prototype.search=function(t){return this._searchCoordinator.search(t)},e.prototype.selectItemByIndex=function(t){this._selectionCoordinator.selectItemByIndex(t)},e.prototype.selectItemByValue=function(t){this._selectionCoordinator.selectItemByValue(t)},e.prototype.selectTargetedItem=function(){var t=this._targetCoordinator.targetedItemIndex;null!==t&&this._selectionCoordinator.selectItemByIndex(t)},e.prototype.setItemClickHandler=function(t){this._itemClickDelegate=t},e.prototype.targetFirstItem=function(){this._targetCoordinator.targetFirstItem()},e.prototype.unselectAllItems=function(){this._selectionCoordinator.unselectAllItems()},e.prototype.unselectItemByIndex=function(t){this._selectionCoordinator.unselectItemByIndex(t)},e.prototype.unselectItemByValue=function(t){this._selectionCoordinator.unselectItemByValue(t)},e.prototype.unselectTargetedItem=function(){var t=this._targetCoordinator.targetedItemIndex;null!==t&&this._selectionCoordinator.unselectItemByIndex(t)},e.prototype._createItems=function(t,e){for(var n=this,i=[],o=t.firstElementChild,a=0;null!==o;){var r=e[a];if(null!==r){var s=r.create(o,(function(t){n._itemClickHandler(t)}),(function(t){n._itemMouseOverHandler(t)}));i.push(s)}a++,o=o.nextElementSibling}return i},e.prototype._enableMouseOverTargeting=function(){this._isMouseOverTargetingEnabled=!0,this._itemListElement.removeEventListener("mousemove",this._mouseMoveDelegate)},e.prototype._disableMouseOverTargeting=function(){this._mouseMoveInitialPositionX=null,this._mouseMoveInitialPositionY=null,this._isMouseOverTargetingEnabled=!1,this._itemListElement.addEventListener("mousemove",this._mouseMoveDelegate)},e.prototype._findItemElement=function(t){var e=null;if(t.classList.contains("Item"))e=t;else for(var n=t.parentElement;null!==n;){if(n.classList.contains("Item")){e=n;break}n=n.parentElement}return e},e.prototype._itemClickHandler=function(t){null!==this._itemClickDelegate&&this._itemClickDelegate(t,this._items[t],this._items[t].chipInformation)},e.prototype._itemListMouseMoveListener=function(t){if(null===this._mouseMoveInitialPositionX&&null===this._mouseMoveInitialPositionY)this._mouseMoveInitialPositionX=t.clientX,this._mouseMoveInitialPositionY=t.clientY;else if(null!==this._mouseMoveInitialPositionX&&null!==this._mouseMoveInitialPositionY&&(this._mouseMoveInitialPositionX-t.clientX!=0||this._mouseMoveInitialPositionY-t.clientY!=0)){this._enableMouseOverTargeting();var e=this._findItemElement(t.srcElement);if(null!==e){var n=parseInt(e.dataset.index,0);this._targetCoordinator.targetItemByIndex(n)}}},e.prototype._itemMouseOverHandler=function(t){this._isMouseOverTargetingEnabled&&this._targetCoordinator.targetItemByIndex(t)},e}();t.ItemList=e}(AutotaskSingleDataSelector||(AutotaskSingleDataSelector={})),function(t){var e=function(){function t(t){this._items=t,this._selectedItemIndex=null}return Object.defineProperty(t.prototype,"selectedItem",{get:function(){var t=null;return null!==this._selectedItemIndex&&(t=this._items[this._selectedItemIndex]),t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"selectedItemIndex",{get:function(){return this._selectedItemIndex},enumerable:!1,configurable:!0}),t.prototype.isItemSelected=function(t){return t===this._selectedItemIndex},t.prototype.selectItemByIndex=function(t){t!==this._selectedItemIndex&&(null!==this._selectedItemIndex&&this._items[this._selectedItemIndex].unselect(),this._items[t].select(),this._selectedItemIndex=t)},t.prototype.selectItemByValue=function(t){for(var e=0;e<this._items.length;e++){var n=this._items[e];if(AutotaskItemSelectionSystem.ItemValueComparer.equals(n.value,t)){this.selectItemByIndex(e);break}}},t.prototype.unselectAllItems=function(){for(var t=0,e=this._items;t<e.length;t++){e[t].unselect()}},t.prototype.unselectItemByIndex=function(t){t===this._selectedItemIndex&&(this._items[this._selectedItemIndex].unselect(),this._selectedItemIndex=null)},t.prototype.unselectItemByValue=function(t){for(var e=0;e<this._items.length;e++){var n=this._items[e];if(AutotaskItemSelectionSystem.ItemValueComparer.equals(n.value,t)){this.unselectItemByIndex(e);break}}},t}();t.ItemListSelectionCoordinator=e}(AutotaskSingleDataSelector||(AutotaskSingleDataSelector={})),function(t){var e=function(){function e(e,n,i){var o=this,a=e.firstElementChild;this._itemList=new t.ItemList(a,n,i),this._itemList.setItemClickHandler((function(t,e,n){o._itemClick(t,e,n)})),this._itemClickDelegate=null}return Object.defineProperty(e.prototype,"isTargetedItemSelected",{get:function(){return this._itemList.isTargetedItemSelected},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"itemCount",{get:function(){return this._itemList.itemCount},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"itemDisplayHeight",{get:function(){return this._itemList.itemDisplayHeight},enumerable:!1,configurable:!0}),e.prototype.containsItem=function(t){return this._itemList.containsItem(t)},e.prototype.createChipInformationForTargetedItem=function(){return this._itemList.createChipInformationForTargetedItem()},e.prototype.dispose=function(){this._itemList.dispose()},e.prototype.enableMouseOverTargeting=function(){this._itemList.enableMouseOverTargeting()},e.prototype.getTargetedItemValue=function(){return this._itemList.getTargetedItemValue()},e.prototype.moveTargetDown=function(){this._itemList.moveTargetDown()},e.prototype.moveTargetUp=function(){this._itemList.moveTargetUp()},e.prototype.search=function(t){return this._itemList.search(t)},e.prototype.selectItemByValue=function(t){this._itemList.selectItemByValue(t)},e.prototype.selectTargetedItem=function(){this._itemList.selectTargetedItem()},e.prototype.setItemClickHandler=function(t){this._itemClickDelegate=t},e.prototype.targetFirstItem=function(){this._itemList.targetFirstItem()},e.prototype.unselectAllItems=function(){this._itemList.unselectAllItems()},e.prototype.unselectItemByValue=function(t){this._itemList.unselectItemByValue(t)},e.prototype.unselectTargetedItem=function(){this._itemList.unselectTargetedItem()},e.prototype._itemClick=function(t,e,n){var i=this;if(null!==this._itemClickDelegate){var o=new AutotaskDataSelector.ItemClickEventArgs(e,n,(function(){i._itemList.selectItemByIndex(t)}),(function(){i._itemList.unselectItemByIndex(t)}));this._itemClickDelegate(o)}},e}();t.ItemSet=e}(AutotaskSingleDataSelector||(AutotaskSingleDataSelector={})),function(t){var e=function(){function t(t,e,n){var i=this;this._searchBoxElement=AutotaskDomSystem.Document.getElementById(t),this._placeholderElement=this._searchBoxElement.children[0],this._inputElement=this._searchBoxElement.children[1],this._inputElement.addEventListener("blur",(function(t){i._blurListener(t)})),this._inputElement.addEventListener("focus",(function(){i._focusListener()})),this._inputElement.addEventListener("input",(function(){i._inputListener()})),this._inputElement.addEventListener("keydown",(function(t){i._keyDownListener(t)})),this._inputElement.addEventListener("mousedown",(function(){i._mouseDownListener()})),this._isEnabled=e,this._defaultPlaceholderText=n,this._backspaceOrDeleteKeyHandler=null,this._broadcastKeyUpHandler=null,this._blurHandler=null,this._enterKeyHandler=null,this._escapeKeyHandler=null,this._focusHandler=null,this._isBlurEnabled=!0,this._isFocused=!1,this._isKeyUpListnerEnabled=!1,this._isTabKeyDownHandled=!1,this._isTabKeyTrggeringBlur=!1,this._mouseDownHandler=null,this._navigationKeyHandler=null,this._searchTextChangedHandler=null,this._tabbedAwayHandler=null,this._tabbingAwayHandler=null,this._fillerText="------"}return Object.defineProperty(t.prototype,"broadcastKeyUpHandler",{set:function(t){this._broadcastKeyUpHandler=t,this._isKeyUpListnerEnabled||this._addKeyUpListener()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isBlurEnabled",{get:function(){return this._isBlurEnabled},set:function(t){this._isBlurEnabled=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isEnabled",{get:function(){return this._isEnabled},set:function(t){this._isEnabled!==t&&(this._isEnabled=t,this._isEnabled?(this._inputElement.removeAttribute("disabled"),this._searchBoxElement.classList.remove("Disabled")):(this._inputElement.setAttribute("disabled","true"),this._searchBoxElement.classList.add("Disabled")))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"placeholderText",{set:function(t){this._placeholderElement.textContent=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"searchText",{get:function(){return this._inputElement.value!==this._fillerText?this._inputElement.value:""},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tabbedAwayHandler",{set:function(t){this._tabbedAwayHandler=t,this._isKeyUpListnerEnabled||this._addKeyUpListener()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tabbingAwayHandler",{set:function(t){this._tabbingAwayHandler=t},enumerable:!1,configurable:!0}),t.prototype.blur=function(){this._inputElement.blur(),this._isFocused=!1},t.prototype.clearFillerText=function(){this._inputElement.value=""},t.prototype.clearSearchText=function(){this._inputElement.value=""},t.prototype.focus=function(){this._inputElement.focus(),this._isFocused=!0},t.prototype.focusWithEvent=function(){this.focus(),this._raiseFocusEvent()},t.prototype.hidePlaceholderText=function(){this._placeholderElement.classList.add("Inactive")},t.prototype.initialize=function(t,e,n,i,o,a,r,s){this._searchTextChangedHandler=t,this._focusHandler=e,this._blurHandler=n,this._enterKeyHandler=i,this._escapeKeyHandler=o,this._navigationKeyHandler=a,this._backspaceOrDeleteKeyHandler=r,this._mouseDownHandler=s},t.prototype.resetPlaceholderText=function(){this._placeholderElement.textContent=this._defaultPlaceholderText},t.prototype.setFillerText=function(){this._inputElement.value=this._fillerText,this._isFocused&&this._inputElement.select()},t.prototype.showPlaceholderText=function(){this._placeholderElement.classList.remove("Inactive")},t.prototype._blurListener=function(t){this._isBlurEnabled?(this._isFocused=!1,this._raiseBlurEvent(this._isTabKeyTrggeringBlur),this._isTabKeyTrggeringBlur=!1,this._isTabKeyDownHandled=!1):(t.preventDefault(),this._inputElement.focus())},t.prototype._focusListener=function(){this._isFocused=!0,this._raiseFocusEvent()},t.prototype._inputListener=function(){this._raiseSearchTextChangedEvent(this._inputElement.value)},t.prototype._keyDownListener=function(t){if(AutotaskDomSystem.KeyCode.isDelete(t.keyCode)||AutotaskDomSystem.KeyCode.isBackspace(t.keyCode))this._raiseBackspaceOrDeleteKeyEvent();else if(AutotaskDomSystem.KeyCode.isTab(t.keyCode))this._isTabKeyTrggeringBlur=!0,this._isTabKeyDownHandled=!0,this._raiseTabbingAwayEvent(t.shiftKey,(function(){t.preventDefault()}));else if(AutotaskDomSystem.KeyCode.isEnter(t.keyCode))this._raiseEnterKeyEvent();else if(AutotaskDomSystem.KeyCode.isEscape(t.keyCode)){t.preventDefault();this._raiseEscapeKeyEvent((function(){t.preventDefault()}),(function(){t.stopPropagation()}))}else AutotaskDomSystem.KeyCode.isDown(t.keyCode)||AutotaskDomSystem.KeyCode.isUp(t.keyCode)?(t.preventDefault(),this._raiseNavigationKeyEvent(t.keyCode)):(AutotaskDomSystem.KeyCode.isLeft(t.keyCode)||AutotaskDomSystem.KeyCode.isRight(t.keyCode))&&this._raiseNavigationKeyEvent(t.keyCode)},t.prototype._keyUpListener=function(t){AutotaskDomSystem.KeyCode.isEscape(t.which)?this._raiseBroadcastKeyUpEvent(t.which):AutotaskDomSystem.KeyCode.isTab(t.which)&&this._isTabKeyDownHandled&&(this._isTabKeyDownHandled=!1,this._raiseTabbedAwayEvent(t.shiftKey))},t.prototype._mouseDownListener=function(){this._raiseMouseDownEvent()},t.prototype._raiseBackspaceOrDeleteKeyEvent=function(){null!==this._backspaceOrDeleteKeyHandler&&this._backspaceOrDeleteKeyHandler()},t.prototype._raiseBroadcastKeyUpEvent=function(t){null!==this._broadcastKeyUpHandler&&this._broadcastKeyUpHandler(t)},t.prototype._raiseBlurEvent=function(t){null!==this._blurHandler&&this._blurHandler(t)},t.prototype._raiseEnterKeyEvent=function(){null!==this._enterKeyHandler&&this._enterKeyHandler()},t.prototype._raiseEscapeKeyEvent=function(t,e){null!==this._escapeKeyHandler&&this._escapeKeyHandler(t,e)},t.prototype._raiseFocusEvent=function(){null!==this._focusHandler&&this._focusHandler()},t.prototype._raiseMouseDownEvent=function(){null!==this._mouseDownHandler&&this._mouseDownHandler()},t.prototype._raiseNavigationKeyEvent=function(t){null!==this._navigationKeyHandler&&this._navigationKeyHandler(t)},t.prototype._raiseSearchTextChangedEvent=function(t){null!==this._searchTextChangedHandler&&this._searchTextChangedHandler(t)},t.prototype._raiseTabbedAwayEvent=function(t){null!==this._tabbedAwayHandler&&this._tabbedAwayHandler(t)},t.prototype._raiseTabbingAwayEvent=function(t,e){null!==this._tabbingAwayHandler&&this._tabbingAwayHandler(t,e)},t.prototype._addKeyUpListener=function(){var t=this;this._inputElement.addEventListener("keyup",(function(e){t._keyUpListener(e)})),this._isKeyUpListnerEnabled=!0},t}();t.SearchBox=e}(AutotaskSingleDataSelector||(AutotaskSingleDataSelector={})),function(t){var e=function(t){function e(e,n){var i=t.call(this,e)||this;return i._chipInformation=n,i}return __extends(e,t),Object.defineProperty(e.prototype,"chipInformation",{get:function(){return this._chipInformation},enumerable:!1,configurable:!0}),e}(Autotask.LifecycleObject);t.SingleDataSelection=e}(AutotaskSingleDataSelector||(AutotaskSingleDataSelector={})),function(t){var e=function(e){function n(n,i,o,a,r,s,l,u,c,d,h,_,p,m,f,y){var g=e.call(this,n)||this;g._editorElement=AutotaskDomSystem.Document.getElementById(n);var v=g._editorElement;return g._isEnabled=i,g._isLocked=o,g._isBrowseOnly=a,g._bindingPropertyName=l,g._searchBox=u,g._chipList=c,g._dialogButtonId=m,g._dialogCoordinator=f,g._singleDataSelectorValidation=y,g._applyFiltersHandlers=[],g._broadcastKeyUpHandlers=[],g._changeHandlers=[],g._dialogButton=null,g._dirtyStateChangeHandlers=[],g._immediateChangeHandlers=[],g._invalidCssClass="Invalid",g._isDirty=!1,g._isValidationFrequencyElevated=!1,g._isValidationOverdue=!0,g._isValidationOverlayDismissed=!1,g._originalValue=g._chipList.value,g._tabbedAwayHandlers=[],g._tabbingAwayHandlers=[],g._value=g._originalValue,g._valueWhenFocused=null,g._dropDownCoordinator=new t.DropDownCoordinator(h,v),null!==g._dropDownCoordinator.itemSet&&null!==g._value&&g._dropDownCoordinator.itemSet.selectItemByValue(g._value),g._autoCompleteCoordinator=new t.AutoCompleteCoordinator(_,p,v,(function(t){return g._applyFiltersHandler(t)})),null!==d&&c.enableContextOverlay(d),g._userInteractionCoordinator=new t.UserInteractionCoordinator(u,c,g._dropDownCoordinator,g._autoCompleteCoordinator,(function(t){g._valueChangedHandler(t)}),(function(){g._focusHandler()}),(function(){g._focusLostHandler()}),(function(){g._openDialog()}),a),g._singleDataSelectorValidation.addValidationCorrectedHandler((function(){g._validationCorrected()})),g._singleDataSelectorValidation.addValidationFailedHandler((function(){g._validationFailed()})),g._chipList.addAllowedConcurrentlyVisibleOverlay(h),null!==r&&g._changeHandlers.push(r),null!==s&&g._immediateChangeHandlers.push(s),g}return __extends(n,e),Object.defineProperty(n.prototype,"isBrowseOnly",{get:function(){return this._isBrowseOnly},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isDirty",{get:function(){return this._isDirty},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isEnabled",{get:function(){return this._isEnabled},set:function(t){t!==this._isEnabled&&(this._isEnabled=t,this._searchBox.isEnabled=t,this._chipList.isEnabled=t,this._dialogButton.isEnabled=t,t?(this._editorElement.classList.remove("Disabled"),this._isValidationFrequencyElevated&&this._validate(!1)):(this._editorElement.classList.add("Disabled"),this._isValidationOverdue=!this._singleDataSelectorValidation.validationResult.isValid,this._singleDataSelectorValidation.resetValidationResult(this._editorElement)))},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isLocked",{get:function(){return this._isLocked},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"participantValidation",{get:function(){return this._singleDataSelectorValidation},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"value",{get:function(){return this._value},enumerable:!1,configurable:!0}),n.prototype.addApplyFiltersHandler=function(t){this._applyFiltersHandlers.push(t)},n.prototype.addBroadcastKeyUpHandler=function(t){var e=this;this._broadcastKeyUpHandlers.push(t),this._searchBox.broadcastKeyUpHandler=function(t){e._broadcastKeyUpHandler(t)}},n.prototype.addChangeHandler=function(t){this._changeHandlers.push(t)},n.prototype.addDirtyStateChangeHandler=function(t){this._dirtyStateChangeHandlers.push(t)},n.prototype.addImmediateChangeHandler=function(t){this._immediateChangeHandlers.push(t)},n.prototype.addTabbedAwayHandler=function(t){var e=this;this._tabbedAwayHandlers.push(t),this._searchBox.tabbedAwayHandler=function(t){e._tabbedAwayHandler(t)}},n.prototype.addTabbingAwayHandler=function(t){var e=this;this._tabbingAwayHandlers.push(t),this._searchBox.tabbingAwayHandler=function(t,n){e._searchBoxTabbingAwayHandler(t,n)},this._dialogButton.addTabbingAwayHandler((function(t){e._dialogButtonTabbingAwayHandler(t)}))},n.prototype.applyItemSetHtml=function(t,e){this._searchBox.resetPlaceholderText(),this._dropDownCoordinator.applyItemSetHtml(t,e),this._isLocked&&this._unlock(),this._isBrowseOnly&&(this._isBrowseOnly=!1,this._userInteractionCoordinator.isBrowseOnly=!1,this.isEnabled=!0,this._editorElement.classList.remove("BrowseOnly"),this._searchBox.isEnabled=!0),null!==this._dropDownCoordinator.itemSet&&null!==this._value&&this._dropDownCoordinator.itemSet.selectItemByValue(this._value)},n.prototype.clearValue=function(){this.setSelection(null)},n.prototype.getSelectChipInformation=function(){return this._chipList.chipInformation},n.prototype.createRequestData=function(){var t=null;return null!==this._bindingPropertyName&&((this._isEnabled||this._isBrowseOnly)&&null!==this._value?t=this._value.__createRequestData(this._bindingPropertyName):(t={})[this._bindingPropertyName]=null),t},n.prototype.enableBrowseOnlyState=function(t){this._searchBox.placeholderText=t,this._isLocked?this._unlock():this._isEnabled||(this.isEnabled=!0),this._isBrowseOnly||(this._isBrowseOnly=!0,this._userInteractionCoordinator.isBrowseOnly=!0,this._editorElement.classList.add("BrowseOnly"),this._searchBox.isEnabled=!1,this._chipList.isEnabled=!0)},n.prototype.enableLockedState=function(t){this._searchBox.placeholderText=t,this._isBrowseOnly&&(this._isBrowseOnly=!1,this._userInteractionCoordinator.isBrowseOnly=!1,this._editorElement.classList.remove("BrowseOnly")),this._isLocked||this._lock()},n.prototype.focus=function(){this._searchBox.isFocused||(this._valueWhenFocused=this._chipList.value,this._searchBox.isBlurEnabled=!0,this._searchBox.focus(),this._chipList.focus(),this._editorElement.classList.add("Focused"))},n.prototype.focusEnd=function(){this._dialogButton.focus()},n.prototype.focusStart=function(){this.focus()},n.prototype.getSelection=function(){return this._chipList.chipInformation},n.prototype.getSelectionTextByValue=function(t){return this._chipList.getTextByValue(t)},n.prototype.populate=function(t,e,n){var i=this;t.sendPopulateRequest(e,(function(t,e,o,a,r,s){i._populateResponseHandler(t,e,o,a,r,s,n)}))},n.prototype.removeFocus=function(){this._searchBox.blur(),this._chipList.blur()},n.prototype.resetValidation=function(){this._isValidationOverdue=!0},n.prototype.setSelection=function(t){var e=null!==t?t.value:null;AutotaskItemSelectionSystem.ItemValueComparer.equals(e,this._value)||(this._searchBox.clearSearchText(),this._searchBox.hidePlaceholderText(),null!==this._value&&(this._chipList.chipInformation=null,this._isLocked||null===this._dropDownCoordinator.itemSet||this._dropDownCoordinator.itemSet.unselectItemByValue(this._value)),null!==e?(this._chipList.chipInformation=t,this._isLocked||null===this._dropDownCoordinator.itemSet||this._dropDownCoordinator.itemSet.selectItemByValue(e)):this._searchBox.showPlaceholderText(),this._value=this._chipList.value,this._manageDirtyState(this._value)&&this._raiseDirtyStateChangeEvent(this._isDirty),this._isValidationOverdue=!0,this._isValidationFrequencyElevated&&this._validate(!1))},n.prototype.showDialog=function(){this.isEnabled&&!this.isLocked||autotask.throwException('The "showDialog" method on Autotask.SingleDataSelector should not be called when the selector is disabled or locked.'),this._openDialog()},n.prototype.validate=function(){return this._validate(!1)},n.prototype.__initialize=function(){var t=this;this._dialogButton=autotask.find(this._dialogButtonId);var e=new AutotaskButtonSystem.ClickEventHandler((function(){t._dialogButtonClickHandler()}));this._dialogButton.addEventHandler(e),this._singleDataSelectorValidation.initialize()},n.prototype._applyFiltersHandler=function(t){for(var e=0,n=this._applyFiltersHandlers;e<n.length;e++){(0,n[e])(t)}},n.prototype._broadcastKeyUpHandler=function(t){this._raiseBroadcastKeyUpEvent(t)},n.prototype._dialogButtonClickHandler=function(){this._openDialog()},n.prototype._dialogButtonTabbingAwayHandler=function(t){t.isShiftKeyPressed?this.focus():this._raiseTabbingAwayEvent(t.isShiftKeyPressed,(function(){t.cancel()}))},n.prototype._dialogSelectionHandler=function(t){if(!AutotaskItemSelectionSystem.ItemValueComparer.equals(this._value,t.chipInformation.value)){var e=this._value;this._chipList.clear(),this._chipList.chipInformation=t.chipInformation,null!==this._dropDownCoordinator.itemSet&&(this._dropDownCoordinator.itemSet.containsItem(t.chipInformation.value)&&this._dropDownCoordinator.itemSet.selectItemByValue(t.chipInformation.value),null!==e&&this._dropDownCoordinator.itemSet.containsItem(e)&&this._dropDownCoordinator.itemSet.unselectItemByValue(e)),this._value=this._chipList.value;var n=this._manageDirtyState(this._value);this._raiseImmediateChangeEvent(e,this._value),n&&this._raiseDirtyStateChangeEvent(this._isDirty),this._raiseChangeEvent(),this._isValidationOverdue=!0,this._validate(!1)}},n.prototype._focusHandler=function(){this._valueWhenFocused=this._chipList.value,this._editorElement.classList.add("Focused"),this._chipList.focus(),this._isValidationOverlayDismissed||!this._isValidationFrequencyElevated||this._singleDataSelectorValidation.validationResult.isValid||this._showValidationOverlay()},n.prototype._focusLostHandler=function(){this._editorElement.classList.remove("Focused"),this._chipList.blur(),AutotaskItemSelectionSystem.ItemValueComparer.equals(this._value,this._valueWhenFocused)||(this._raiseChangeEvent(),this._valueWhenFocused=null)},n.prototype._lock=function(){this._isLocked||(this._dropDownCoordinator.clearItemSet(),this.isEnabled=!1,this._isLocked=!0,this._editorElement.classList.add("Locked"))},n.prototype._manageDirtyState=function(t){var e=!1;return this._isDirty&&!AutotaskItemSelectionSystem.ItemValueComparer.equals(t,this._originalValue)||(this._isDirty=!this._isDirty,e=!0),e},n.prototype._openDialog=function(){var t=this,e=new AutotaskDataSelector.ApplyFiltersEventArgs;this._applyFiltersHandler(e),this._searchBox.blur(),this._chipList.blur(),this._dialogCoordinator.showDialog(e.data,(function(e){t._dialogSelectionHandler(e)}))},n.prototype._populateResponseHandler=function(t,e,n,i,o,a,r){t?this.enableLockedState(n):e?this.enableBrowseOnlyState(n):null!==o&&null!==a&&this.applyItemSetHtml(o,a),this.setSelection(i),null!==r&&r()},n.prototype._raiseBroadcastKeyUpEvent=function(t){if(this._broadcastKeyUpHandlers.length>0)for(var e=new AutotaskEditorSystem.BroadcastKeyUpEventArgs(this.id,t),n=0,i=this._broadcastKeyUpHandlers;n<i.length;n++){(0,i[n])(e)}},n.prototype._raiseChangeEvent=function(){if(this._changeHandlers.length>0)for(var e=new t.ChangeEventArgs(this),n=0,i=this._changeHandlers;n<i.length;n++){(0,i[n])(e)}},n.prototype._raiseDirtyStateChangeEvent=function(t){if(this._dirtyStateChangeHandlers.length>0)for(var e=new AutotaskDirtyStateSystem.DirtyStateChangeEventArgs(t),n=0,i=this._dirtyStateChangeHandlers;n<i.length;n++){(0,i[n])(e)}},n.prototype._raiseImmediateChangeEvent=function(e,n){if(this._immediateChangeHandlers.length>0)for(var i=new t.ImmediateChangeEventArgs(this,e,n),o=0,a=this._immediateChangeHandlers;o<a.length;o++){(0,a[o])(i)}},n.prototype._raiseTabbedAwayEvent=function(t){if(this._tabbedAwayHandlers.length>0)for(var e=new AutotaskEditorSystem.TabbedAwayEventArgs(this.id,t,!0),n=0,i=this._tabbedAwayHandlers;n<i.length;n++){(0,i[n])(e)}},n.prototype._raiseTabbingAwayEvent=function(t,e){if(this._tabbingAwayHandlers.length>0)for(var n=new AutotaskEditorSystem.TabbingAwayEventArgs(this.id,t,e),i=0,o=this._tabbingAwayHandlers;i<o.length;i++){(0,o[i])(n)}},n.prototype._searchBoxTabbingAwayHandler=function(t,e){t?this._raiseTabbingAwayEvent(t,e):this._dialogButton.focus()},n.prototype._showValidationOverlay=function(){var t=this;autotask.globalValidationOverlay.show(this._editorElement,this.id,this._singleDataSelectorValidation.validationResult.message,!0,(function(){t._validationOverlayClosed()}),null)},n.prototype._tabbedAwayHandler=function(t){this._raiseTabbedAwayEvent(t)},n.prototype._unlock=function(){this._isLocked=!1,this._editorElement.classList.remove("Locked"),this.isEnabled=!0},n.prototype._validate=function(t){var e=this._singleDataSelectorValidation.validationResult.isValid;return this._isValidationOverdue&&this._isEnabled&&(e=this._singleDataSelectorValidation.validate(this._value,t,this._editorElement)),e?autotask.globalValidationOverlay.hide(this.id):this._showValidationOverlay(),e},n.prototype._validationCorrected=function(){this._editorElement.classList.remove(this._invalidCssClass)},n.prototype._validationFailed=function(){this._editorElement.classList.add(this._invalidCssClass),this._isValidationFrequencyElevated=!0},n.prototype._validationOverlayClosed=function(){this._isValidationOverlayDismissed=!0},n.prototype._valueChangedHandler=function(t){if(!AutotaskItemSelectionSystem.ItemValueComparer.equals(this._value,t)){var e=this._value;this._value=t;var n=this._manageDirtyState(this._value);this._raiseImmediateChangeEvent(e,this._value),n&&this._raiseDirtyStateChangeEvent(this._isDirty),this._isValidationOverdue=!0,this._validate(!1)}},n}(AutotaskEditorSystem.Editor);t.SingleDataSelector=e}(AutotaskSingleDataSelector||(AutotaskSingleDataSelector={})),function(t){var e=function(t){function e(e,n){var i=t.call(this,e)||this;return i._requiredValidatorProvider=n,i._requiredValidator=null,i}return __extends(e,t),Object.defineProperty(e.prototype,"_isRequired",{get:function(){return null!==this._requiredValidator},enumerable:!1,configurable:!0}),e.prototype.initialize=function(){var t=this;null!==this._requiredValidatorProvider&&(this._requiredValidatorProvider.initialize(),this._requiredValidatorProvider.addRequiredStateChangedHandler((function(){t._requiredStateChanged()})),this._requiredValidator=this._requiredValidatorProvider.createValidator())},e.prototype.resetValidationResult=function(t){this._updateValidationResult(new AutotaskEditorSystem.ValidResult,!1,t,!1)},e.prototype.validate=function(t,e,n){var i=new AutotaskEditorSystem.ValidResult;return null!==this._requiredValidator&&(i=this._requiredValidator.validate(t)),this._updateValidationResult(i,e,n,!1),i.isValid},e.prototype._requiredStateChanged=function(){var t=this._requiredValidatorProvider;this._requiredValidator=t.createValidator(),this._raiseRequiredStateChanged()},e}(AutotaskEditorSystem.EditorValidation);t.SingleDataSelectorValidation=e}(AutotaskSingleDataSelector||(AutotaskSingleDataSelector={})),function(t){var e=function(t){function e(e,n,i,o){var a=t.call(this,e,i,o)||this;return a._backingEditorId=n,a._backingSingleDataSelectorEditor=void 0,a}return __extends(e,t),Object.defineProperty(e.prototype,"isDirty",{get:function(){return this._backingEditor.isDirty},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isEnabled",{get:function(){return this._backingEditor.isEnabled},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"participantValidation",{get:function(){return this._backingEditor.participantValidation},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_backingEditor",{get:function(){return void 0===this._backingSingleDataSelectorEditor?autotask.throwException("_backingSingleDataSelectorEditor is undefined."):this._backingSingleDataSelectorEditor},enumerable:!1,configurable:!0}),e.prototype.addTabbingAwayHandler=function(t){var e=this;this._backingEditor.addTabbingAwayHandler((function(n){t(new AutotaskEditorSystem.TabbingAwayEventArgs(e.id,n.isShiftKeyPressed,(function(){n.cancel()})))}))},e.prototype.createRequestData=function(){return this._createRequestData(this._backingEditor,"9",!this._backingEditor.isEnabled&&!this._backingEditor.isBrowseOnly)},e.prototype.focus=function(){this._backingEditor.focus()},e.prototype.focusEnd=function(){this._backingEditor.focusEnd()},e.prototype.focusStart=function(){this._backingEditor.focusStart()},e.prototype.resetValidation=function(){this._backingEditor.resetValidation()},e.prototype.validate=function(){return this._backingEditor.validate()},e.prototype.__initialize=function(){this._backingSingleDataSelectorEditor=autotask.find(this._backingEditorId)},e}(AutotaskEditorSystem.UserDefinedField);t.UserDefinedField=e}(AutotaskSingleDataSelector||(AutotaskSingleDataSelector={})),function(t){var e=function(){function t(t,e,n,i,o,a,r,s,l){var u=this;this._searchBox=t,this._chipList=e,this._dropDownCoordinator=n,this._autoCompleteCoordinator=i,this._valueChangedHandler=o,this._focusHandler=a,this._focusLostHandler=r,this._openDialogDelegate=s,this._isBrowseOnly=l,this._searchBox.initialize((function(t){u._searchBoxTextChangedHandler(t)}),(function(){u._searchBoxFocusHandler()}),(function(t){u._searchBoxBlurHandler(t)}),(function(){u._searchBoxEnterKeyHandler()}),(function(t,e){u._searchBoxEscapeKeyHandler(t,e)}),(function(t){u._searchBoxNavigationKeyHandler(t)}),(function(){u._searchBoxBackspaceOrDeleteKeyHandler()}),(function(){u._searchBoxMouseDownHandler()})),this._chipList.addChipRemovedHandler((function(t){u._chipListChipRemovedHandler(t)})),this._chipList.addFocusHandler((function(){u._chipListFocusHandler()})),this._chipList.setMouseDownHandler((function(){u._chipListMouseDownHandler()})),this._dropDownCoordinator.setItemClickHandler((function(t){u._dropDownOverlayItemClickedHandler(t)})),this._dropDownCoordinator.setOverlayHideCompletedHandler((function(){u._dropDownOverlayHideCompletedHandler()})),this._dropDownCoordinator.setOverlayMouseDownHandler((function(){u._overlayMouseDownHandler()})),this._dropDownCoordinator.setOverlayMouseLeaveHandler((function(){u._overlayMouseLeaveHandler()})),this._autoCompleteCoordinator.setItemClickHandler((function(t){u._autoCompleteOverlayItemClickedHandler(t)})),this._autoCompleteCoordinator.setOverlayHideCompletedHandler((function(){u._autoCompleteOverlayHideCompletedHandler()})),this._autoCompleteCoordinator.setOverlayMouseDownHandler((function(){u._overlayMouseDownHandler()})),this._autoCompleteCoordinator.setOverlayMouseLeaveHandler((function(){u._overlayMouseLeaveHandler()})),this._openDialogItemId="73FBBD97-3449-4bb8-BE17-2450B411EF9D",this._cachedChipInformation=null}return Object.defineProperty(t.prototype,"isBrowseOnly",{set:function(t){this._isBrowseOnly=t},enumerable:!1,configurable:!0}),t.prototype.applyItemSetHtml=function(t,e){this._dropDownCoordinator.applyItemSetHtml(t,e)},t.prototype._applyEnterKeyToAutoCompleteOverlay=function(){this._searchBox.clearSearchText(),this._cachedChipInformation=null;var t=this._autoCompleteCoordinator.itemSet;if(null!==t){var e=t.getTargetedItemValue();t.isTargetedItemSelected?null!==e&&(this._chipList.clear(),t.unselectTargetedItem(),null!==this._dropDownCoordinator.itemSet&&this._dropDownCoordinator.itemSet.unselectItemByValue(e),this._searchBox.showPlaceholderText(),this._searchBox.clearFillerText()):null!==e&&(t.selectTargetedItem(),null!==this._dropDownCoordinator.itemSet&&this._dropDownCoordinator.itemSet.selectItemByValue(e),this._searchBox.hidePlaceholderText(),this._chipList.chipInformation=t.createChipInformationForTargetedItem())}this._valueChangedHandler(this._chipList.value),this._autoCompleteCoordinator.hideOverlay()},t.prototype._applyEnterKeyToDropDownOverlay=function(){var t=this._dropDownCoordinator.itemSet;if(null!==t){var e=t.getTargetedItemValue();null!==e&&e.get_primaryValue()===this._openDialogItemId?this._openDialogDelegate():(t.isTargetedItemSelected?(t.unselectTargetedItem(),this._chipList.clear(),this._searchBox.clearFillerText(),this._searchBox.showPlaceholderText()):(t.selectTargetedItem(),this._searchBox.hidePlaceholderText(),this._chipList.clear(),this._chipList.chipInformation=t.createChipInformationForTargetedItem(),this._searchBox.setFillerText()),this._valueChangedHandler(this._chipList.value)),this._dropDownCoordinator.hideOverlay()}},t.prototype._autoCompleteOverlayHideCompletedHandler=function(){this._searchBox.isBlurEnabled=!0},t.prototype._autoCompleteOverlayItemClickedHandler=function(t){this._autoCompleteCoordinator.hideOverlay(),this._searchBox.clearSearchText(),this._cachedChipInformation=null,this._chipList.clear(),t.isSelected?(t.unselect(),null!==this._dropDownCoordinator.itemSet&&this._dropDownCoordinator.itemSet.unselectItemByValue(t.itemValue),this._searchBox.showPlaceholderText(),this._searchBox.clearFillerText()):(t.select(),null!==this._dropDownCoordinator.itemSet&&this._dropDownCoordinator.itemSet.selectItemByValue(t.itemValue),this._searchBox.hidePlaceholderText(),this._chipList.chipInformation=t.createChipInformation()),this._valueChangedHandler(this._chipList.value)},t.prototype._chipListChipRemovedHandler=function(t){this._searchBox.clearFillerText(),this._searchBox.isFocused||this._searchBox.focusWithEvent(),null!==this._dropDownCoordinator.itemSet&&this._dropDownCoordinator.itemSet.unselectItemByValue(t.value),this._searchBox.showPlaceholderText(),this._valueChangedHandler(this._chipList.value)},t.prototype._chipListFocusHandler=function(){this._dropDownCoordinator.isOverlayVisible||this._isBrowseOnly||this._dropDownCoordinator.showOverlay()},t.prototype._chipListMouseDownHandler=function(){this._searchBox.isFocused||this._isBrowseOnly||this._searchBox.focusWithEvent()},t.prototype._dropDownOverlayItemClickedHandler=function(t){this._dropDownCoordinator.hideOverlay(),t.itemValue.get_primaryValue()===this._openDialogItemId?this._openDialogDelegate():(t.isSelected?(t.unselect(),this._chipList.clear(),this._searchBox.clearFillerText(),this._searchBox.showPlaceholderText()):(t.select(),this._searchBox.hidePlaceholderText(),this._chipList.chipInformation=t.createChipInformation()),this._valueChangedHandler(this._chipList.value))},t.prototype._dropDownOverlayHideCompletedHandler=function(){this._searchBox.isBlurEnabled=!0,this._dropDownCoordinator.itemSet.enableMouseOverTargeting()},t.prototype._overlayMouseDownHandler=function(){this._searchBox.isBlurEnabled=!1},t.prototype._overlayMouseLeaveHandler=function(){this._searchBox.isBlurEnabled=!0},t.prototype._searchBoxBackspaceOrDeleteKeyHandler=function(){if(null!==this._chipList.value&&0===this._searchBox.searchText.length){var t=this._chipList.value;this._chipList.clear(),null!==this._dropDownCoordinator.itemSet&&this._dropDownCoordinator.itemSet.containsItem(t)&&this._dropDownCoordinator.itemSet.unselectItemByValue(t),this._searchBox.showPlaceholderText(),this._valueChangedHandler(this._chipList.value)}},t.prototype._searchBoxBlurHandler=function(t){var e=!1,n=this._autoCompleteCoordinator.isSearchInProgress;if(this._searchBox.searchText.length>0&&this._autoCompleteCoordinator.cancelAutoComplete(),this._autoCompleteCoordinator.isOverlayVisible&&(n&&(e=!0),e||t||(e=!0)),this._dropDownCoordinator.isOverlayVisible&&null!==this._dropDownCoordinator.itemSet){var i=this._dropDownCoordinator.itemSet.getTargetedItemValue();null!==i&&i.get_primaryValue()===this._openDialogItemId&&(e=!0)}e||this._dropDownCoordinator.isOverlayVisible||this._autoCompleteCoordinator.isOverlayVisible||(e=!0),e&&(null!==this._cachedChipInformation?(this._chipList.chipInformation=this._cachedChipInformation,this._cachedChipInformation=null):null===this._chipList.value&&this._searchBox.showPlaceholderText()),this._dropDownCoordinator.isOverlayVisible?(t&&this._applyEnterKeyToDropDownOverlay(),this._dropDownCoordinator.hideOverlay()):this._autoCompleteCoordinator.isOverlayVisible&&(t&&!n&&this._applyEnterKeyToAutoCompleteOverlay(),this._autoCompleteCoordinator.hideOverlay()),this._searchBox.searchText.length>0&&this._searchBox.clearSearchText(),this._focusLostHandler()},t.prototype._searchBoxEnterKeyHandler=function(){this._dropDownCoordinator.isOverlayVisible?this._applyEnterKeyToDropDownOverlay():this._autoCompleteCoordinator.isOverlayVisible?this._applyEnterKeyToAutoCompleteOverlay():this._dropDownCoordinator.showOverlay()},t.prototype._searchBoxEscapeKeyHandler=function(t,e){this._searchBox.searchText.length>0?(this._searchBox.clearSearchText(),null!==this._cachedChipInformation?this._chipList.chipInformation=this._cachedChipInformation:this._searchBox.showPlaceholderText(),this._autoCompleteCoordinator.isOverlayVisible&&this._autoCompleteCoordinator.hideOverlay()):this._dropDownCoordinator.isOverlayVisible&&this._dropDownCoordinator.hideOverlay()},t.prototype._searchBoxFocusHandler=function(){this._focusHandler()},t.prototype._searchBoxMouseDownHandler=function(){0!==this._searchBox.searchText.length||this._dropDownCoordinator.isOverlayVisible||this._dropDownCoordinator.showOverlay()},t.prototype._searchBoxNavigationKeyHandler=function(t){this._autoCompleteCoordinator.isOverlayVisible&&null!==this._autoCompleteCoordinator.itemSet?AutotaskDomSystem.KeyCode.isDown(t)?this._autoCompleteCoordinator.itemSet.moveTargetDown():AutotaskDomSystem.KeyCode.isUp(t)&&this._autoCompleteCoordinator.itemSet.moveTargetUp():this._dropDownCoordinator.isOverlayVisible?this._dropDownCoordinator.isOverlayVisible&&null!==this._dropDownCoordinator.itemSet&&(AutotaskDomSystem.KeyCode.isDown(t)?this._dropDownCoordinator.itemSet.moveTargetDown():AutotaskDomSystem.KeyCode.isUp(t)&&this._dropDownCoordinator.itemSet.moveTargetUp()):this._dropDownCoordinator.showOverlay()},t.prototype._searchBoxTextChangedHandler=function(t){if(t.length>0){this._dropDownCoordinator.isOverlayVisible&&this._dropDownCoordinator.hideOverlay(),this._searchBox.hidePlaceholderText();var e=this._chipList.value;null!==this._chipList.value&&(this._cachedChipInformation=this._chipList.chipInformation,this._chipList.clear()),this._autoCompleteCoordinator.autoComplete(t,e)}else this._autoCompleteCoordinator.isSearchInProgress&&this._autoCompleteCoordinator.cancelAutoComplete(),this._autoCompleteCoordinator.isOverlayVisible&&this._autoCompleteCoordinator.hideOverlay(),null!==this._cachedChipInformation?this._chipList.chipInformation=this._cachedChipInformation:this._searchBox.showPlaceholderText()},t}();t.UserInteractionCoordinator=e}(AutotaskSingleDataSelector||(AutotaskSingleDataSelector={})),function(t){var e=function(){function t(t){this._editorInstance=t}return Object.defineProperty(t.prototype,"editorInstance",{get:function(){return this._editorInstance},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"instanceId",{get:function(){return this._editorInstance.id},enumerable:!1,configurable:!0}),t}();t.ChangeEventArgs=e}(AutotaskSingleItemSelector||(AutotaskSingleItemSelector={})),function(t){var e=function(){function t(t,e){var n=this;this._isEnabled=e,t.addEventListener("mousedown",(function(t){n._mouseDownListener(t)})),this._mouseDownHandler=null}return Object.defineProperty(t.prototype,"isEnabled",{get:function(){return this._isEnabled},set:function(t){this._isEnabled=t},enumerable:!1,configurable:!0}),t.prototype.initialize=function(t){this._mouseDownHandler=t},t.prototype._mouseDownListener=function(t){this._isEnabled&&null!==this._mouseDownHandler&&(t.stopImmediatePropagation(),t.preventDefault(),this._mouseDownHandler())},t}();t.DropDownButton=e}(AutotaskSingleItemSelector||(AutotaskSingleItemSelector={})),function(t){var e=function(){function t(t,e){this._overlay=t,this._overlayLaunchingElement=e,this._isImplicitHide=!0,this._overlayHideHandler=null}return Object.defineProperty(t.prototype,"isOverlayVisible",{get:function(){return this._overlay.isVisible},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"itemSet",{get:function(){return this._overlay.itemSet},enumerable:!1,configurable:!0}),t.prototype.applyItemSetHtml=function(t,e){this._overlay.applyItemSetHtml(t,e)},t.prototype.clearItemSet=function(){this._overlay.clearItemSet()},t.prototype.hideOverlay=function(){this._isImplicitHide=!1,this._overlay.__hideWithoutDelay()},t.prototype.setItemClickHandler=function(t){this._overlay.setItemClickHandler(t)},t.prototype.setItemTargetedHandler=function(t){this._overlay.setItemTargetedHandler(t)},t.prototype.setOverlayHideCompletedHandler=function(t){var e=this;this._overlayHideHandler=t,this._overlay.setHideCompletedHandler((function(){e._overlayHideCompletedHandler()}))},t.prototype.setOverlayMouseDownHandler=function(t){this._overlay.setMouseDownHandler(t)},t.prototype.setOverlayMouseLeaveHandler=function(t){this._overlay.setMouseDownHandler(t)},t.prototype.setOverlayShowCompletedHandler=function(t){this._overlay.setShowCompletedHandler(t)},t.prototype.setOverlayShowingHandler=function(t){this._overlay.setShowingHandler(t)},t.prototype.showOverlay=function(){this._overlay.show(this._overlayLaunchingElement)},t.prototype._overlayHideCompletedHandler=function(){null!==this._overlayHideHandler&&this._overlayHideHandler(this._isImplicitHide),this._isImplicitHide=!0},t}();t.DropDownCoordinator=e}(AutotaskSingleItemSelector||(AutotaskSingleItemSelector={})),function(t){var e=function(e){function n(t,n){var i=e.call(this,t,!1)||this,o=AutotaskDomSystem.Document.getElementById(t).firstElementChild;return i._contentElement=o.firstElementChild,i._defaultStyleCoordinator=new AutotaskOverlaySystem.DefaultStyleCoordinator(i._overlayElementStyleApplicator),i._itemSet=null,i._itemClickHandler=null,i._itemTargetedHandler=null,i._mouseDownHandler=null,i._mouseLeaveHandler=null,i._scrollCoordinator=new AutotaskEditorSystem.ItemOverlayScrollCoordinator(i),i._contentElement.addEventListener("mousedown",(function(t){i._mouseDownListener(t)})),i._contentElement.addEventListener("mouseleave",(function(){i._mouseLeaveListener()})),i._contentElement.addEventListener("wheel",(function(t){i._mouseWheelListener(t)})),i._itemSet=null,null!==i._contentElement.firstElementChild&&null!==n&&i._intitalizeItemSet(i._contentElement.firstElementChild,n),i}return __extends(n,e),Object.defineProperty(n.prototype,"contentHeight",{get:function(){return this._contentElement.clientHeight},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"contentScrollTop",{get:function(){return this._contentElement.scrollTop},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"itemSet",{get:function(){return this._itemSet},enumerable:!1,configurable:!0}),n.prototype.applyItemSetHtml=function(t,e){if(this.clearItemSet(),null!==t&&null!==e){this._contentElement.insertAdjacentHTML("beforeend",t);var n=AutotaskDomSystem.Document.getChildElementByClassName(this._contentElement,"ItemSet");this._intitalizeItemSet(n,e)}},n.prototype.applySize=function(t){this._contentElement.style.minHeight=t.minimumHeightValue.toString()+"px",this._contentElement.style.maxHeight=(t.maximumHeightValue-6).toString()+"px",this._contentElement.style.minWidth=t.minimumWidthValue.toString()+"px",this._contentElement.style.maxWidth=t.maximumWidthValue.toString()+"px"},n.prototype.clearItemSet=function(){if(null!==this._itemSet){var t=this._contentElement.getElementsByClassName("ItemSet");t.length>0&&(this._contentElement.removeChild(t[0]),this._itemSet.dispose(),this._itemSet=null)}},n.prototype.scrollContent=function(t){this._contentElement.scrollTop=t},n.prototype.setHideCompletedHandler=function(t){this.addHideCompletedHandler(t)},n.prototype.setItemClickHandler=function(t){this._itemClickHandler=t},n.prototype.setItemTargetedHandler=function(t){this._itemTargetedHandler=t},n.prototype.setMouseDownHandler=function(t){this._mouseDownHandler=t},n.prototype.setMouseLeaveHandler=function(t){this._mouseLeaveHandler=t},n.prototype.setShowCompletedHandler=function(t){this.addShowCompletedHandler(t)},n.prototype.setShowingHandler=function(t){this.addShowingHandler(t)},n.prototype.show=function(t){this._clearSizeStyles(),this._show(t)},Object.defineProperty(n.prototype,"_delayBeforeHiding",{get:function(){return 0},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"_delayBeforeShowing",{get:function(){return 0},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"_styleCoordinator",{get:function(){return this._defaultStyleCoordinator},enumerable:!1,configurable:!0}),n.prototype._createPositionCoordinator=function(t){var e=this._calculateMinimumHeight(),i=n._contentMaxHeight,o=new AutotaskEditorSystem.DropDownOverlayPositionCoordinator(e,i,this),a=new AutotaskPositionApplicatorSystem.Default(this._defaultStyleCoordinator,t,null,null);o.addPositionAndApplicator(new AutotaskEditorSystem.DropDownOverlayBottomAlignedLeftPosition(0,-1),a);var r=new AutotaskPositionApplicatorSystem.Default(this._defaultStyleCoordinator,t,null,"Top");return o.addPositionAndApplicator(new AutotaskEditorSystem.DropDownOverlayTopAlignedLeftPosition(0,1),r),o},n.prototype._calculateMinimumHeight=function(){var t=n._defaultContentMinHeight;if(null!==this._itemSet){var e=this._itemSet.itemCount;e>0&&e<6&&(t=this._itemSet.itemCount*this._itemSet.itemDisplayHeight)}return t},n.prototype._clearSizeStyles=function(){this._contentElement.style.minHeight="",this._contentElement.style.maxHeight="",this._contentElement.style.minWidth="",this._contentElement.style.maxWidth=""},n.prototype._intitalizeItemSet=function(e,n){var i=this;this._itemSet=new t.ItemSet(e,n,this._scrollCoordinator),this._itemSet.targetFirstItem(),this._itemSet.setItemClickHandler((function(t){i._itemSetItemClickHandler(t)})),this._itemSet.setItemTargetedHandler((function(t){i._itemSetItemTargetedHandler(t)}))},n.prototype._itemSetItemClickHandler=function(t){null!==this._itemClickHandler&&this._itemClickHandler(t)},n.prototype._itemSetItemTargetedHandler=function(t){null!==this._itemTargetedHandler&&this._itemTargetedHandler(t)},n.prototype._mouseDownListener=function(t){t.preventDefault(),null!==this._mouseDownHandler&&this._mouseDownHandler()},n.prototype._mouseLeaveListener=function(){null!==this._mouseLeaveHandler&&this._mouseLeaveHandler()},n.prototype._mouseWheelListener=function(t){var e=this._contentElement.scrollTop,n=this._contentElement.scrollHeight,i=this._contentElement.clientHeight;!1===(t.deltaY<0?e>0:e+i<n)&&t.preventDefault()},n._contentMaxHeight=364,n._defaultContentMinHeight=106,n}(AutotaskOverlaySystem.ContextOverlay);t.DropDownOverlay=e}(AutotaskSingleItemSelector||(AutotaskSingleItemSelector={})),function(t){var e=function(){function t(t,e,n){this._editorInstance=t,this._previousValue=e,this._currentValue=n}return Object.defineProperty(t.prototype,"currentValue",{get:function(){return this._currentValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"editorInstance",{get:function(){return this._editorInstance},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"previousValue",{get:function(){return this._previousValue},enumerable:!1,configurable:!0}),t}();t.ImmediateChangeEventArgs=e}(AutotaskSingleItemSelector||(AutotaskSingleItemSelector={})),function(t){var e=function(t){function e(e,n){var i=t.call(this,e)||this;return i._value=n,i}return __extends(e,t),Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!1,configurable:!0}),e}(Autotask.LifecycleObject);t.ItemSelection=e}(AutotaskSingleItemSelector||(AutotaskSingleItemSelector={})),function(t){var e=function(){function t(t,e){var n=this;this._searchBoxElement=AutotaskDomSystem.Document.getElementById(t),this._inputElement=this._searchBoxElement.children[0],this._inputElement.addEventListener("blur",(function(t){n._blurListener(t)})),this._inputElement.addEventListener("focus",(function(){n._focusListener()})),this._inputElement.addEventListener("input",(function(){n._inputListener()})),this._inputElement.addEventListener("keydown",(function(t){n._keyDownListener(t)})),this._isEnabled=e,this._broadcastKeyUpHandler=null,this._blurHandler=null,this._enterKeyHandler=null,this._escapeKeyHandler=null,this._focusHandler=null,this._isBlurEnabled=!0,this._isFocused=!1,this._isKeyUpListnerEnabled=!1,this._isTabKeyDownHandled=!1,this._isTabKeyTrggeringBlur=!1,this._navigationKeyHandler=null,this._searchTextChangedHandler=null,this._tabbedAwayHandler=null,this._tabbingAwayHandler=null}return Object.defineProperty(t.prototype,"broadcastKeyUpHandler",{set:function(t){this._broadcastKeyUpHandler=t,this._isKeyUpListnerEnabled||this._addKeyUpListener()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isBlurEnabled",{get:function(){return this._isBlurEnabled},set:function(t){this._isBlurEnabled=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isEnabled",{get:function(){return this._isEnabled},set:function(t){this._isEnabled!==t&&(this._isEnabled=t,this._isEnabled?(this._inputElement.removeAttribute("disabled"),this._searchBoxElement.classList.remove("Disabled")):(this._inputElement.setAttribute("disabled","true"),this._searchBoxElement.classList.add("Disabled")))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"searchText",{get:function(){return this._inputElement.value},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tabbedAwayHandler",{set:function(t){this._tabbedAwayHandler=t,this._isKeyUpListnerEnabled||this._addKeyUpListener()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tabbingAwayHandler",{set:function(t){this._tabbingAwayHandler=t},enumerable:!1,configurable:!0}),t.prototype.blur=function(){this._inputElement.blur(),this._isFocused=!1},t.prototype.clearSearchText=function(){this._inputElement.value=""},t.prototype.focus=function(){this._inputElement.focus(),this._isFocused=!0},t.prototype.focusWithEvent=function(){this.focus(),this._raiseFocusEvent()},t.prototype.initialize=function(t,e,n,i,o,a){this._searchTextChangedHandler=t,this._focusHandler=e,this._blurHandler=n,this._enterKeyHandler=i,this._escapeKeyHandler=o,this._navigationKeyHandler=a},t.prototype._blurListener=function(t){this._isBlurEnabled?(this._isFocused=!1,this._raiseBlurEvent(this._isTabKeyTrggeringBlur),this._isTabKeyTrggeringBlur=!1,this._isTabKeyDownHandled=!1):(t.preventDefault(),this._inputElement.focus())},t.prototype._focusListener=function(){this._isFocused=!0,this._raiseFocusEvent()},t.prototype._inputListener=function(){this._raiseSearchTextChangedEvent(this._inputElement.value)},t.prototype._keyDownListener=function(t){if(AutotaskDomSystem.KeyCode.isDelete(t.keyCode)||AutotaskDomSystem.KeyCode.isBackspace(t.keyCode));else if(AutotaskDomSystem.KeyCode.isTab(t.keyCode))this._isTabKeyTrggeringBlur=!0,this._isTabKeyDownHandled=!0,this._raiseTabbingAwayEvent(t.shiftKey,(function(){t.preventDefault()}));else if(AutotaskDomSystem.KeyCode.isEnter(t.keyCode))this._raiseEnterKeyEvent();else if(AutotaskDomSystem.KeyCode.isEscape(t.keyCode)){t.preventDefault();this._raiseEscapeKeyEvent((function(){t.preventDefault()}),(function(){t.stopPropagation()}))}else(AutotaskDomSystem.KeyCode.isDown(t.keyCode)||AutotaskDomSystem.KeyCode.isUp(t.keyCode))&&(t.preventDefault(),this._raiseNavigationKeyEvent(t.keyCode))},t.prototype._keyUpListener=function(t){AutotaskDomSystem.KeyCode.isEscape(t.which)?this._raiseBroadcastKeyUpEvent(t.which):AutotaskDomSystem.KeyCode.isTab(t.which)&&this._isTabKeyDownHandled&&(this._isTabKeyDownHandled=!1,this._raiseTabbedAwayEvent(t.shiftKey))},t.prototype._raiseBroadcastKeyUpEvent=function(t){null!==this._broadcastKeyUpHandler&&this._broadcastKeyUpHandler(t)},t.prototype._raiseBlurEvent=function(t){null!==this._blurHandler&&this._blurHandler(t)},t.prototype._raiseEnterKeyEvent=function(){null!==this._enterKeyHandler&&this._enterKeyHandler()},t.prototype._raiseEscapeKeyEvent=function(t,e){null!==this._escapeKeyHandler&&this._escapeKeyHandler(t,e)},t.prototype._raiseFocusEvent=function(){null!==this._focusHandler&&this._focusHandler()},t.prototype._raiseNavigationKeyEvent=function(t){null!==this._navigationKeyHandler&&this._navigationKeyHandler(t)},t.prototype._raiseSearchTextChangedEvent=function(t){null!==this._searchTextChangedHandler&&this._searchTextChangedHandler(t)},t.prototype._raiseTabbedAwayEvent=function(t){null!==this._tabbedAwayHandler&&this._tabbedAwayHandler(t)},t.prototype._raiseTabbingAwayEvent=function(t,e){null!==this._tabbingAwayHandler&&this._tabbingAwayHandler(t,e)},t.prototype._addKeyUpListener=function(){var t=this;this._inputElement.addEventListener("keyup",(function(e){t._keyUpListener(e)})),this._isKeyUpListnerEnabled=!0},t}();t.SearchBox=e}(AutotaskSingleItemSelector||(AutotaskSingleItemSelector={})),function(t){var e=function(){function t(t,e,n){var i=this;this._selectionElement=t,this._previewElement=e,this._isEnabled=n,this._selectionElement.addEventListener("mousedown",(function(t){i._mouseDownListener(t)})),this._mouseDownHandler=null}return Object.defineProperty(t.prototype,"isEnabled",{get:function(){return this._isEnabled},set:function(t){this._isEnabled=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isPreviewShowing",{get:function(){return null!==this._previewElement.textContent&&this._previewElement.textContent.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"previewText",{get:function(){return null!==this._previewElement.textContent?this._previewElement.textContent:""},set:function(t){this._previewElement.textContent=t},enumerable:!1,configurable:!0}),t.prototype.hideSelection=function(){this._selectionElement.classList.add("Hidden")},t.prototype.setMouseDownHandler=function(t){this._mouseDownHandler=t},t.prototype.setSelectionElement=function(t){"string"==typeof t?this._selectionElement.innerHTML=t:null!==this._selectionElement.firstElementChild&&this._selectionElement.replaceChild(t,this._selectionElement.firstElementChild)},t.prototype.showSelection=function(){this._selectionElement.classList.remove("Hidden")},t.prototype._mouseDownListener=function(t){this._isEnabled&&null!==this._mouseDownHandler&&(t.stopImmediatePropagation(),t.preventDefault(),this._mouseDownHandler())},t}();t.SelectionDisplay=e}(AutotaskSingleItemSelector||(AutotaskSingleItemSelector={})),function(t){var e=function(e){function n(n,i,o,a,r,s,l,u,c,d){var h=e.call(this,n)||this;h._isEnabled=o,h._isLocked=a,h._bindingPropertyName=l,h._searchBox=u,h._itemSelectorValidation=d,h._broadcastKeyUpHandlers=[],h._changeHandlers=[],h._dirtyStateChangeHandlers=[],h._immediateChangeHandlers=[],h._invalidCssClass="Invalid",h._isDirty=!1,h._isValidationFrequencyElevated=!1,h._isValidationOverdue=!0,h._isValidationOverlayDismissed=!1,h._originalValue=i,h._tabbedAwayHandlers=[],h._tabbingAwayHandlers=[],h._value=h._originalValue,h._editorElement=AutotaskDomSystem.Document.getElementById(n);var _=h._editorElement,p=h._editorElement.children[0],m=p.children[0],f=p.children[1],y=m.children[0],g=m.children[2];return h._dropDownButton=new t.DropDownButton(f,o&&!a),h._dropDownCoordinator=new t.DropDownCoordinator(c,_),null!==h._dropDownCoordinator.itemSet&&null!==h._value&&h._dropDownCoordinator.itemSet.selectAndTargetByValue(h._value),h._selectionDisplay=new t.SelectionDisplay(g,y,o&&!a),h._userInteractionCoordinator=new t.UserInteractionCoordinator(u,h._selectionDisplay,h._dropDownButton,h._dropDownCoordinator,(function(t){h._valueChangedHandler(t)}),(function(){h._focusHandler()}),(function(){h._focusLostHandler()})),h._itemSelectorValidation.addValidationCorrectedHandler((function(){h._validationCorrected()})),h._itemSelectorValidation.addValidationFailedHandler((function(){h._validationFailed()})),null!==r&&h._changeHandlers.push(r),null!==s&&h._immediateChangeHandlers.push(s),h}return __extends(n,e),Object.defineProperty(n.prototype,"isDirty",{get:function(){return this._isDirty},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isEnabled",{get:function(){return this._isEnabled},set:function(t){t!==this._isEnabled&&(this._isEnabled=t,this._searchBox.isEnabled=t,this._dropDownButton.isEnabled=t,this._selectionDisplay.isEnabled=t,t?(this._editorElement.classList.remove("Disabled"),this._isValidationFrequencyElevated&&this._validate(!1)):(this._editorElement.classList.add("Disabled"),this._isValidationOverdue=!this._itemSelectorValidation.validationResult.isValid,this._itemSelectorValidation.resetValidationResult(this._editorElement)))},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isLocked",{get:function(){return this._isLocked},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"participantValidation",{get:function(){return this._itemSelectorValidation},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"value",{get:function(){return this._value},set:function(t){this._isLocked&&autotask.throwException("SingleItemSelector does not support setting the value when it is locked.");var e=this._dropDownCoordinator.itemSet;if(null!==e&&e.selectAndTargetByValue(t)){this._dropDownCoordinator.isOverlayVisible&&this._dropDownCoordinator.hideOverlay(),this._selectionDisplay.setSelectionElement(e.getSelectionElementForTargetedItem()),this._selectionDisplay.showSelection();var n=e.getSelectionTextForTargetedItem();null!==n&&(this._selectionDisplay.previewText=n),this._value=t,this._manageDirtyState(this._value)&&this._raiseDirtyStateChangeEvent(this._isDirty),this._isValidationOverdue=!0,this._isValidationFrequencyElevated&&this._validate(!1)}},enumerable:!1,configurable:!0}),n.prototype.addBroadcastKeyUpHandler=function(t){var e=this;this._broadcastKeyUpHandlers.push(t),this._searchBox.broadcastKeyUpHandler=function(t){e._broadcastKeyUpHandler(t)}},n.prototype.addChangeHandler=function(t){this._changeHandlers.push(t)},n.prototype.addDirtyStateChangeHandler=function(t){this._dirtyStateChangeHandlers.push(t)},n.prototype.addImmediateChangeHandler=function(t){this._immediateChangeHandlers.push(t)},n.prototype.addTabbedAwayHandler=function(t){var e=this;this._tabbedAwayHandlers.push(t),this._searchBox.tabbedAwayHandler=function(t){e._tabbedAwayHandler(t)}},n.prototype.addTabbingAwayHandler=function(t){var e=this;this._tabbingAwayHandlers.push(t),this._searchBox.tabbingAwayHandler=function(t,n){e._tabbingAwayHandler(t,n)}},n.prototype.applyItemSetHtml=function(t,e,n){this._dropDownCoordinator.applyItemSetHtml(t,e),this._isLocked&&this._unlock(),this.value=n},n.prototype.clearValue=function(){null!==this._dropDownCoordinator.itemSet&&this._dropDownCoordinator.itemSet.containsDefaultItem&&(this.value=null)},n.prototype.createRequestData=function(){var t=null;return null!==this._bindingPropertyName&&(this._isEnabled&&null!==this._value?t=this._value.__createRequestData(this._bindingPropertyName):(t={})[this._bindingPropertyName]=null,t[this._bindingPropertyName.concat(AutotaskRequestDataSystem.RequestData.TypeCodeSuffix)]=AutotaskRequestDataSystem.TypeCode.ItemValue),t},n.prototype.enableLockedState=function(t){this._isLocked||(this.value=null,this.isEnabled=!1,this._isLocked=!0,this._dropDownCoordinator.clearItemSet(),this._editorElement.classList.add("Locked"),this._selectionDisplay.setSelectionElement(t))},n.prototype.focus=function(){this._searchBox.isFocused||(this._searchBox.isBlurEnabled=!0,this._searchBox.focus(),this._editorElement.classList.add("Focused"))},n.prototype.focusEnd=function(){this.focus()},n.prototype.focusStart=function(){this.focus()},n.prototype.populate=function(t,e,n){var i=this;t.sendPopulateRequest(e,(function(t,e,o,a){i._populateResponseHandler(t,e,o,a,n)}))},n.prototype.populateResponseHandler=function(t,e,n,i,o){this._populateResponseHandler(t,e,n,i,o)},n.prototype.removeFocus=function(){this._searchBox.blur()},n.prototype.resetValidation=function(){this._isValidationOverdue=!0},n.prototype.resetValue=function(){this.value=this._originalValue},n.prototype.validate=function(){return this._validate(!1)},n.prototype.__initialize=function(){this._userInteractionCoordinator.initialize(),null!==this._dropDownCoordinator.itemSet&&this._dropDownCoordinator.itemSet.selectAndTargetByValue(this._value),this._itemSelectorValidation.initialize()},n.prototype._broadcastKeyUpHandler=function(t){this._raiseBroadcastKeyUpEvent(t)},n.prototype._focusHandler=function(){this._editorElement.classList.add("Focused"),this._isValidationOverlayDismissed||!this._isValidationFrequencyElevated||this._itemSelectorValidation.validationResult.isValid||this._showValidationOverlay()},n.prototype._focusLostHandler=function(){this._editorElement.classList.remove("Focused")},n.prototype._manageDirtyState=function(t){var e=!1;return this._isDirty&&!AutotaskItemSelectionSystem.ItemValueComparer.equals(t,this._originalValue)||(this._isDirty=!this._isDirty,e=!0),e},n.prototype._populateResponseHandler=function(t,e,n,i,o){null!==t?this.applyItemSetHtml(t,i,n):null!==e&&this.enableLockedState(e),null!==o&&o()},n.prototype._raiseBroadcastKeyUpEvent=function(t){if(this._broadcastKeyUpHandlers.length>0)for(var e=new AutotaskEditorSystem.BroadcastKeyUpEventArgs(this.id,t),n=0,i=this._broadcastKeyUpHandlers;n<i.length;n++){(0,i[n])(e)}},n.prototype._raiseDirtyStateChangeEvent=function(t){if(this._dirtyStateChangeHandlers.length>0)for(var e=new AutotaskDirtyStateSystem.DirtyStateChangeEventArgs(t),n=0,i=this._dirtyStateChangeHandlers;n<i.length;n++){(0,i[n])(e)}},n.prototype._raiseChangeEvents=function(e,n){if(this._immediateChangeHandlers.length>0)for(var i=new t.ImmediateChangeEventArgs(this,e,n),o=0,a=this._immediateChangeHandlers;o<a.length;o++){(0,a[o])(i)}if(this._changeHandlers.length>0){i=new t.ChangeEventArgs(this);for(var r=0,s=this._changeHandlers;r<s.length;r++){(0,s[r])(i)}}},n.prototype._raiseTabbedAwayEvent=function(t){if(this._tabbedAwayHandlers.length>0)for(var e=new AutotaskEditorSystem.TabbedAwayEventArgs(this.id,t,!0),n=0,i=this._tabbedAwayHandlers;n<i.length;n++){(0,i[n])(e)}},n.prototype._raiseTabbingAwayEvent=function(t,e){if(this._tabbingAwayHandlers.length>0)for(var n=new AutotaskEditorSystem.TabbingAwayEventArgs(this.id,t,e),i=0,o=this._tabbingAwayHandlers;i<o.length;i++){(0,o[i])(n)}},n.prototype._showValidationOverlay=function(){var t=this;autotask.globalValidationOverlay.show(this._editorElement,this.id,this._itemSelectorValidation.validationResult.message,!0,(function(){t._validationOverlayClosed()}),null)},n.prototype._tabbedAwayHandler=function(t){this._raiseTabbedAwayEvent(t)},n.prototype._tabbingAwayHandler=function(t,e){this._raiseTabbingAwayEvent(t,e)},n.prototype._unlock=function(){this._isLocked=!1,this._editorElement.classList.remove("Locked"),this.isEnabled=!0},n.prototype._validate=function(t){var e=this._itemSelectorValidation.validationResult.isValid;return this._isValidationOverdue&&this._isEnabled&&(e=this._itemSelectorValidation.validate(this._value,t,this._editorElement)),e?autotask.globalValidationOverlay.hide(this.id):this._showValidationOverlay(),e},n.prototype._validationCorrected=function(){this._editorElement.classList.remove(this._invalidCssClass)},n.prototype._validationFailed=function(){this._editorElement.classList.add(this._invalidCssClass),this._isValidationFrequencyElevated=!0},n.prototype._validationOverlayClosed=function(){this._isValidationOverlayDismissed=!0},n.prototype._valueChangedHandler=function(t){if(!AutotaskItemSelectionSystem.ItemValueComparer.equals(this._value,t)){var e=this._value;this._value=t;var n=this._manageDirtyState(this._value);this._raiseChangeEvents(e,this._value),n&&this._raiseDirtyStateChangeEvent(this._isDirty),this._isValidationOverdue=!0,this._validate(!1)}},n}(AutotaskEditorSystem.Editor);t.SingleItemSelector=e}(AutotaskSingleItemSelector||(AutotaskSingleItemSelector={})),function(t){var e=function(t){function e(e,n){var i=t.call(this,e)||this;return i._requiredValidatorProvider=n,i._requiredValidator=null,i}return __extends(e,t),Object.defineProperty(e.prototype,"_isRequired",{get:function(){return null!==this._requiredValidator},enumerable:!1,configurable:!0}),e.prototype.initialize=function(){var t=this;null!==this._requiredValidatorProvider&&(this._requiredValidatorProvider.initialize(),this._requiredValidatorProvider.addRequiredStateChangedHandler((function(){t._requiredStateChanged()})),this._requiredValidator=this._requiredValidatorProvider.createValidator())},e.prototype.resetValidationResult=function(t){this._updateValidationResult(new AutotaskEditorSystem.ValidResult,!1,t,!1)},e.prototype.validate=function(t,e,n){var i=new AutotaskEditorSystem.ValidResult;return null!==this._requiredValidator&&(i=this._requiredValidator.validate(t)),this._updateValidationResult(i,e,n,!1),i.isValid},e.prototype._requiredStateChanged=function(){var t=this._requiredValidatorProvider;this._requiredValidator=t.createValidator(),this._raiseRequiredStateChanged()},e}(AutotaskEditorSystem.EditorValidation);t.SingleItemSelectorValidation=e}(AutotaskSingleItemSelector||(AutotaskSingleItemSelector={})),function(t){var e=function(){function t(t,e,n,i,o,a,r){var s=this;this._searchBox=t,this._selectionDisplay=e,this._dropDownButton=n,this._dropDownCoordinator=i,this._valueChangedHandler=o,this._focusHandler=a,this._focusLostHandler=r,this._searchBox.initialize((function(t){s._searchBoxTextChangedHandler(t)}),(function(){s._searchBoxFocusHandler()}),(function(t){s._searchBoxBlurHandler(t)}),(function(){s._searchBoxEnterKeyHandler()}),(function(t,e){s._searchBoxEscapeKeyHandler(t,e)}),(function(t){s._searchBoxNavigationKeyHandler(t)})),this._dropDownCoordinator.setItemClickHandler((function(t){s._dropDownOverlayItemClickedHandler(t)})),this._dropDownCoordinator.setItemTargetedHandler((function(t){s._dropDownOverlayItemTargetedHandler(t)})),this._dropDownCoordinator.setOverlayHideCompletedHandler((function(t){s._dropDownOverlayHideCompletedHandler(t)})),this._dropDownCoordinator.setOverlayMouseDownHandler((function(){s._dropDownOverlayMouseDownHandler()})),this._dropDownCoordinator.setOverlayMouseLeaveHandler((function(){s._dropDownOverlayMouseLeaveHandler()})),this._dropDownCoordinator.setOverlayShowingHandler((function(){s._dropDownOverlayShowingHandler()})),this._dropDownCoordinator.setOverlayShowCompletedHandler((function(){s._dropDownOverlayShowCompletedHandler()})),this._dropDownButton.initialize((function(){s._dropDownButtonMouseDownHandler()})),this._selectionDisplay.setMouseDownHandler((function(){s._selectionDisplayMouseDownHandler()}))}return t.prototype.applyItemSetHtml=function(t,e){this._dropDownCoordinator.applyItemSetHtml(t,e)},t.prototype.initialize=function(){},t.prototype._applyEnterKeyToDropDownOverlay=function(){var t=this._dropDownCoordinator.itemSet;null!==t&&(t.selectTargetedItem(),this._resetForDisplayMode(),this._selectionDisplay.setSelectionElement(t.getSelectionElementForTargetedItem()),this._valueChangedHandler(t.getTargetedItemValue()))},t.prototype._dropDownButtonMouseDownHandler=function(){this._dropDownCoordinator.isOverlayVisible?(this._dropDownCoordinator.hideOverlay(),this._resetForDisplayMode()):(this._dropDownCoordinator.showOverlay(),this._searchBox.isFocused||this._searchBox.focusWithEvent())},t.prototype._dropDownOverlayHideCompletedHandler=function(t){t&&this._resetForDisplayMode(),this._dropDownCoordinator.itemSet.enableMouseOverTargeting()},t.prototype._dropDownOverlayItemClickedHandler=function(t){this._dropDownCoordinator.hideOverlay(),t.isSelected?this._resetForDisplayMode():(t.select(),this._resetForDisplayMode(),this._selectionDisplay.setSelectionElement(t.selectionElement),this._valueChangedHandler(t.itemValue))},t.prototype._dropDownOverlayItemTargetedHandler=function(t){0===this._searchBox.searchText.length&&(this._selectionDisplay.previewText=t.item.selectionText)},t.prototype._dropDownOverlayMouseDownHandler=function(){this._searchBox.isBlurEnabled=!1},t.prototype._dropDownOverlayMouseLeaveHandler=function(){this._searchBox.isBlurEnabled=!0},t.prototype._dropDownOverlayShowCompletedHandler=function(){null!==this._dropDownCoordinator.itemSet&&this._dropDownCoordinator.itemSet.scrollToTargetedItem()},t.prototype._dropDownOverlayShowingHandler=function(){this._selectionDisplay.hideSelection()},t.prototype._resetForDisplayMode=function(){if(this._searchBox.isBlurEnabled=!0,this._searchBox.clearSearchText(),null!==this._dropDownCoordinator.itemSet){this._dropDownCoordinator.itemSet.clearHighlighting(),this._dropDownCoordinator.itemSet.targetSelectedItem();var t=this._dropDownCoordinator.itemSet.getSelectionTextForTargetedItem();null!==t&&(this._selectionDisplay.previewText=t)}this._selectionDisplay.showSelection()},t.prototype._searchBoxBlurHandler=function(t){this._dropDownCoordinator.isOverlayVisible&&(this._dropDownCoordinator.hideOverlay(),t?this._applyEnterKeyToDropDownOverlay():this._resetForDisplayMode()),this._searchBox.searchText.length>0&&this._searchBox.clearSearchText(),this._focusLostHandler()},t.prototype._searchBoxEnterKeyHandler=function(){this._dropDownCoordinator.isOverlayVisible?(this._dropDownCoordinator.hideOverlay(),this._applyEnterKeyToDropDownOverlay()):this._dropDownCoordinator.showOverlay()},t.prototype._searchBoxEscapeKeyHandler=function(t,e){this._dropDownCoordinator.isOverlayVisible&&(this._dropDownCoordinator.hideOverlay(),this._resetForDisplayMode()),this._searchBox.searchText.length>0&&this._searchBox.clearSearchText()},t.prototype._searchBoxFocusHandler=function(){this._focusHandler()},t.prototype._searchBoxNavigationKeyHandler=function(t){this._dropDownCoordinator.isOverlayVisible?this._dropDownCoordinator.isOverlayVisible&&null!==this._dropDownCoordinator.itemSet&&(AutotaskDomSystem.KeyCode.isDown(t)?this._dropDownCoordinator.itemSet.moveTargetDown():AutotaskDomSystem.KeyCode.isUp(t)&&this._dropDownCoordinator.itemSet.moveTargetUp()):this._dropDownCoordinator.showOverlay()},t.prototype._searchBoxTextChangedHandler=function(t){if(0!==t.length||this._selectionDisplay.isPreviewShowing)t.length>0&&this._selectionDisplay.isPreviewShowing&&(this._selectionDisplay.previewText="");else if(null!==this._dropDownCoordinator.itemSet){var e=this._dropDownCoordinator.itemSet.getSelectionTextForTargetedItem();this._selectionDisplay.previewText=null!==e?e:""}this._dropDownCoordinator.isOverlayVisible||this._dropDownCoordinator.showOverlay(),null!==this._dropDownCoordinator.itemSet&&this._dropDownCoordinator.itemSet.search(t)},t.prototype._selectionDisplayMouseDownHandler=function(){this._dropDownCoordinator.showOverlay(),this._searchBox.isFocused||this._searchBox.focusWithEvent()},t}();t.UserInteractionCoordinator=e}(AutotaskSingleItemSelector||(AutotaskSingleItemSelector={})),function(t){var e=function(){function e(t,e,n){var i=this;this._itemElement=t,this._clickDelegate=e,this._mouseOverDelegate=n,this._isSelected=!1,this._selectionText=this._itemElement.textContent,this._itemElement.addEventListener("click",(function(){i._itemClickListener()})),this._itemElement.addEventListener("mouseover",(function(){i._itemMouseOverListener()}))}return Object.defineProperty(e.prototype,"displayHeight",{get:function(){return this._itemElement.clientHeight},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"offsetTop",{get:function(){return this._itemElement.offsetTop},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"selectionElement",{get:function(){return t.Item.createSelectionElement(this._itemElement)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"selectionText",{get:function(){return this._selectionText},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return null},enumerable:!1,configurable:!0}),e.prototype.clearHighlighting=function(){},e.prototype.dispose=function(){this._clickDelegate=null,this._mouseOverDelegate=null},e.prototype.performAdditiveSearch=function(t,e,n){return!1},e.prototype.performNewSearch=function(t,e){return!1},e.prototype.performSubtractiveSearch=function(t,e){return!1},e.prototype.removeTargeting=function(){this._itemElement.setAttribute("data-is-targeted","false")},e.prototype.select=function(){this._isSelected||(this._itemElement.setAttribute("data-is-selected","true"),this._isSelected=!0)},e.prototype.target=function(){this._itemElement.setAttribute("data-is-targeted","true")},e.prototype.unselect=function(){this._isSelected&&(this._itemElement.setAttribute("data-is-selected","false"),this._isSelected=!1)},e.prototype._itemClickListener=function(){if(null!==this._clickDelegate){var t=parseInt(this._itemElement.dataset.index,10);this._clickDelegate(t)}},e.prototype._itemMouseOverListener=function(){if(null!==this._mouseOverDelegate){var t=parseInt(this._itemElement.dataset.index,10);this._mouseOverDelegate(t)}},e}();t.DefaultItem=e}(AutotaskSingleItemSelector||(AutotaskSingleItemSelector={})),function(t){var e=function(){function e(){}return e.prototype.create=function(e,n,i){return new t.DefaultItem(e,n,i)},e}();t.DefaultItemCreator=e}(AutotaskSingleItemSelector||(AutotaskSingleItemSelector={})),function(t){!function(t){t.createSelectionElement=function(t){for(var e=t.cloneNode(!0),n=e.attributes.length-1;n>=0;n--){var i=e.attributes[n];i.name.startsWith("data-")&&"data-item-type"!==i.name&&e.removeAttribute(i.name)}return e}}(t.Item||(t.Item={}))}(AutotaskSingleItemSelector||(AutotaskSingleItemSelector={})),function(t){var e=function(){function t(t,e,n){this._item=t,this._selectDelegate=e,this._unselectDelegate=n}return Object.defineProperty(t.prototype,"isSelected",{get:function(){return this._item.isSelected},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"itemValue",{get:function(){return this._item.value},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"selectionElement",{get:function(){return this._item.selectionElement},enumerable:!1,configurable:!0}),t.prototype.select=function(){this._selectDelegate()},t.prototype.unselect=function(){this._unselectDelegate()},t}();t.ItemClickEventArgs=e}(AutotaskSingleItemSelector||(AutotaskSingleItemSelector={})),function(t){var e=function(t){function e(e,n){var i=t.call(this,e)||this;return i._itemCreators=n,i}return __extends(e,t),Object.defineProperty(e.prototype,"itemCreators",{get:function(){return this._itemCreators},enumerable:!1,configurable:!0}),e}(Autotask.LifecycleObject);t.ItemCreatorContainer=e}(AutotaskSingleItemSelector||(AutotaskSingleItemSelector={})),function(t){var e=function(){function e(e,n,i){var o=this;this._itemListElement=e,this._items=this._createItems(e,n),this._targetCoordinator=new t.ItemListTargetCoordinator(this._items,i),this._searchCoordinator=new t.ItemListSearchCoordinator(this._items),this._selectionCoordinator=new t.ItemListSelectionCoordinator(this._items),this._itemClickDelegate=null,this._isMouseOverTargetingEnabled=!0,this._mouseMoveDelegate=function(t){o._itemListMouseMoveListener(t)},this._mouseMoveInitialPositionX=null,this._mouseMoveInitialPositionY=null}return Object.defineProperty(e.prototype,"containsDefaultItem",{get:function(){var t=!1;return this._items.length>0&&null===this._items[0].value&&(t=!0),t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isTargetedItemSelected",{get:function(){var t=this._targetCoordinator.targetedItemIndex,e=!1;return null!==t&&(e=this._selectionCoordinator.isItemSelected(t)),e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"itemCount",{get:function(){return this._items.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"itemDisplayHeight",{get:function(){return this._items[0].displayHeight},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"itemTargetedHandler",{set:function(t){this._targetCoordinator.itemTargetedHandler=t},enumerable:!1,configurable:!0}),e.prototype.clearHighlighting=function(){this._searchCoordinator.clearHighlighting()},e.prototype.containsItem=function(t){for(var e=!1,n=0,i=this._items;n<i.length;n++){var o=i[n];if(AutotaskItemSelectionSystem.ItemValueComparer.equals(o.value,t)){e=!0;break}}return e},e.prototype.dispose=function(){for(var t=0,e=this._items;t<e.length;t++){e[t].dispose()}this._items.length=0,this._targetCoordinator.dispose()},e.prototype.enableMouseOverTargeting=function(){this._isMouseOverTargetingEnabled||this._enableMouseOverTargeting()},e.prototype.getSelectionElementForTargetedItem=function(){var t=null,e=this._targetCoordinator.targetedItem;return null!==e&&(t=e.selectionElement),t},e.prototype.getSelectionTextForTargetedItem=function(){var t=null,e=this._targetCoordinator.targetedItem;return null!==e&&(t=e.selectionText),t},e.prototype.getTargetedItemValue=function(){var t=null,e=this._targetCoordinator.targetedItem;return null!==e&&(t=e.value),t},e.prototype.moveTargetDown=function(){this._isMouseOverTargetingEnabled&&this._disableMouseOverTargeting(),this._targetCoordinator.moveTargetDown()},e.prototype.moveTargetUp=function(){this._isMouseOverTargetingEnabled&&this._disableMouseOverTargeting(),this._targetCoordinator.moveTargetUp()},e.prototype.search=function(t){var e=this._searchCoordinator.search(t);return null!==e&&this._targetCoordinator.targetItemByIndex(e),null!==e},e.prototype.selectAndTargetByValue=function(t){for(var e=!1,n=0;n<this._items.length;n++)if(AutotaskItemSelectionSystem.ItemValueComparer.equals(this._items[n].value,t)){e=!0,this._selectionCoordinator.selectItemByIndex(n),this._targetCoordinator.targetItemByIndex(n);break}return e},e.prototype.selectItemByIndex=function(t){this._selectionCoordinator.selectItemByIndex(t)},e.prototype.selectItemByValue=function(t){this._selectionCoordinator.selectItemByValue(t)},e.prototype.selectTargetedItem=function(){var t=this._targetCoordinator.targetedItemIndex;null!==t&&(this._selectionCoordinator.selectItemByIndex(t),this._searchCoordinator.clearHighlighting())},e.prototype.setItemClickHandler=function(t){this._itemClickDelegate=t},e.prototype.scrollToTargetedItem=function(){this._targetCoordinator.scrollToTargetedItem()},e.prototype.targetFirstItem=function(){this._targetCoordinator.targetFirstItem()},e.prototype.targetSelectedItem=function(){var t=this._selectionCoordinator.selectedItemIndex;null!==t&&this._targetCoordinator.targetItemByIndex(t)},e.prototype.unselectAllItems=function(){this._selectionCoordinator.unselectAllItems()},e.prototype.unselectItemByIndex=function(t){this._selectionCoordinator.unselectItemByIndex(t)},e.prototype.unselectItemByValue=function(t){this._selectionCoordinator.unselectItemByValue(t)},e.prototype.unselectTargetedItem=function(){var t=this._targetCoordinator.targetedItemIndex;null!==t&&this._selectionCoordinator.unselectItemByIndex(t)},e.prototype._createItems=function(t,e){for(var n=this,i=[],o=t.firstElementChild,a=0;null!==o;){var r=e[a];if(null!==r){var s=r.create(o,(function(t){n._itemClickHandler(t)}),(function(t){n._itemMouseOverHandler(t)}));i.push(s)}a++,o=o.nextElementSibling}return i},e.prototype._enableMouseOverTargeting=function(){this._isMouseOverTargetingEnabled=!0,this._itemListElement.removeEventListener("mousemove",this._mouseMoveDelegate)},e.prototype._disableMouseOverTargeting=function(){this._mouseMoveInitialPositionX=null,this._mouseMoveInitialPositionY=null,this._isMouseOverTargetingEnabled=!1,this._itemListElement.addEventListener("mousemove",this._mouseMoveDelegate)},e.prototype._findItemElement=function(t){var e=null;if(t.classList.contains("Item"))e=t;else for(var n=t.parentElement;null!==n;){if(n.classList.contains("Item")){e=n;break}n=n.parentElement}return e},e.prototype._itemClickHandler=function(t){null!==this._itemClickDelegate&&this._itemClickDelegate(t,this._items[t])},e.prototype._itemListMouseMoveListener=function(t){if(null===this._mouseMoveInitialPositionX&&null===this._mouseMoveInitialPositionY)this._mouseMoveInitialPositionX=t.clientX,this._mouseMoveInitialPositionY=t.clientY;else if(null!==this._mouseMoveInitialPositionX&&null!==this._mouseMoveInitialPositionY&&(this._mouseMoveInitialPositionX-t.clientX!=0||this._mouseMoveInitialPositionY-t.clientY!=0)){this._enableMouseOverTargeting();var e=this._findItemElement(t.srcElement);if(null!==e){var n=parseInt(e.dataset.index,0);this._targetCoordinator.targetItemByIndex(n)}}},e.prototype._itemMouseOverHandler=function(t){this._isMouseOverTargetingEnabled&&this._targetCoordinator.targetItemByIndex(t)},e}();t.ItemList=e}(AutotaskSingleItemSelector||(AutotaskSingleItemSelector={})),function(t){var e=function(){function t(t){this._items=t,this._previousSearchText=null}return t.prototype.clearHighlighting=function(){this._clearHighlighting()},t.prototype.search=function(t){var e=null,n=!1,i=t.length;if(null!==this._previousSearchText&&i>0){var o=this._previousSearchText.length;if(i-1===o){if(t.substring(0,o)===this._previousSearchText){var a=t.charAt(o);e=this._performAdditiveSearch(t,i,a),n=!0}}else i+1===o&&t===this._previousSearchText.substring(0,i)&&(e=this._performSubtractiveSearch(t,i),n=!0);n||(e=this._performNewSearch(t,i)),this._previousSearchText=t}else null!==this._previousSearchText&&0===i?(this._clearHighlighting(),this._previousSearchText=null):(e=this._performNewSearch(t,i),this._previousSearchText=t);return e},t.prototype._clearHighlighting=function(){for(var t=0,e=this._items;t<e.length;t++){e[t].clearHighlighting()}},t.prototype._performAdditiveSearch=function(t,e,n){for(var i=null,o=0;o<this._items.length;o++){this._items[o].performAdditiveSearch(t,e,n)&&null===i&&(i=o)}return i},t.prototype._performNewSearch=function(t,e){for(var n=null,i=0;i<this._items.length;i++){this._items[i].performNewSearch(t,e)&&null===n&&(n=i)}return n},t.prototype._performSubtractiveSearch=function(t,e){for(var n=null,i=0;i<this._items.length;i++){this._items[i].performSubtractiveSearch(t,e)&&null===n&&(n=i)}return n},t}();t.ItemListSearchCoordinator=e}(AutotaskSingleItemSelector||(AutotaskSingleItemSelector={})),function(t){var e=function(){function t(t){this._items=t,this._selectedItemIndex=null}return Object.defineProperty(t.prototype,"selectedItem",{get:function(){var t=null;return null!==this._selectedItemIndex&&(t=this._items[this._selectedItemIndex]),t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"selectedItemIndex",{get:function(){return this._selectedItemIndex},enumerable:!1,configurable:!0}),t.prototype.isItemSelected=function(t){return t===this._selectedItemIndex},t.prototype.selectItemByIndex=function(t){t!==this._selectedItemIndex&&(null!==this._selectedItemIndex&&this._items[this._selectedItemIndex].unselect(),this._items[t].select(),this._selectedItemIndex=t)},t.prototype.selectItemByValue=function(t){for(var e=0;e<this._items.length;e++){var n=this._items[e];if(AutotaskItemSelectionSystem.ItemValueComparer.equals(n.value,t)){this.selectItemByIndex(e);break}}},t.prototype.unselectAllItems=function(){for(var t=0,e=this._items;t<e.length;t++){e[t].unselect()}},t.prototype.unselectItemByIndex=function(t){t===this._selectedItemIndex&&(this._items[this._selectedItemIndex].unselect(),this._selectedItemIndex=null)},t.prototype.unselectItemByValue=function(t){for(var e=0;e<this._items.length;e++){var n=this._items[e];if(AutotaskItemSelectionSystem.ItemValueComparer.equals(n.value,t)){this.unselectItemByIndex(e);break}}},t}();t.ItemListSelectionCoordinator=e}(AutotaskSingleItemSelector||(AutotaskSingleItemSelector={})),function(t){var e=function(){function e(t,e){this._items=t,this._scrollCoordinator=e,this._itemTargetedHandler=null,this._targetedItemIndex=null}return Object.defineProperty(e.prototype,"itemTargetedHandler",{set:function(t){this._itemTargetedHandler=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"targetedItem",{get:function(){var t=null;return null!==this._targetedItemIndex&&(t=this._items[this._targetedItemIndex]),t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"targetedItemIndex",{get:function(){return this._targetedItemIndex},enumerable:!1,configurable:!0}),e.prototype.dispose=function(){this._itemTargetedHandler=null},e.prototype.moveTargetDown=function(){if(null!==this._targetedItemIndex&&this._targetedItemIndex!==this._items.length-1){var t=this._targetedItemIndex+1;this.targetItemByIndex(t);var e=this._items[t];this._scrollCoordinator.scroll(e.displayHeight,e.offsetTop)}},e.prototype.moveTargetUp=function(){if(null!==this._targetedItemIndex&&0!==this._targetedItemIndex){var t=this._targetedItemIndex-1;this.targetItemByIndex(t);var e=this._items[t];this._scrollCoordinator.scroll(e.displayHeight,e.offsetTop)}},e.prototype.removeTargeting=function(){this._removeTargeting()},e.prototype.scrollToTargetedItem=function(){var t=this.targetedItem;null!==t&&this._scrollCoordinator.scroll(t.displayHeight,t.offsetTop)},e.prototype.targetFirstItem=function(){0!==this._items.length&&this.targetItemByIndex(0)},e.prototype.targetItemByIndex=function(t){if(t!==this._targetedItemIndex){this._removeTargeting(),this._items[t].target(),this._targetedItemIndex=t;var e=this._items[this._targetedItemIndex];this._scrollCoordinator.scroll(e.displayHeight,e.offsetTop),this._raiseTargetChangedEvent(this._items[t])}},e.prototype._raiseTargetChangedEvent=function(e){if(null!==this._itemTargetedHandler){var n=new t.ItemTargetedEventArgs(e);this._itemTargetedHandler(n)}},e.prototype._removeTargeting=function(){null!==this._targetedItemIndex&&(this._items[this._targetedItemIndex].removeTargeting(),this._targetedItemIndex=null)},e}();t.ItemListTargetCoordinator=e}(AutotaskSingleItemSelector||(AutotaskSingleItemSelector={})),function(t){var e=function(){function e(e,n,i){var o=this,a=e.firstElementChild;this._itemList=new t.ItemList(a,n,i),this._itemList.setItemClickHandler((function(t,e){o._itemClick(t,e)})),this._itemClickDelegate=null}return Object.defineProperty(e.prototype,"isTargetedItemSelected",{get:function(){return this._itemList.isTargetedItemSelected},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"itemCount",{get:function(){return this._itemList.itemCount},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"itemDisplayHeight",{get:function(){return this._itemList.itemDisplayHeight},enumerable:!1,configurable:!0}),e.prototype.clearHighlighting=function(){this._itemList.clearHighlighting()},Object.defineProperty(e.prototype,"containsDefaultItem",{get:function(){return this._itemList.containsDefaultItem},enumerable:!1,configurable:!0}),e.prototype.containsItem=function(t){return this._itemList.containsItem(t)},e.prototype.dispose=function(){this._itemList.dispose()},e.prototype.enableMouseOverTargeting=function(){this._itemList.enableMouseOverTargeting()},e.prototype.getSelectionElementForTargetedItem=function(){return this._itemList.getSelectionElementForTargetedItem()},e.prototype.getSelectionTextForTargetedItem=function(){return this._itemList.getSelectionTextForTargetedItem()},e.prototype.getTargetedItemValue=function(){return this._itemList.getTargetedItemValue()},e.prototype.moveTargetDown=function(){this._itemList.moveTargetDown()},e.prototype.moveTargetUp=function(){this._itemList.moveTargetUp()},e.prototype.search=function(t){return this._itemList.search(t)},e.prototype.selectAndTargetByValue=function(t){return this._itemList.selectAndTargetByValue(t)},e.prototype.selectItemByValue=function(t){this._itemList.selectItemByValue(t)},e.prototype.selectTargetedItem=function(){this._itemList.selectTargetedItem()},e.prototype.setItemClickHandler=function(t){this._itemClickDelegate=t},e.prototype.setItemTargetedHandler=function(t){this._itemList.itemTargetedHandler=t},e.prototype.scrollToTargetedItem=function(){this._itemList.scrollToTargetedItem()},e.prototype.targetFirstItem=function(){this._itemList.targetFirstItem()},e.prototype.targetSelectedItem=function(){this._itemList.targetSelectedItem()},e.prototype.unselectAllItems=function(){this._itemList.unselectAllItems()},e.prototype.unselectItemByValue=function(t){this._itemList.unselectItemByValue(t)},e.prototype.unselectTargetedItem=function(){this._itemList.unselectTargetedItem()},e.prototype._itemClick=function(e,n){var i=this;if(null!==this._itemClickDelegate){var o=new t.ItemClickEventArgs(n,(function(){i._itemList.selectItemByIndex(e)}),(function(){i._itemList.unselectItemByIndex(e)}));this._itemClickDelegate(o)}},e}();t.ItemSet=e}(AutotaskSingleItemSelector||(AutotaskSingleItemSelector={})),function(t){var e=function(){function t(t){this._item=t}return Object.defineProperty(t.prototype,"item",{get:function(){return this._item},enumerable:!1,configurable:!0}),t}();t.ItemTargetedEventArgs=e}(AutotaskSingleItemSelector||(AutotaskSingleItemSelector={})),function(t){var e=function(){function e(t,e,n,i){var o=this;this._itemElement=t,this._value=e,this._clickDelegate=n,this._mouseOverDelegate=i,this._isHighlighted=!1,this._isSelected=!1,this._itemSearchServices=new AutotaskEditorSystem.ItemSearchServices;var a=t.lastElementChild;this._originalText=this._itemElement.textContent,this._textElement=a.firstChild,this._itemElement.addEventListener("click",(function(){o._itemClickListener()})),this._itemElement.addEventListener("mouseover",(function(){o._itemMouseOverListener()}))}return Object.defineProperty(e.prototype,"displayHeight",{get:function(){return this._itemElement.clientHeight},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"offsetTop",{get:function(){return this._itemElement.offsetTop},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"selectionElement",{get:function(){return t.Item.createSelectionElement(this._itemElement)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"selectionText",{get:function(){return this._originalText},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!1,configurable:!0}),e.prototype.clearHighlighting=function(){if(this._isHighlighted){for(var t=document.createTextNode(this._originalText);null!==this._textElement.firstChild;)this._textElement.removeChild(this._textElement.firstChild);this._textElement.appendChild(t),this._isHighlighted=!1}},e.prototype.dispose=function(){this._clickDelegate=null,this._mouseOverDelegate=null},e.prototype.performAdditiveSearch=function(t,e,n){var i=!1;return this._isHighlighted&&((i=this._itemSearchServices.attemptAdditiveSearchForElement(e,n,this._textElement,this._originalText))||this._clearHighlighting()),i},e.prototype.performNewSearch=function(t,e){var n=this._attemptNewSearchForElement(t,e,this._textElement,this._originalText);return!n&&this._isHighlighted&&this._clearHighlighting(),n},e.prototype.performSubtractiveSearch=function(t,e){var n=!1;return this._isHighlighted?(this._itemSearchServices.highlightSubtractiveSearchForElement(e,this._textElement,this._originalText),n=!0):n=this._attemptNewSearchForElement(t,e,this._textElement,this._originalText),n},e.prototype.removeTargeting=function(){this._itemElement.setAttribute("data-is-targeted","false")},e.prototype.select=function(){this._isSelected||(this._itemElement.setAttribute("data-is-selected","true"),this._isSelected=!0)},e.prototype.target=function(){this._itemElement.setAttribute("data-is-targeted","true")},e.prototype.unselect=function(){this._isSelected&&(this._itemElement.setAttribute("data-is-selected","false"),this._isSelected=!1)},e.prototype._attemptNewSearchForElement=function(t,e,n,i){var o=this._itemSearchServices.attemptNewSearchForElement(t,e,n,i);return o&&(this._isHighlighted=!0),o},e.prototype._clearHighlighting=function(){this._itemSearchServices.clearHighlighting(this._textElement,this._originalText),this._isHighlighted=!1},e.prototype._itemClickListener=function(){if(null!==this._clickDelegate){var t=parseInt(this._itemElement.dataset.index,10);this._clickDelegate(t)}},e.prototype._itemMouseOverListener=function(){if(null!==this._mouseOverDelegate){var t=parseInt(this._itemElement.dataset.index,10);this._mouseOverDelegate(t)}},e}();t.SingleTextItem=e}(AutotaskSingleItemSelector||(AutotaskSingleItemSelector={})),function(t){var e=function(){function e(t){this._itemValue=t}return e.prototype.create=function(e,n,i){return new t.SingleTextItem(e,this._itemValue,n,i)},e}();t.SingleTextItemCreator=e}(AutotaskSingleItemSelector||(AutotaskSingleItemSelector={})),function(t){var e=function(){function t(t){this._editorInstance=t}return Object.defineProperty(t.prototype,"editorInstance",{get:function(){return this._editorInstance},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"instanceId",{get:function(){return this._editorInstance.id},enumerable:!1,configurable:!0}),t}();t.ChangeEventArgs=e}(AutotaskTextArea||(AutotaskTextArea={})),function(t){var e=function(){function t(t,e,n){this._editorInstance=t,this._previousValue=e,this._currentValue=n}return Object.defineProperty(t.prototype,"currentValue",{get:function(){return this._currentValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"editorInstance",{get:function(){return this._editorInstance},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"previousValue",{get:function(){return this._previousValue},enumerable:!1,configurable:!0}),t}();t.ImmediateChangeEventArgs=e}(AutotaskTextArea||(AutotaskTextArea={})),function(t){var e=function(t){function e(e,n,i,o,a,r,s,l){var u=t.call(this,e,o,s)||this;u._backingEditorId=i,u._button=null,u._buttonId=n,u._unmaskRoute=l,u._backingTextAreaEditor=void 0,u._originalValue=null,u._isDirty=!1,u._dirtyStateChangeHandlers=[],u._disposingHandlers=[],u._isEnabled=a,u._hasServerValue=r;var c=AutotaskDomSystem.Document.getElementById(e).children[0];return u._maskElement=AutotaskDomSystem.Document.getChildElementByClassName(c,"Mask"),u}return __extends(e,t),Object.defineProperty(e.prototype,"hasServerValue",{get:function(){return this._hasServerValue},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isDirty",{get:function(){return this._isDirty},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isEnabled",{get:function(){return this._isEnabled},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"participantValidation",{get:function(){return this._backingEditor.participantValidation},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_backingEditor",{get:function(){return void 0===this._backingTextAreaEditor?autotask.throwException("_backingTextAreaEditor is undefined."):this._backingTextAreaEditor},enumerable:!1,configurable:!0}),e.prototype.addDirtyStateChangeHandler=function(t){this._dirtyStateChangeHandlers.push(t)},e.prototype.addDisposingHandler=function(t){this._disposingHandlers.push(t)},e.prototype.createRequestData=function(){return this._createRequestData(this._backingEditor,"6",this.isDirty)},e.prototype.focus=function(){this._backingEditor.focus()},e.prototype.resetValidation=function(){this._backingEditor.resetValidation()},e.prototype.validate=function(){return this._backingEditor.validate()},e.prototype.__dispose=function(){this._raiseDisposingEvent()},e.prototype.__initialize=function(){var t=this;if(this._backingTextAreaEditor=autotask.find(this._backingEditorId),this._backingTextAreaEditor.addBlurHandler((function(){t._backingTextAreaBlurHandler()})),this._backingTextAreaEditor.addImmediateChangeHandler((function(){t._backingTextAreaImmediateChangeHandler()})),null!==this._buttonId){this._button=autotask.find(this._buttonId);var e=new AutotaskButtonSystem.ClickEventHandler((function(){t._buttonClickHandler()}));this._button.addEventHandler(e)}},e.prototype._backingTextAreaImmediateChangeHandler=function(){this._manageDirtyState(this._backingEditor.value)&&this._raiseDirtyStateChangeEvent(this._isDirty)},e.prototype._backingTextAreaBlurHandler=function(){this._isDirty||(this._backingEditor.value=null,this._originalValue=null),this._mask()},e.prototype._buttonClickHandler=function(){var t=this;this._isDirty?this._unmask():this._unmaskRoute.getMaskedStringValue((function(e){return t._unmaskValueSuccessHandler(e)}))},e.prototype._manageDirtyState=function(t){var e=!1;return this._isDirty&&t!==this._originalValue||(this._isDirty=!this._isDirty,e=!0),e},e.prototype._mask=function(){this._backingEditor.isEnabled=!1,this._maskElement.classList.remove("Inactive"),null!==this._button&&(this._button.isEnabled=!0)},e.prototype._raiseDirtyStateChangeEvent=function(t){if(this._dirtyStateChangeHandlers.length>0)for(var e=new AutotaskDirtyStateSystem.DirtyStateChangeEventArgs(t),n=0,i=this._dirtyStateChangeHandlers;n<i.length;n++){(0,i[n])(e)}},e.prototype._raiseDisposingEvent=function(){if(this._disposingHandlers.length>0)for(var t=new Autotask.DisposingEventArgs(this.id),e=0,n=this._disposingHandlers;e<n.length;e++){(0,n[e])(t)}},e.prototype._unmask=function(){this._backingEditor.isEnabled=!0,this._backingEditor.focus(),this._maskElement.classList.add("Inactive"),null!==this._button&&(this._button.isEnabled=!1)},e.prototype._unmaskValueSuccessHandler=function(t){this._backingEditor.value=t,this._originalValue=this._backingEditor.value,this._unmask()},e}(AutotaskEditorSystem.MaskedUserDefinedField);t.MaskedUserDefinedField=e}(AutotaskTextArea||(AutotaskTextArea={})),function(t){var e=function(t){function e(e,n){var i=t.call(this,e)||this;return i._maskedEditorId=e,i._requiredValidator=n,i}return __extends(e,t),Object.defineProperty(e.prototype,"_isRequired",{get:function(){return null!==this._requiredValidator},enumerable:!1,configurable:!0}),e.prototype.initialize=function(){},e.prototype.resetValidationResult=function(t){this._updateValidationResult(new AutotaskEditorSystem.ValidResult,!1,t,!0)},e.prototype.validate=function(t,e,n){var i=new AutotaskEditorSystem.ValidResult,o=autotask.find(this._maskedEditorId);return!o.isEnabled||o.hasServerValue&&!o.isDirty||null!==this._requiredValidator&&(i=this._requiredValidator.validate(t)),this._updateValidationResult(i,e,n,!0),i.isValid},e}(AutotaskEditorSystem.EditorValidation);t.MaskedUserDefinedFieldValidation=e}(AutotaskTextArea||(AutotaskTextArea={})),function(t){var e=function(e){function n(t,n,i,o,a,r,s,l){var u=e.call(this,t)||this,c=AutotaskDomSystem.Document.getElementById(t);return u._textAreaElement=c.children[0],u._characterInformationElement=null!==s?c.children[1]:null,u._textAreaElement.addEventListener("blur",(function(){u._blurListener()})),u._textAreaElement.addEventListener("change",(function(){u._changeListener()})),u._textAreaElement.addEventListener("focus",(function(){u._focusListener()})),u._textAreaElement.addEventListener("input",(function(){u._inputListener()})),u._originalValue=u._textAreaElement.value,u._value=u._originalValue,u._isEnabled=n,u._bindingPropertyName=a,u._isRequestDataProvidedWhenDisabled=r,u._maximumLength=s,u._changeHandlers=[],null!==i&&u._changeHandlers.push(i),u._immediateChangeHandlers=[],null!==o&&u._immediateChangeHandlers.push(o),u._textAreaValidation=l,u._textAreaValidation.addRequiredStateChangedHandler((function(){u._validationRequiredStateChanged()})),u._textAreaValidation.addValidationCorrectedHandler((function(){u._validationCorrected()})),u._textAreaValidation.addValidationFailedHandler((function(){u._validationFailed()})),u._blurHandlers=[],u._broadcastKeyUpHandlers=[],u._dirtyStateChangeHandlers=[],u._focusHandlers=[],u._tabbedAwayHandlers=[],u._tabbingAwayHandlers=[],u._invalidCssClass="Invalid",u._isDirty=!1,u._isTabKeyDownHandled=!1,u._isValidationFrequencyElevated=!1,u._isValidationOverdue=!0,u._isValidationOverlayDismissed=!1,u}return __extends(n,e),Object.defineProperty(n.prototype,"participantValidation",{get:function(){return this._textAreaValidation},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isEnabled",{get:function(){return this._isEnabled},set:function(t){t!==this._isEnabled&&(this._isEnabled=t,this._textAreaElement.disabled=!t,t||this._isRequestDataProvidedWhenDisabled?this._isValidationFrequencyElevated&&this._validate(!1):(this._isValidationOverdue=!this._textAreaValidation.validationResult.isValid,this._textAreaValidation.resetValidationResult(this._textAreaElement)))},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isDirty",{get:function(){return this._isDirty},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"value",{get:function(){var t=null;return this._textAreaValidation.validationResult.isValid&&(t=this._value),t},set:function(t){var e=null===t?"":t;n._equals(this._value,e)||(this._value=e,this._textAreaElement.value=this._value,this._manageDirtyState(this._value)&&this._raiseDirtyStateChangeEvent(this._isDirty),null!==this._characterInformationElement&&this._updateCharacterCount(),this._isValidationOverdue=!0,this._isValidationFrequencyElevated&&this._validate(!1))},enumerable:!1,configurable:!0}),n.prototype.addBlurHandler=function(t){this._blurHandlers.push(t)},n.prototype.addBroadcastKeyUpHandler=function(t){var e=this;this._broadcastKeyUpHandlers.push(t),this._broadcastKeyUpHandlers.length+this._tabbedAwayHandlers.length===1&&this._textAreaElement.addEventListener("keyup",(function(t){e._keyUpListener(t)}))},n.prototype.addChangeHandler=function(t){this._changeHandlers.push(t)},n.prototype.addDirtyStateChangeHandler=function(t){this._dirtyStateChangeHandlers.push(t)},n.prototype.addFocusHandler=function(t){this._focusHandlers.push(t)},n.prototype.addImmediateChangeHandler=function(t){this._immediateChangeHandlers.push(t)},n.prototype.addTabbedAwayHandler=function(t){var e=this;this._tabbedAwayHandlers.push(t),this._broadcastKeyUpHandlers.length+this._tabbedAwayHandlers.length===1&&this._textAreaElement.addEventListener("keyup",(function(t){e._keyUpListener(t)}))},n.prototype.addTabbingAwayHandler=function(t){var e=this;this._tabbingAwayHandlers.push(t),1===this._tabbingAwayHandlers.length&&this._textAreaElement.addEventListener("keydown",(function(t){e._keyDownListener(t)}))},n.prototype.clearValue=function(){this.value=null},n.prototype.createRequestData=function(){var t=null;if(null!==this._bindingPropertyName){var e=null;(this._isEnabled||this._isRequestDataProvidedWhenDisabled)&&(e=this.value),(t={})[this._bindingPropertyName]=e}return t},n.prototype.focus=function(){this._textAreaElement.focus()},n.prototype.focusEnd=function(){this.focus()},n.prototype.focusStart=function(){this.focus()},n.prototype.insertText=function(t){var e=this._textAreaElement.selectionStart,n=this._textAreaElement.selectionEnd;e===n?this._insertText(t,e):this._replaceText(t,e,n)},n.prototype.removeFocus=function(){this._textAreaElement.blur()},n.prototype.resetValidation=function(){this._isValidationOverdue=!0},n.prototype.validate=function(){return this._validate(!1)},n.prototype.__initialize=function(){this._textAreaValidation.initialize()},n._equals=function(t,e){return t.replace(/\r\n|\r/g,"\n")===e.replace(/\r\n|\r/g,"\n")},n.prototype._blurListener=function(){this._isTabKeyDownHandled=!1,this._raiseBlurEvent()},n.prototype._changeListener=function(){this._raiseChangeEvent(),this._validate(!0)},n.prototype._focusListener=function(){this._isValidationOverlayDismissed||!this._isValidationFrequencyElevated||this._textAreaValidation.validationResult.isValid||this._showValidationOverlay(),this._raiseFocusEvent()},n.prototype._inputListener=function(){if(!n._equals(this._value,this._textAreaElement.value)){var t=this._value;this._value=this._textAreaElement.value,this._raiseImmediateChangeEvent(t,this._value),this._manageDirtyState(this._value)&&this._raiseDirtyStateChangeEvent(this._isDirty),null!==this._characterInformationElement&&this._updateCharacterCount(),this._isValidationOverdue=!0,this._isValidationFrequencyElevated&&this._validate(!0)}},n.prototype._insertText=function(t,e){var n=this._textAreaElement.value,i=n.slice(0,e),o=n.slice(e,n.length);this._textAreaElement.value=i+t+o,this._value=this._textAreaElement.value},n.prototype._keyDownListener=function(t){AutotaskDomSystem.KeyCode.isTab(t.which)&&(this._isTabKeyDownHandled=!0,this._raiseTabbingAwayEvent(t.shiftKey,(function(){t.preventDefault()})))},n.prototype._keyUpListener=function(t){AutotaskDomSystem.KeyCode.isEscape(t.which)?this._raiseBroadcastKeyUpEvent(t.which):AutotaskDomSystem.KeyCode.isTab(t.which)&&this._isTabKeyDownHandled&&(this._isTabKeyDownHandled=!1,this._raiseTabbedAwayEvent(t.shiftKey))},n.prototype._manageDirtyState=function(t){var e=!1;return this._isDirty&&t!==this._originalValue||(this._isDirty=!this._isDirty,e=!0),e},n.prototype._raiseBlurEvent=function(){for(var t=0,e=this._blurHandlers;t<e.length;t++){(0,e[t])()}},n.prototype._raiseBroadcastKeyUpEvent=function(t){if(this._broadcastKeyUpHandlers.length>0)for(var e=new AutotaskEditorSystem.BroadcastKeyUpEventArgs(this.id,t),n=0,i=this._broadcastKeyUpHandlers;n<i.length;n++){(0,i[n])(e)}},n.prototype._raiseChangeEvent=function(){if(this._changeHandlers.length>0)for(var e=new t.ChangeEventArgs(this),n=0,i=this._changeHandlers;n<i.length;n++){(0,i[n])(e)}},n.prototype._raiseDirtyStateChangeEvent=function(t){if(this._dirtyStateChangeHandlers.length>0)for(var e=new AutotaskDirtyStateSystem.DirtyStateChangeEventArgs(t),n=0,i=this._dirtyStateChangeHandlers;n<i.length;n++){(0,i[n])(e)}},n.prototype._raiseFocusEvent=function(){for(var t=0,e=this._focusHandlers;t<e.length;t++){(0,e[t])()}},n.prototype._raiseImmediateChangeEvent=function(e,n){if(this._immediateChangeHandlers.length>0)for(var i=new t.ImmediateChangeEventArgs(this,e,n),o=0,a=this._immediateChangeHandlers;o<a.length;o++){(0,a[o])(i)}},n.prototype._raiseTabbedAwayEvent=function(t){if(this._tabbedAwayHandlers.length>0)for(var e=new AutotaskEditorSystem.TabbedAwayEventArgs(this.id,t,!0),n=0,i=this._tabbedAwayHandlers;n<i.length;n++){(0,i[n])(e)}},n.prototype._raiseTabbingAwayEvent=function(t,e){if(this._tabbingAwayHandlers.length>0)for(var n=new AutotaskEditorSystem.TabbingAwayEventArgs(this.id,t,e),i=0,o=this._tabbingAwayHandlers;i<o.length;i++){(0,o[i])(n)}},n.prototype._replaceText=function(t,e,n){var i=this._textAreaElement.value,o=i.slice(0,e),a=i.slice(n,i.length);this._textAreaElement.value=o+t+a,this._value=this._textAreaElement.value},n.prototype._showValidationOverlay=function(){var t=this;autotask.globalValidationOverlay.show(this._textAreaElement,this.id,this._textAreaValidation.validationResult.message,!0,(function(){t._validationOverlayClosed()}),null)},n.prototype._updateCharacterCount=function(){if(null!==this._characterInformationElement&&null!==this._maximumLength){var t=this._textAreaElement.value.replace("\r\n","\n"),e=t.length,n=t.match(/\n/g);null!==n&&(e+=n.length);var i=this._maximumLength-e;this._characterInformationElement.textContent=window.autotask.convert.integerToString(i),this._characterInformationElement.title=window.autotask.convert.integerToString(e)+"/"+window.autotask.convert.integerToString(this._maximumLength),i<0?this._characterInformationElement.classList.add("Important"):this._characterInformationElement.classList.remove("Important")}},n.prototype._validate=function(t){var e=this._textAreaValidation.validationResult.isValid;return this._isValidationOverdue&&(this._isRequestDataProvidedWhenDisabled||this._isEnabled)&&(e=this._textAreaValidation.validate(this._value,t,this._textAreaElement),this._isValidationOverdue=!1),e?autotask.globalValidationOverlay.hide(this.id):this._showValidationOverlay(),e},n.prototype._validationCorrected=function(){this._textAreaElement.classList.remove(this._invalidCssClass)},n.prototype._validationFailed=function(){this._textAreaElement.classList.add(this._invalidCssClass),this._isValidationFrequencyElevated=!0},n.prototype._validationOverlayClosed=function(){this._isValidationOverlayDismissed=!0},n.prototype._validationRequiredStateChanged=function(){this.resetValidation(),this._isValidationFrequencyElevated&&this._validate(!0)},n}(AutotaskEditorSystem.Editor);t.TextArea=e}(AutotaskTextArea||(AutotaskTextArea={})),function(t){var e=function(t){function e(e,n,i,o){var a=t.call(this,e)||this;return a._requiredValidatorProvider=n,a._lengthValidator=i,a._regularExpressionValidator=o,a._requiredValidator=null,a}return __extends(e,t),Object.defineProperty(e.prototype,"_isRequired",{get:function(){return null!==this._requiredValidator},enumerable:!1,configurable:!0}),e.prototype.initialize=function(){var t=this;null!==this._requiredValidatorProvider&&(this._requiredValidatorProvider.initialize(),this._requiredValidatorProvider.addRequiredStateChangedHandler((function(){t._requiredStateChanged()})),this._requiredValidator=this._requiredValidatorProvider.createValidator())},e.prototype.resetValidationResult=function(t){this._updateValidationResult(new AutotaskEditorSystem.ValidResult,!1,t,!0)},e.prototype.validate=function(t,e,n){var i=new AutotaskEditorSystem.ValidResult;return null!==this._requiredValidator&&(i=this._requiredValidator.validate(t)),i.isValid&&null!==this._lengthValidator&&(i=this._lengthValidator.validate(t)),i.isValid&&null!==this._regularExpressionValidator&&(i=this._regularExpressionValidator.validate(t)),this._updateValidationResult(i,e,n,!0),i.isValid},e.prototype._requiredStateChanged=function(){var t=this._requiredValidatorProvider;this._requiredValidator=t.createValidator(),this._raiseRequiredStateChanged()},e}(AutotaskEditorSystem.EditorValidation);t.TextAreaValidation=e}(AutotaskTextArea||(AutotaskTextArea={})),function(t){var e=function(){function t(t,e){this._startIndex=t,this._endIndex=e}return Object.defineProperty(t.prototype,"endIndex",{get:function(){return this._endIndex},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"startIndex",{get:function(){return this._startIndex},enumerable:!1,configurable:!0}),t}();t.TextSelection=e}(AutotaskTextArea||(AutotaskTextArea={})),function(t){var e=function(t){function e(e,n,i,o){var a=t.call(this,e,i,o)||this;return a._backingEditorId=n,a._backingTextAreaEditor=void 0,a}return __extends(e,t),Object.defineProperty(e.prototype,"isDirty",{get:function(){return this._backingEditor.isDirty},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isEnabled",{get:function(){return this._backingEditor.isEnabled},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"participantValidation",{get:function(){return this._backingEditor.participantValidation},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_backingEditor",{get:function(){return void 0===this._backingTextAreaEditor?autotask.throwException("_backingTextAreaEditor is undefined."):this._backingTextAreaEditor},enumerable:!1,configurable:!0}),e.prototype.addTabbingAwayHandler=function(t){var e=this;this._backingEditor.addTabbingAwayHandler((function(n){t(new AutotaskEditorSystem.TabbingAwayEventArgs(e.id,n.isShiftKeyPressed,(function(){n.cancel()})))}))},e.prototype.createRequestData=function(){return this._createRequestData(this._backingEditor,"6",!this._backingEditor.isEnabled)},e.prototype.focus=function(){this._backingEditor.focus()},e.prototype.focusEnd=function(){this._backingEditor.focusEnd()},e.prototype.focusStart=function(){this._backingEditor.focusStart()},e.prototype.resetValidation=function(){this._backingEditor.resetValidation()},e.prototype.validate=function(){return this._backingEditor.validate()},e.prototype.__initialize=function(){this._backingTextAreaEditor=autotask.find(this._backingEditorId)},e}(AutotaskEditorSystem.UserDefinedField);t.UserDefinedField=e}(AutotaskTextArea||(AutotaskTextArea={})),function(t){var e=function(t){function e(e,n){var i=t.call(this,e)||this;return i._requiredValidator=n,i}return __extends(e,t),Object.defineProperty(e.prototype,"_isRequired",{get:function(){return null!==this._requiredValidator},enumerable:!1,configurable:!0}),e.prototype.initialize=function(){},e.prototype.resetValidationResult=function(t){this._updateValidationResult(new AutotaskEditorSystem.ValidResult,!1,t,!0)},e.prototype.validate=function(t,e,n){var i=new AutotaskEditorSystem.ValidResult;return null!==this._requiredValidator&&(i=this._requiredValidator.validate(t)),this._updateValidationResult(i,e,n,!0),i.isValid},e}(AutotaskEditorSystem.EditorValidation);t.UserDefinedFieldValidation=e}(AutotaskTextArea||(AutotaskTextArea={})),function(t){var e=function(){function t(t){this._editorInstance=t}return Object.defineProperty(t.prototype,"editorInstance",{get:function(){return this._editorInstance},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"instanceId",{get:function(){return this._editorInstance.id},enumerable:!1,configurable:!0}),t}();t.ChangeEventArgs=e}(AutotaskTextBox||(AutotaskTextBox={})),function(t){var e=function(){function t(t,e,n){this._editorInstance=t,this._previousValue=e,this._currentValue=n}return Object.defineProperty(t.prototype,"currentValue",{get:function(){return this._currentValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"editorInstance",{get:function(){return this._editorInstance},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"previousValue",{get:function(){return this._previousValue},enumerable:!1,configurable:!0}),t}();t.ImmediateChangeEventArgs=e}(AutotaskTextBox||(AutotaskTextBox={})),function(t){var e=function(t){function e(e,n,i,o,a,r,s,l){var u=t.call(this,e,o,s)||this;u._backingEditorId=i,u._button=null,u._buttonId=n,u._unmaskRoute=l,u._backingTextBoxEditor=void 0,u._originalValue=null,u._isDirty=!1,u._dirtyStateChangeHandlers=[],u._disposingHandlers=[],u._isEnabled=a,u._hasServerValue=r;var c=AutotaskDomSystem.Document.getElementById(e).children[0];return u._maskElement=AutotaskDomSystem.Document.getChildElementByClassName(c,"Mask"),u}return __extends(e,t),Object.defineProperty(e.prototype,"hasServerValue",{get:function(){return this._hasServerValue},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isDirty",{get:function(){return this._isDirty},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isEnabled",{get:function(){return this._isEnabled},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"participantValidation",{get:function(){return this._backingEditor.participantValidation},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_backingEditor",{get:function(){return void 0===this._backingTextBoxEditor?autotask.throwException("_backingTextBoxEditor is undefined."):this._backingTextBoxEditor},enumerable:!1,configurable:!0}),e.prototype.addDirtyStateChangeHandler=function(t){this._dirtyStateChangeHandlers.push(t)},e.prototype.addDisposingHandler=function(t){this._disposingHandlers.push(t)},e.prototype.createRequestData=function(){return this._createRequestData(this._backingEditor,"7",this.isDirty)},e.prototype.focus=function(){this._backingEditor.focus()},e.prototype.resetValidation=function(){this._backingEditor.resetValidation()},e.prototype.validate=function(){return this._backingEditor.validate()},e.prototype.__dispose=function(){this._raiseDisposingEvent()},e.prototype.__initialize=function(){var t=this;if(this._backingTextBoxEditor=autotask.find(this._backingEditorId),this._backingTextBoxEditor.addBlurHandler((function(){t._backingTextBoxBlurHandler()})),this._backingTextBoxEditor.addImmediateChangeHandler((function(){t._backingTextBoxImmediateChangeHandler()})),null!==this._buttonId){this._button=autotask.find(this._buttonId);var e=new AutotaskButtonSystem.ClickEventHandler((function(){t._buttonClickHandler()}));this._button.addEventHandler(e)}},e.prototype._backingTextBoxImmediateChangeHandler=function(){this._manageDirtyState(this._backingEditor.value)&&this._raiseDirtyStateChangeEvent(this._isDirty)},e.prototype._backingTextBoxBlurHandler=function(){this._isDirty||(this._backingEditor.value=null,this._originalValue=null),this._mask()},e.prototype._buttonClickHandler=function(){var t=this;this._isDirty?this._unmask():this._unmaskRoute.getMaskedStringValue((function(e){return t._unmaskValueSuccessHandler(e)}))},e.prototype._manageDirtyState=function(t){var e=!1;return this._isDirty&&t!==this._originalValue||(this._isDirty=!this._isDirty,e=!0),e},e.prototype._mask=function(){this._backingEditor.isEnabled=!1,this._maskElement.classList.remove("Inactive"),null!==this._button&&(this._button.isEnabled=!0)},e.prototype._raiseDirtyStateChangeEvent=function(t){if(this._dirtyStateChangeHandlers.length>0)for(var e=new AutotaskDirtyStateSystem.DirtyStateChangeEventArgs(t),n=0,i=this._dirtyStateChangeHandlers;n<i.length;n++){(0,i[n])(e)}},e.prototype._raiseDisposingEvent=function(){if(this._disposingHandlers.length>0)for(var t=new Autotask.DisposingEventArgs(this.id),e=0,n=this._disposingHandlers;e<n.length;e++){(0,n[e])(t)}},e.prototype._unmask=function(){this._backingEditor.isEnabled=!0,this._backingEditor.focus(),this._maskElement.classList.add("Inactive"),null!==this._button&&(this._button.isEnabled=!1)},e.prototype._unmaskValueSuccessHandler=function(t){this._backingEditor.value=t,this._originalValue=this._backingEditor.value,this._unmask()},e}(AutotaskEditorSystem.MaskedUserDefinedField);t.MaskedUserDefinedField=e}(AutotaskTextBox||(AutotaskTextBox={})),function(t){var e=function(t){function e(e,n){var i=t.call(this,e)||this;return i._maskedEditorId=e,i._requiredValidator=n,i}return __extends(e,t),Object.defineProperty(e.prototype,"_isRequired",{get:function(){return null!==this._requiredValidator},enumerable:!1,configurable:!0}),e.prototype.initialize=function(){},e.prototype.resetValidationResult=function(t){this._updateValidationResult(new AutotaskEditorSystem.ValidResult,!1,t,!0)},e.prototype.validate=function(t,e,n){var i=new AutotaskEditorSystem.ValidResult,o=autotask.find(this._maskedEditorId);return!o.isEnabled||o.hasServerValue&&!o.isDirty||null!==this._requiredValidator&&(i=this._requiredValidator.validate(t)),this._updateValidationResult(i,e,n,!0),i.isValid},e}(AutotaskEditorSystem.EditorValidation);t.MaskedUserDefinedFieldValidation=e}(AutotaskTextBox||(AutotaskTextBox={})),function(t){var e=function(e){function n(t,n,i,o,a,r,s){var l=e.call(this,t)||this;return l._inputElement=AutotaskDomSystem.Document.getElementById(t),l._inputElement.addEventListener("blur",(function(){l._blurListener()})),l._inputElement.addEventListener("change",(function(){l._changeListener()})),l._inputElement.addEventListener("focus",(function(){l._focusListener()})),l._inputElement.addEventListener("input",(function(){l._inputListener()})),l._originalValue=l._inputElement.value,l._value=l._originalValue,l._isEnabled=n,l._changeHandlers=[],null!==i&&l._changeHandlers.push(i),l._immediateChangeHandlers=[],null!==o&&l._immediateChangeHandlers.push(o),l._bindingPropertyName=a,l._isRequestDataProvidedWhenDisabled=r,l._textBoxValidation=s,l._textBoxValidation.addRequiredStateChangedHandler((function(){l._validationRequiredStateChanged()})),l._textBoxValidation.addValidationCorrectedHandler((function(){l._validationCorrected()})),l._textBoxValidation.addValidationFailedHandler((function(){l._validationFailed()})),l._blurHandlers=[],l._broadcastKeyUpHandlers=[],l._dirtyStateChangeHandlers=[],l._tabbedAwayHandlers=[],l._tabbingAwayHandlers=[],l._invalidCssClass="Invalid",l._isDirty=!1,l._isTabKeyDownHandled=!1,l._isValidationFrequencyElevated=!1,l._isValidationOverdue=!0,l._isValidationOverlayDismissed=!1,l}return __extends(n,e),Object.defineProperty(n.prototype,"isEnabled",{get:function(){return this._isEnabled},set:function(t){t!==this._isEnabled&&(this._isEnabled=t,this._inputElement.disabled=!t,t||this._isRequestDataProvidedWhenDisabled?this._isValidationFrequencyElevated&&this._validate(!1):(this._isValidationOverdue=!this._textBoxValidation.validationResult.isValid,this._textBoxValidation.resetValidationResult(this._inputElement)))},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isDirty",{get:function(){return this._isDirty},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"participantValidation",{get:function(){return this._textBoxValidation},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"value",{get:function(){return this._value},set:function(t){var e=null===t?"":t;e!==this._value&&(this._value=e,this._inputElement.value=this._value,this._manageDirtyState(this._value)&&this._raiseDirtyStateChangeEvent(this._isDirty),this._isValidationOverdue=!0,this._isValidationFrequencyElevated&&this._validate(!1))},enumerable:!1,configurable:!0}),n.prototype.addChangeHandler=function(t){this._changeHandlers.push(t)},n.prototype.addBlurHandler=function(t){this._blurHandlers.push(t)},n.prototype.addBroadcastKeyUpHandler=function(t){var e=this;this._broadcastKeyUpHandlers.push(t),this._broadcastKeyUpHandlers.length+this._tabbedAwayHandlers.length===1&&this._inputElement.addEventListener("keyup",(function(t){e._keyUpListener(t)}))},n.prototype.addDirtyStateChangeHandler=function(t){this._dirtyStateChangeHandlers.push(t)},n.prototype.addImmediateChangeHandler=function(t){this._immediateChangeHandlers.push(t)},n.prototype.addTabbedAwayHandler=function(t){var e=this;this._tabbedAwayHandlers.push(t),this._broadcastKeyUpHandlers.length+this._tabbedAwayHandlers.length===1&&this._inputElement.addEventListener("keyup",(function(t){e._keyUpListener(t)}))},n.prototype.addTabbingAwayHandler=function(t){var e=this;this._tabbingAwayHandlers.push(t),1===this._tabbingAwayHandlers.length&&this._inputElement.addEventListener("keydown",(function(t){e._keyDownListener(t)}))},n.prototype.clearValue=function(){this.value=null},n.prototype.createRequestData=function(){var t=null;if(null!==this._bindingPropertyName){var e=null;(this._isRequestDataProvidedWhenDisabled||this._isEnabled)&&(e=this._value),(t={})[this._bindingPropertyName]=e}return t},n.prototype.focus=function(){this._inputElement.focus()},n.prototype.focusEnd=function(){this.focus()},n.prototype.focusStart=function(){this.focus()},n.prototype.insertText=function(t){var e=null===this._inputElement.selectionStart?0:this._inputElement.selectionStart,n=null===this._inputElement.selectionEnd?0:this._inputElement.selectionEnd,i=this._inputElement.value,o=i.slice(0,e),a=i.slice(n,i.length);this.value=o+t+a},n.prototype.removeFocus=function(){this._inputElement.blur()},n.prototype.resetValidation=function(){this._isValidationOverdue=!0},n.prototype.resetValue=function(){this.value=this._originalValue},n.prototype.validate=function(){return this._validate(!1)},n.prototype.__initialize=function(){this._textBoxValidation.initialize()},n.prototype._blurListener=function(){this._isTabKeyDownHandled=!1,this._raiseBlurEvent()},n.prototype._changeListener=function(){this._raiseChangeEvent(),this._validate(!0)},n.prototype._focusListener=function(){this._isValidationOverlayDismissed||!this._isValidationFrequencyElevated||this._textBoxValidation.validationResult.isValid||this._showValidationOverlay()},n.prototype._inputListener=function(){var t=this._value;this._value=this._inputElement.value;var e=this._manageDirtyState(this._value);this._raiseImmediateChangeEvent(t,this._value),e&&this._raiseDirtyStateChangeEvent(this._isDirty),this._isValidationOverdue=!0,this._isValidationFrequencyElevated&&this._validate(!0)},n.prototype._keyDownListener=function(t){AutotaskDomSystem.KeyCode.isTab(t.which)&&(this._isTabKeyDownHandled=!0,this._raiseTabbingAwayEvent(t.shiftKey,(function(){t.preventDefault()})))},n.prototype._keyUpListener=function(t){AutotaskDomSystem.KeyCode.isEnter(t.which)||AutotaskDomSystem.KeyCode.isEscape(t.which)?this._raiseBroadcastKeyUpEvent(t.which):AutotaskDomSystem.KeyCode.isTab(t.which)&&this._isTabKeyDownHandled&&(this._isTabKeyDownHandled=!1,this._raiseTabbedAwayEvent(t.shiftKey))},n.prototype._manageDirtyState=function(t){var e=!1;return this._isDirty&&t!==this._originalValue||(this._isDirty=!this._isDirty,e=!0),e},n.prototype._raiseChangeEvent=function(){if(this._changeHandlers.length>0)for(var e=new t.ChangeEventArgs(this),n=0,i=this._changeHandlers;n<i.length;n++){(0,i[n])(e)}},n.prototype._raiseBlurEvent=function(){for(var t=0,e=this._blurHandlers;t<e.length;t++){(0,e[t])()}},n.prototype._raiseBroadcastKeyUpEvent=function(t){if(this._broadcastKeyUpHandlers.length>0)for(var e=new AutotaskEditorSystem.BroadcastKeyUpEventArgs(this.id,t),n=0,i=this._broadcastKeyUpHandlers;n<i.length;n++){(0,i[n])(e)}},n.prototype._raiseDirtyStateChangeEvent=function(t){if(this._dirtyStateChangeHandlers.length>0)for(var e=new AutotaskDirtyStateSystem.DirtyStateChangeEventArgs(t),n=0,i=this._dirtyStateChangeHandlers;n<i.length;n++){(0,i[n])(e)}},n.prototype._raiseImmediateChangeEvent=function(e,n){if(this._immediateChangeHandlers.length>0)for(var i=new t.ImmediateChangeEventArgs(this,e,n),o=0,a=this._immediateChangeHandlers;o<a.length;o++){(0,a[o])(i)}},n.prototype._raiseTabbedAwayEvent=function(t){if(this._tabbedAwayHandlers.length>0)for(var e=new AutotaskEditorSystem.TabbedAwayEventArgs(this.id,t,!0),n=0,i=this._tabbedAwayHandlers;n<i.length;n++){(0,i[n])(e)}},n.prototype._raiseTabbingAwayEvent=function(t,e){if(this._tabbingAwayHandlers.length>0)for(var n=new AutotaskEditorSystem.TabbingAwayEventArgs(this.id,t,e),i=0,o=this._tabbingAwayHandlers;i<o.length;i++){(0,o[i])(n)}},n.prototype._showValidationOverlay=function(){var t=this;autotask.globalValidationOverlay.show(this._inputElement,this.id,this._textBoxValidation.validationResult.message,!0,(function(){t._validationOverlayClosed()}),null)},n.prototype._validate=function(t){var e=this._textBoxValidation.validationResult.isValid;return this._isValidationOverdue&&(this._isRequestDataProvidedWhenDisabled||this._isEnabled)&&(e=this._textBoxValidation.validate(this._value,t,this._inputElement),this._isValidationOverdue=!1),e?autotask.globalValidationOverlay.hide(this.id):this._showValidationOverlay(),e},n.prototype._validationCorrected=function(){this._inputElement.classList.remove(this._invalidCssClass)},n.prototype._validationFailed=function(){this._inputElement.classList.add(this._invalidCssClass),this._isValidationFrequencyElevated=!0},n.prototype._validationOverlayClosed=function(){this._isValidationOverlayDismissed=!0},n.prototype._validationRequiredStateChanged=function(){this.resetValidation(),this._isValidationFrequencyElevated&&this._validate(!0)},n}(AutotaskEditorSystem.Editor);t.TextBox=e}(AutotaskTextBox||(AutotaskTextBox={})),function(t){var e=function(t){function e(e,n,i,o){var a=t.call(this,e)||this;return a._requiredValidatorProvider=n,a._lengthValidator=i,a._regularExpressionValidator=o,a._requiredValidator=null,a}return __extends(e,t),Object.defineProperty(e.prototype,"_isRequired",{get:function(){return null!==this._requiredValidator},enumerable:!1,configurable:!0}),e.prototype.initialize=function(){var t=this;null!==this._requiredValidatorProvider&&(this._requiredValidatorProvider.initialize(),this._requiredValidatorProvider.addRequiredStateChangedHandler((function(){t._requiredStateChanged()})),this._requiredValidator=this._requiredValidatorProvider.createValidator())},e.prototype.resetValidationResult=function(t){this._updateValidationResult(new AutotaskEditorSystem.ValidResult,!1,t,!0)},e.prototype.validate=function(t,e,n){var i=new AutotaskEditorSystem.ValidResult;return null!==this._requiredValidator&&(i=this._requiredValidator.validate(t)),i.isValid&&null!==this._lengthValidator&&(i=this._lengthValidator.validate(t)),i.isValid&&null!==this._regularExpressionValidator&&(i=this._regularExpressionValidator.validate(t)),this._updateValidationResult(i,e,n,!0),i.isValid},e.prototype._requiredStateChanged=function(){var t=this._requiredValidatorProvider;this._requiredValidator=t.createValidator(),this._raiseRequiredStateChanged()},e}(AutotaskEditorSystem.EditorValidation);t.TextBoxValidation=e}(AutotaskTextBox||(AutotaskTextBox={})),function(t){var e=function(t){function e(e,n,i,o){var a=t.call(this,e,i,o)||this;return a._backingEditorId=n,a._backingTextBoxEditor=void 0,a}return __extends(e,t),Object.defineProperty(e.prototype,"isDirty",{get:function(){return this._backingEditor.isDirty},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isEnabled",{get:function(){return this._backingEditor.isEnabled},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"participantValidation",{get:function(){return this._backingEditor.participantValidation},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_backingEditor",{get:function(){return void 0===this._backingTextBoxEditor?autotask.throwException("_backingTextBoxEditor is undefined."):this._backingTextBoxEditor},enumerable:!1,configurable:!0}),e.prototype.addTabbingAwayHandler=function(t){var e=this;this._backingEditor.addTabbingAwayHandler((function(n){t(new AutotaskEditorSystem.TabbingAwayEventArgs(e.id,n.isShiftKeyPressed,(function(){n.cancel()})))}))},e.prototype.createRequestData=function(){return this._createRequestData(this._backingEditor,"7",!this._backingEditor.isEnabled)},e.prototype.focus=function(){this._backingEditor.focus()},e.prototype.focusEnd=function(){this._backingEditor.focusEnd()},e.prototype.focusStart=function(){this._backingEditor.focusStart()},e.prototype.resetValidation=function(){this._backingEditor.resetValidation()},e.prototype.validate=function(){return this._backingEditor.validate()},e.prototype.__initialize=function(){this._backingTextBoxEditor=autotask.find(this._backingEditorId)},e}(AutotaskEditorSystem.UserDefinedField);t.UserDefinedField=e}(AutotaskTextBox||(AutotaskTextBox={})),function(t){var e=function(t){function e(e,n){var i=t.call(this,e)||this;return i._requiredValidator=n,i}return __extends(e,t),Object.defineProperty(e.prototype,"_isRequired",{get:function(){return null!==this._requiredValidator},enumerable:!1,configurable:!0}),e.prototype.initialize=function(){},e.prototype.resetValidationResult=function(t){this._updateValidationResult(new AutotaskEditorSystem.ValidResult,!1,t,!0)},e.prototype.validate=function(t,e,n){var i=new AutotaskEditorSystem.ValidResult;return null!==this._requiredValidator&&(i=this._requiredValidator.validate(t)),this._updateValidationResult(i,e,n,!0),i.isValid},e}(AutotaskEditorSystem.EditorValidation);t.UserDefinedFieldValidation=e}(AutotaskTextBox||(AutotaskTextBox={})),function(t){var e=function(t){function e(e,n,i,o){var a=t.call(this,e)||this;return a._backingEditorId=n,a._externalId=i,a._bindingPropertyName=o,a}return __extends(e,t),Object.defineProperty(e.prototype,"isDirty",{get:function(){return this._backingEditor.isDirty},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isEnabled",{get:function(){return this._backingEditor.isEnabled},enumerable:!1,configurable:!0}),e.prototype.createRequestData=function(){var t=this._backingEditor.createRequestData();return null===t&&(t={}),t[this._bindingPropertyName+".Id"]=this._externalId,t[this._bindingPropertyName+".RenderingType"]="7",t},Object.defineProperty(e.prototype,"participantValidation",{get:function(){return this._backingEditor.participantValidation},enumerable:!1,configurable:!0}),e.prototype.focus=function(){this._backingEditor.focus()},e.prototype.focusEnd=function(){this._backingEditor.focusEnd()},e.prototype.focusStart=function(){this._backingEditor.focusStart()},e.prototype.resetValidation=function(){this._backingEditor.resetValidation()},e.prototype.validate=function(){return this._backingEditor.validate()},e.prototype.resetValue=function(){this._backingEditor.resetValue()},e.prototype.addTabbingAwayHandler=function(t){var e=this;this._backingEditor.addTabbingAwayHandler((function(n){t(new AutotaskEditorSystem.TabbingAwayEventArgs(e.id,n.isShiftKeyPressed,(function(){n.cancel()})))}))},e.prototype.__initialize=function(){this._backingTextBoxEditor=autotask.find(this._backingEditorId)},Object.defineProperty(e.prototype,"_backingEditor",{get:function(){return void 0===this._backingTextBoxEditor?autotask.throwException("_backingTextBoxEditor is undefined."):this._backingTextBoxEditor},enumerable:!1,configurable:!0}),e}(Autotask.LifecycleObject);t.UserDefinedFieldTextBox=e}(AutotaskTextBox||(AutotaskTextBox={})),function(t){var e=function(){function t(t){this._editorInstance=t}return Object.defineProperty(t.prototype,"editorInstance",{get:function(){return this._editorInstance},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"instanceId",{get:function(){return this._editorInstance.id},enumerable:!1,configurable:!0}),t}();t.ChangeEventArgs=e}(AutotaskTimeBox||(AutotaskTimeBox={})),function(t){var e=function(){function t(t,e,n){this._editorInstance=t,this._previousValue=e,this._currentValue=n}return Object.defineProperty(t.prototype,"currentValue",{get:function(){return this._currentValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"editorInstance",{get:function(){return this._editorInstance},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"previousValue",{get:function(){return this._previousValue},enumerable:!1,configurable:!0}),t}();t.ImmediateChangeEventArgs=e}(AutotaskTimeBox||(AutotaskTimeBox={})),function(t){var e=function(){function t(t){this._date=new Date(t)}return Object.defineProperty(t.prototype,"hours",{get:function(){return this._date.getHours()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"minutes",{get:function(){return this._date.getMinutes()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"time",{get:function(){return this._date.getTime()},enumerable:!1,configurable:!0}),t.prototype.minutesDifference=function(t){return(this.time-t.time)/6e4},t}();t.Time=e}(AutotaskTimeBox||(AutotaskTimeBox={})),function(t){var e=function(e){function n(t,n,i,o,a,r,s,l){var u=e.call(this,t)||this,c=AutotaskDomSystem.Document.getElementById(t);if(u._inputElement=c.children[0],u._inputElement.addEventListener("blur",(function(){u._inputBlurListener()})),u._inputElement.addEventListener("change",(function(){u._changeListener()})),u._inputElement.addEventListener("click",(function(){u._inputClickListener()})),u._inputElement.addEventListener("focus",(function(){u._focusListener()})),u._inputElement.addEventListener("input",(function(){u._inputListener()})),u._inputElement.addEventListener("keydown",(function(t){u._inputKeyDownListener(t)})),u._inputElement.addEventListener("keyup",(function(t){u._inputKeyUpListener(t)})),null!==i){var d=u._createDefaultDate(i.getHours(),i.getMinutes());u._originalValue=d,u._value=new Date(d.getTime())}else u._originalValue=null,u._value=null;u._buttonId=n,u._isEnabled=o,u._changeHandlers=[],null!==a&&u._changeHandlers.push(a),u._immediateChangeHandlers=[],null!==r&&u._immediateChangeHandlers.push(r),u._bindingPropertyName=s,u._timeBoxValidation=l,u._timeBoxValidation.addRequiredStateChangedHandler((function(){u._validationRequiredStateChanged()})),u._timeBoxValidation.addValidationCorrectedHandler((function(){u._validationCorrected()})),u._timeBoxValidation.addValidationFailedHandler((function(){u._validationFailed()})),u._broadcastKeyUpHandlers=[],u._dirtyStateChangeHandlers=[],u._tabbingAwayHandlers=[],u._tabbedAwayHandlers=[];var h="[";return h+=window.autotask.culture._calendarFormat.get_timeSeparator(),h+=" ",h+="]",u._timeFormatPartsRegularExpression=new RegExp(h),u._timeFormatParts=window.autotask.culture._calendarFormat.getPattern("t").split(u._timeFormatPartsRegularExpression),u._button=null,u._invalidCssClass="Invalid",u._isChangeEventPending=!1,u._isDirty=!1,u._isFormatValid=!0,u._isInputTabKeyDownHandled=!1,u._isValidationFrequencyElevated=!1,u._isValidationOverdue=!0,u._isValidationOverlayDismissed=!1,u}return __extends(n,e),Object.defineProperty(n.prototype,"isDirty",{get:function(){return this._isDirty},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isEnabled",{get:function(){return this._isEnabled},set:function(t){t!==this._isEnabled&&(this._isEnabled=t,this._inputElement.disabled=!t,t?(this._button.isEnabled=!0,this._isValidationFrequencyElevated&&this._validate(!1)):(this._button.isEnabled=!1,this._isValidationOverdue=!this._timeBoxValidation.validationResult.isValid,this._timeBoxValidation.resetValidationResult(this._inputElement)))},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"value",{get:function(){return this._value?new t.Time(this._value.getTime()):null},set:function(t){var e=null;null!==t&&(e=this._createDefaultDate(t.hours,t.minutes)),this._compareDates(e,this._value)||(this._value=e,this._inputElement.value=null===this._value?"":window.autotask.convert.timeToString(this._value,null),this._manageDirtyState(this._value)&&this._raiseDirtyStateChangeEvent(this._isDirty),this._isFormatValid=!0,this._isValidationOverdue=!0,this._isValidationFrequencyElevated&&this._validate(!1))},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"participantValidation",{get:function(){return this._timeBoxValidation},enumerable:!1,configurable:!0}),n.prototype.addBroadcastKeyUpHandler=function(t){this._broadcastKeyUpHandlers.push(t)},n.prototype.addChangeHandler=function(t){this._changeHandlers.push(t)},n.prototype.addDirtyStateChangeHandler=function(t){this._dirtyStateChangeHandlers.push(t)},n.prototype.addImmediateChangeHandler=function(t){this._immediateChangeHandlers.push(t)},n.prototype.addTabbedAwayHandler=function(t){this._tabbedAwayHandlers.push(t)},n.prototype.addTabbingAwayHandler=function(t){this._tabbingAwayHandlers.push(t)},n.prototype.clearValue=function(){this.value=null},n.prototype.createRequestData=function(){var t=null;if(null!==this._bindingPropertyName){var e=null;this._isEnabled&&null!==this._value&&(e=window.autotask.convert.timeToString(this._value,null)),(t={})[this._bindingPropertyName]=e}return t},n.prototype.focus=function(){this._inputElement.focus()},n.prototype.focusEnd=function(){this.focus()},n.prototype.focusStart=function(){this.focus()},n.prototype.removeFocus=function(){this._inputElement.blur()},n.prototype.resetValidation=function(){this._isValidationOverdue=!0},n.prototype.selectDefault=function(){var t=new Date;this._updateValue(this._createDefaultDate(t.getHours(),t.getMinutes())),this._isValidationOverdue=!0,this._isValidationFrequencyElevated&&this._validate(!1)},n.prototype.validate=function(){return this._validate(!1)},n.prototype.__initialize=function(){var t=this;this._timeBoxValidation.initialize(),this._button=autotask.find(this._buttonId);var e=new AutotaskButtonSystem.ClickEventHandler((function(){t._buttonClickHandler()}));this._button.addEventHandler(e)},n.prototype._buttonClickHandler=function(){var t=new Date;this._updateValue(this._createDefaultDate(t.getHours(),t.getMinutes())),this._isValidationOverdue=!0,this._validate(!0),this._raiseChangeEvent()},n.prototype._changeListener=function(){this._raiseChangeEvent(),this._validate(!0),this._isFormatValid&&this._timeBoxValidation.validationResult.isValid&&(this._inputElement.value=null===this._value?"":window.autotask.convert.timeToString(this._value,null))},n.prototype._changeTimePartSelection=function(t,e){var n=null,i=null===this._value?"":window.autotask.convert.timeToString(this._value,null),o=i.split(this._timeFormatPartsRegularExpression);if(null===this._value){this._isChangeEventPending=!0;var a=new Date,r=this._createDefaultDate(a.getHours(),a.getMinutes());this._updateValue(r),this._isValidationOverdue=!0,this._validate(!0)}else n=this._getFormatSelectionIndex(o),t?n=Math.max(0,n-1):e&&(n=Math.min(o.length-1,n+1));this._selectTimePart(n,o,i)},n.prototype._compareDates=function(t,e){var n=t===e;return null!==t&&null!==e&&(n=t.getTime()===e.getTime()),n},n.prototype._convertStringToTime=function(t){var e=window.autotask.convert.stringToTime(t,null);return null!==e&&(e.setFullYear(1),e.setMonth(0),e.setDate(1)),e},n.prototype._createDefaultDate=function(t,e){var n=new Date;return n.setFullYear(1),n.setMonth(0),n.setDate(1),n.setHours(t),n.setMinutes(e),n.setSeconds(0),n.setMilliseconds(0),n},n.prototype._focusListener=function(){this._inputElement.setSelectionRange(0,this._inputElement.value.length),this._isValidationOverlayDismissed||!this._isValidationFrequencyElevated||this._timeBoxValidation.validationResult.isValid||this._showValidationOverlay()},n.prototype._getFormatSelectionIndex=function(t){for(var e=0,n=this._inputElement.selectionStart?this._inputElement.selectionStart:0,i=0;i<t.length;i++)if(e+=t[i].length,i>0&&e++,e>=n){e=i;break}return e},n.prototype._incrementOrDecrementSelection=function(t,e){var n=new Date,i=this._value?new Date(this._value.getTime()):this._createDefaultDate(n.getHours(),n.getMinutes()),o=!1,a=null;if(null===this._value)o=!0;else if(t){var r=(l=null===this._value?"":window.autotask.convert.timeToString(this._value,null)).split(this._timeFormatPartsRegularExpression);a=this._getFormatSelectionIndex(r);var s=this._timeFormatParts[a];o=this._incrementOrDecrementTimePart(s,i,!0)}else if(e){r=(l=null===this._value?"":window.autotask.convert.timeToString(this._value,null)).split(this._timeFormatPartsRegularExpression);a=this._getFormatSelectionIndex(r);s=this._timeFormatParts[a];o=this._incrementOrDecrementTimePart(s,i,!1)}if(o){this._isChangeEventPending=!0,this._updateValue(this._createDefaultDate(i.getHours(),i.getMinutes()));var l;r=(l=window.autotask.convert.timeToString(i,null)).split(this._timeFormatPartsRegularExpression);this._selectTimePart(a,r,l),this._isValidationOverdue=!0,this._validate(!0)}},n.prototype._incrementOrDecrementTimePart=function(t,e,n){var i,o=!1;return i=n?1:-1,/h|hh|H|HH/.test(t)?(e.setHours(e.getHours()+i),o=!0):/m|mm|M|MM/.test(t)?(e.setMinutes(e.getMinutes()+i),o=!0):/tt/.test(t)&&(e.setHours(e.getHours()+12*i),o=!0),o},n.prototype._inputBlurListener=function(){this._isInputTabKeyDownHandled=!1,this._isChangeEventPending&&(this._raiseChangeEvent(),this._isChangeEventPending=!1)},n.prototype._inputClickListener=function(){var t=this._inputElement.selectionStart,e=this._inputElement.selectionEnd;if(null!==t&&null!==e&&e===t){var n=null===this._value?"":window.autotask.convert.timeToString(this._value,null),i=n.split(this._timeFormatPartsRegularExpression);this._selectTimePart(this._getFormatSelectionIndex(i),i,n)}},n.prototype._inputKeyDownListener=function(t){this._isFormatValid&&(this._leftRightKeyDownListener(AutotaskDomSystem.KeyCode.isLeft(t.which),AutotaskDomSystem.KeyCode.isRight(t.which),(function(){t.preventDefault()})),this._upDownKeyDownListener(AutotaskDomSystem.KeyCode.isUp(t.which),AutotaskDomSystem.KeyCode.isDown(t.which),(function(){t.preventDefault()}))),AutotaskDomSystem.KeyCode.isTab(t.which)&&(this._isInputTabKeyDownHandled=!0,this._raiseTabbingAwayEvent(t.shiftKey,(function(){t.preventDefault()})))},n.prototype._inputKeyUpListener=function(t){this._isFormatValid&&(this._leftRightKeyUpListener(AutotaskDomSystem.KeyCode.isLeft(t.which),AutotaskDomSystem.KeyCode.isRight(t.which),(function(){t.preventDefault()})),this._upDownKeyUpListener(AutotaskDomSystem.KeyCode.isUp(t.which),AutotaskDomSystem.KeyCode.isDown(t.which),(function(){t.preventDefault()}))),AutotaskDomSystem.KeyCode.isEnter(t.which)||AutotaskDomSystem.KeyCode.isEscape(t.which)?this._raiseBroadcastKeyUpEvent(t.which):AutotaskDomSystem.KeyCode.isTab(t.which)&&this._isInputTabKeyDownHandled&&(this._isInputTabKeyDownHandled=!1,this._raiseTabbedAwayEvent(!0,!0))},n.prototype._inputListener=function(){this._isChangeEventPending=!1;var t=this._value?new Date(this._value.getTime()):null,e=this._isFormatValid,n=this._inputElement.value,i=this._convertStringToTime(n);if(this._isFormatValid=0===n.length||null!==i,this._value=i,this._compareDates(this._value,t))this._isFormatValid!==e&&(this._isValidationOverdue=!0);else{var o=this._manageDirtyState(this._value);this._raiseImmediateChangeEvent(t,this._value),o&&this._raiseDirtyStateChangeEvent(this._isDirty),this._isValidationOverdue=!0,this._isValidationFrequencyElevated&&this._validate(!0)}},n.prototype._leftRightKeyDownListener=function(t,e,n){(t||e)&&n()},n.prototype._leftRightKeyUpListener=function(t,e,n){(t||e)&&(n(),this._changeTimePartSelection(t,e))},n.prototype._manageDirtyState=function(t){var e=!1;return this._isDirty&&!this._compareDates(t,this._originalValue)||(this._isDirty=!this._isDirty,e=!0),e},n.prototype._raiseBroadcastKeyUpEvent=function(t){if(this._broadcastKeyUpHandlers.length>0)for(var e=new AutotaskEditorSystem.BroadcastKeyUpEventArgs(this.id,t),n=0,i=this._broadcastKeyUpHandlers;n<i.length;n++){(0,i[n])(e)}},n.prototype._raiseChangeEvent=function(){if(this._changeHandlers.length>0)for(var e=new t.ChangeEventArgs(this),n=0,i=this._changeHandlers;n<i.length;n++){(0,i[n])(e)}},n.prototype._raiseDirtyStateChangeEvent=function(t){if(this._dirtyStateChangeHandlers.length>0)for(var e=new AutotaskDirtyStateSystem.DirtyStateChangeEventArgs(t),n=0,i=this._dirtyStateChangeHandlers;n<i.length;n++){(0,i[n])(e)}},n.prototype._raiseImmediateChangeEvent=function(e,n){if(this._immediateChangeHandlers.length>0)for(var i=e?new t.Time(e.getTime()):null,o=n?new t.Time(n.getTime()):null,a=new t.ImmediateChangeEventArgs(this,i,o),r=0,s=this._immediateChangeHandlers;r<s.length;r++){(0,s[r])(a)}},n.prototype._raiseTabbedAwayEvent=function(t,e){if(this._tabbedAwayHandlers.length>0)for(var n=new AutotaskEditorSystem.TabbedAwayEventArgs(this.id,t,e),i=0,o=this._tabbedAwayHandlers;i<o.length;i++){(0,o[i])(n)}},n.prototype._raiseTabbingAwayEvent=function(t,e){if(this._tabbingAwayHandlers.length>0)for(var n=new AutotaskEditorSystem.TabbingAwayEventArgs(this.id,t,e),i=0,o=this._tabbingAwayHandlers;i<o.length;i++){(0,o[i])(n)}},n.prototype._selectTimePart=function(t,e,n){if(null!==this._value){this._inputElement.value=n;var i=0,o=0;if(null===t||0===t)o=e[0].length;else if(t===e.length-1)i=this._inputElement.value.length-e[e.length-1].length,o=this._inputElement.value.length;else{for(var a=0;a<t;)i+=e[a].length,i++,a++;o=i+e[t].length}this._inputElement.setSelectionRange(i,o)}},n.prototype._showValidationOverlay=function(){var t=this;autotask.globalValidationOverlay.show(this._inputElement,this.id,this._timeBoxValidation.validationResult.message,!0,(function(){t._validationOverlayClosed()}),null)},n.prototype._updateValue=function(t){var e=this._value?new Date(this._value.getTime()):null;this._value=new Date(t.getTime()),this._isFormatValid=!0,this._inputElement.value=window.autotask.convert.timeToString(t,null);var n=this._manageDirtyState(t);this._raiseImmediateChangeEvent(e,t),n&&this._raiseDirtyStateChangeEvent(this._isDirty)},n.prototype._upDownKeyDownListener=function(t,e,n){(t||e)&&n()},n.prototype._upDownKeyUpListener=function(t,e,n){(t||e)&&(n(),this._incrementOrDecrementSelection(t,e))},n.prototype._validate=function(t){var e=this._timeBoxValidation.validationResult.isValid;return this._isValidationOverdue&&this._isEnabled&&(e=this._timeBoxValidation.validate(this._value,this._isFormatValid,t,this._inputElement),this._isValidationOverdue=!1),e?autotask.globalValidationOverlay.hide(this.id):this._showValidationOverlay(),e},n.prototype._validationCorrected=function(){this._inputElement.classList.remove(this._invalidCssClass)},n.prototype._validationFailed=function(){this._inputElement.classList.add(this._invalidCssClass),this._isValidationFrequencyElevated=!0},n.prototype._validationOverlayClosed=function(){this._isValidationOverlayDismissed=!0},n.prototype._validationRequiredStateChanged=function(){this.resetValidation(),this._isValidationFrequencyElevated&&this._validate(!0)},n}(AutotaskEditorSystem.Editor);t.TimeBox=e}(AutotaskTimeBox||(AutotaskTimeBox={})),function(t){var e=function(t){function e(e,n,i){var o=t.call(this,e)||this;return o._invalidTimeMessage=n,o._requiredValidatorProvider=i,o._requiredValidator=null,o}return __extends(e,t),Object.defineProperty(e.prototype,"_isRequired",{get:function(){return null!==this._requiredValidator},enumerable:!1,configurable:!0}),e.prototype.initialize=function(){var t=this;null!==this._requiredValidatorProvider&&(this._requiredValidatorProvider.initialize(),this._requiredValidatorProvider.addRequiredStateChangedHandler((function(){t._requiredStateChanged()})),this._requiredValidator=this._requiredValidatorProvider.createValidator())},e.prototype.resetValidationResult=function(t){this._updateValidationResult(new AutotaskEditorSystem.ValidResult,!1,t,!0)},e.prototype.validate=function(t,e,n,i){var o=new AutotaskEditorSystem.ValidResult;return e||(o=new AutotaskEditorSystem.InvalidResult(this._invalidTimeMessage,null)),o.isValid&&null!==this._requiredValidator&&(o=this._requiredValidator.validate(t)),this._updateValidationResult(o,n,i,!0),o.isValid},e.prototype._requiredStateChanged=function(){var t=this._requiredValidatorProvider;this._requiredValidator=t.createValidator(),this._raiseRequiredStateChanged()},e}(AutotaskEditorSystem.EditorValidation);t.TimeBoxValidation=e}(AutotaskTimeBox||(AutotaskTimeBox={})),function(t){var e=function(){function t(t,e,n){this._participantToken=t,this._sortIndex=n,this._participantId=e}return Object.defineProperty(t.prototype,"participantId",{get:function(){return this._participantId},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"participantToken",{get:function(){return this._participantToken},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sortIndex",{get:function(){return this._sortIndex},enumerable:!1,configurable:!0}),t}();t.FormTemplateApplicator=e}(AutotaskFormTemplateSystem||(AutotaskFormTemplateSystem={})),function(t){var e=function(){function t(t,e,n){this._responseData=t,this._applyValueDelegate=e,this._cancelDelegate=n}return Object.defineProperty(t.prototype,"applyValueDelegate",{get:function(){return this._applyValueDelegate},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cancelDelegate",{get:function(){return this._cancelDelegate},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"responseData",{get:function(){return this._responseData},enumerable:!1,configurable:!0}),t}();t.FormTemplateApplyingValueEventArgs=e}(AutotaskFormTemplateSystem||(AutotaskFormTemplateSystem={})),function(t){var e=function(){function e(t,e){this._groupToken=t,this._selectorId=e,this._participantDataList=[]}return e.prototype.addParticipantData=function(e,n,i,o){this._participantDataList.push(new t.FormTemplateParticipantData(e,n,i,o))},Object.defineProperty(e.prototype,"groupToken",{get:function(){return this._groupToken},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"selectorId",{get:function(){return this._selectorId},enumerable:!1,configurable:!0}),e.prototype.findParticipantData=function(t){for(var e=null,n=0,i=this._participantDataList;n<i.length;n++){var o=i[n];if(o.participantToken===t){e=o;break}}return e},e.prototype.removeParticipant=function(t){var e=this.findParticipantData(t);if(null!==e){var n=this._participantDataList.indexOf(e);this._participantDataList.splice(n,1)}},e}();t.FormTemplateGroup=e}(AutotaskFormTemplateSystem||(AutotaskFormTemplateSystem={})),function(t){var e=function(){function e(){this._formTemplateGroups=[]}return e.prototype.addParticipant=function(t,e,n,i,o){this._findGroup(t).addParticipantData(e,n,i,o)},e.prototype.addGroup=function(e,n){this._formTemplateGroups.push(new t.FormTemplateGroup(e,n))},e.prototype.apply=function(e,n,i,o,a,r){var s=this,l=new t.FormTemplateProcessStartingEventArgs(e);o(l);i.__applyFormTemplate(l.parameterName,l.dataDictionary,n,a,(function(e){var n=new t.FormTemplateProcessCompleteEventArgs(e);r(n)}),(function(t,e){s._applyValues(n,e,t,r)}))},e.prototype.findParticipantId=function(t,e){var n=this._findGroup(t).findParticipantData(e);return null!==n?n.participantId:null},e.prototype.findSelectorId=function(t){return this._findGroup(t).selectorId},e.prototype.removeGroup=function(t){var e=this._findGroup(t),n=this._formTemplateGroups.indexOf(e);this._formTemplateGroups.splice(n,1)},e.prototype.removeParticipant=function(t,e){for(var n=0,i=this._formTemplateGroups;n<i.length;n++){var o=i[n];if(o.groupToken===t){o.removeParticipant(e);break}}},e._sortApplicators=function(t){t.sort((function(t,e){return t.sortIndex-e.sortIndex}))},e.prototype._applyValues=function(n,i,o,a){var r=function(){var e=new t.FormTemplateProcessCompleteEventArgs(i);a(e)};if(0===o.length)r();else{e._sortApplicators(o);var s=this._findGroup(n);this._applyParticipantValue(s,o,0,i,r)}},e.prototype._applyNextParticipantValue=function(t,e,n,i,o){n+1<e.length?this._applyParticipantValue(t,e,n+1,i,o):o()},e.prototype._applyParticipantValue=function(e,n,i,o,a){var r=this,s=n[i],l=e.findParticipantData(s.participantToken);if(null===l)autotask.throwException("FormTemplateManagement: could not find participant with token "+s.participantToken);else{var u=function(){r._applyNextParticipantValue(e,n,i,o,a)},c=function(){if(s.applyValue(),null!==l.valueAppliedHandler){var e=new t.FormTemplateValueAppliedEventArgs(o);l.valueAppliedHandler(e)}u()};if(s.isParticipantEnabled)if(null!==l.applyingValueHandler){var d=new t.FormTemplateApplyingValueEventArgs(o,c,u);l.applyingValueHandler(d)}else c();else u()}},e.prototype._findGroup=function(t){for(var e=0,n=this._formTemplateGroups;e<n.length;e++){var i=n[e];if(i.groupToken===t)return i}return autotask.throwException("FormTemplateManagement: could not find group with token "+t)},e}();t.FormTemplateManagement=e}(AutotaskFormTemplateSystem||(AutotaskFormTemplateSystem={})),function(t){var e=function(t){function e(e,n,i,o,a,r){var s=t.call(this,e)||this;return s._groupToken=n,s._participantToken=i,s._participantId=o,s._applyingValueHandler=a,s._valueAppliedHandler=r,s}return __extends(e,t),e.prototype.__dispose=function(){autotask.formTemplateManagement.removeParticipant(this._groupToken,this._participantToken)},e.prototype.__initialize=function(){autotask.formTemplateManagement.addParticipant(this._groupToken,this._participantToken,this._participantId,this._applyingValueHandler,this._valueAppliedHandler)},e}(Autotask.LifecycleObject);t.FormTemplateMapper=e}(AutotaskFormTemplateSystem||(AutotaskFormTemplateSystem={})),function(t){var e=function(){function t(t,e,n,i){this._participantToken=t,this._participantId=e,this._applyingValueHandler=n,this._valueAppliedHandler=i}return Object.defineProperty(t.prototype,"applyingValueHandler",{get:function(){return this._applyingValueHandler},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"participantId",{get:function(){return this._participantId},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"participantToken",{get:function(){return this._participantToken},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"valueAppliedHandler",{get:function(){return this._valueAppliedHandler},enumerable:!1,configurable:!0}),t}();t.FormTemplateParticipantData=e}(AutotaskFormTemplateSystem||(AutotaskFormTemplateSystem={})),function(t){var e=function(){function t(t){this._responseData=t}return Object.defineProperty(t.prototype,"responseData",{get:function(){return this._responseData},enumerable:!1,configurable:!0}),t}();t.FormTemplateProcessCompleteEventArgs=e}(AutotaskFormTemplateSystem||(AutotaskFormTemplateSystem={})),function(t){var e=function(){function t(t){this._formTemplateId=t,this._dataDictionary=null,this._parameterName=null}return Object.defineProperty(t.prototype,"dataDictionary",{get:function(){return null===this._dataDictionary?autotask.throwException("FormTemplateProcessStartingEventArgs: _dataDictionary is null."):this._dataDictionary},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"formTemplateId",{get:function(){return this._formTemplateId},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"parameterName",{get:function(){return null===this._parameterName?autotask.throwException("FormTemplateProcessStartingEventArgs: _parameterName is null."):this._parameterName},enumerable:!1,configurable:!0}),t.prototype.setRequestData=function(t,e){this._parameterName=t,this._dataDictionary=e},t}();t.FormTemplateProcessStartingEventArgs=e}(AutotaskFormTemplateSystem||(AutotaskFormTemplateSystem={})),function(t){var e=function(){function t(t){this._responseData=t,this._isCanceled=!1}return Object.defineProperty(t.prototype,"isCanceled",{get:function(){return this._isCanceled},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"responseData",{get:function(){return this._responseData},enumerable:!1,configurable:!0}),t.prototype.cancel=function(){this._isCanceled=!0},t}();t.FormTemplateStartApplyingEventArgs=e}(AutotaskFormTemplateSystem||(AutotaskFormTemplateSystem={})),function(t){var e=function(){function t(t){this._responseData=t}return t.prototype.responseData=function(){return this._responseData},t}();t.FormTemplateValueAppliedEventArgs=e}(AutotaskFormTemplateSystem||(AutotaskFormTemplateSystem={})),function(t){var e=function(t){function e(e,n,i){var o=t.call(this,e)||this;return o._participantToken=n,o._sortIndex=i,o}return __extends(e,t),Object.defineProperty(e.prototype,"participantToken",{get:function(){return this._participantToken},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sortIndex",{get:function(){return this._sortIndex},enumerable:!1,configurable:!0}),e}(Autotask.LifecycleObject);t.FormTemplateValueContainer=e}(AutotaskFormTemplateSystem||(AutotaskFormTemplateSystem={})),function(t){var e=function(t){function e(e,n,i,o){var a=t.call(this,n,i,o)||this;return a._value=e,a._adjustingTextBox=autotask.find(a.participantId),a}return __extends(e,t),Object.defineProperty(e.prototype,"isParticipantEnabled",{get:function(){return this._adjustingTextBox.isEnabled},enumerable:!1,configurable:!0}),e.prototype.applyValue=function(){this._adjustingTextBox.value=this._value},e}(t.FormTemplateApplicator);t.AdjustingTextBoxApplicator=e}(AutotaskFormTemplateSystem||(AutotaskFormTemplateSystem={})),function(t){var e=function(t){function e(e,n,i,o){var a=t.call(this,n,i,o)||this;return a._value=e,a._checkbox=autotask.find(a.participantId),a}return __extends(e,t),Object.defineProperty(e.prototype,"isParticipantEnabled",{get:function(){return this._checkbox.isEnabled},enumerable:!1,configurable:!0}),e.prototype.applyValue=function(){this._checkbox.value=this._value},e}(t.FormTemplateApplicator);t.CheckboxApplicator=e}(AutotaskFormTemplateSystem||(AutotaskFormTemplateSystem={})),function(t){var e=function(t){function e(e,n,i,o){var a=t.call(this,n,i,o)||this;return a._value=e,a._dateBox=autotask.find(a.participantId),a}return __extends(e,t),Object.defineProperty(e.prototype,"isParticipantEnabled",{get:function(){return this._dateBox.isEnabled},enumerable:!1,configurable:!0}),e.prototype.applyValue=function(){this._dateBox.value=this._value},e}(t.FormTemplateApplicator);t.DateBoxApplicator=e}(AutotaskFormTemplateSystem||(AutotaskFormTemplateSystem={})),function(t){var e=function(t){function e(e,n,i,o){var a=t.call(this,n,i,o)||this;return a._value=e,a._decimalBox=autotask.find(a.participantId),a}return __extends(e,t),Object.defineProperty(e.prototype,"isParticipantEnabled",{get:function(){return this._decimalBox.isEnabled},enumerable:!1,configurable:!0}),e.prototype.applyValue=function(){this._decimalBox.value=this._value},e}(t.FormTemplateApplicator);t.DecimalBoxApplicator=e}(AutotaskFormTemplateSystem||(AutotaskFormTemplateSystem={})),function(t){var e=function(t){function e(e,n,i,o){var a=t.call(this,n,i,o)||this;return a._value=e,a._dropDownList=autotask.find(a.participantId),a}return __extends(e,t),Object.defineProperty(e.prototype,"isParticipantEnabled",{get:function(){return this._dropDownList.isEnabled},enumerable:!1,configurable:!0}),e.prototype.applyValue=function(){this._dropDownList.contains(this._value)&&(this._dropDownList.value=this._value)},e}(t.FormTemplateApplicator);t.DropDownListApplicator=e}(AutotaskFormTemplateSystem||(AutotaskFormTemplateSystem={})),function(t){var e=function(t){function e(e,n,i,o){var a=t.call(this,n,i,o)||this;return a._value=e,a._integerBox=autotask.find(a.participantId),a}return __extends(e,t),Object.defineProperty(e.prototype,"isParticipantEnabled",{get:function(){return this._integerBox.isEnabled},enumerable:!1,configurable:!0}),e.prototype.applyValue=function(){this._integerBox.value=this._value},e}(t.FormTemplateApplicator);t.IntegerBoxApplicator=e}(AutotaskFormTemplateSystem||(AutotaskFormTemplateSystem={})),function(t){var e=function(t){function e(e,n,i,o){var a=t.call(this,n,i,o)||this;return a._value=e,a._tagSelector=autotask.find(a.participantId),a}return __extends(e,t),Object.defineProperty(e.prototype,"isParticipantEnabled",{get:function(){return this._tagSelector.isEnabled},enumerable:!1,configurable:!0}),e.prototype.applyValue=function(){this._value.length>0&&this._tagSelector.replaceTags(this._value)},e}(t.FormTemplateApplicator);t.LargeMultipleTagSelectorApplicator=e}(AutotaskFormTemplateSystem||(AutotaskFormTemplateSystem={})),function(t){var e=function(t){function e(e,n,i,o){var a=t.call(this,n,i,o)||this;return a._value=e,a._backingEditor=autotask.find(a.participantId),a}return __extends(e,t),Object.defineProperty(e.prototype,"isParticipantEnabled",{get:function(){return this._backingEditor.isEnabled},enumerable:!1,configurable:!0}),e.prototype.applyValue=function(){this._backingEditor.value=this._value},e}(t.FormTemplateApplicator);t.MinutesBoxApplicator=e}(AutotaskFormTemplateSystem||(AutotaskFormTemplateSystem={})),function(t){var e=function(t){function e(e,n,i,o,a,r,s,l,u){var c=t.call(this,o,a,r)||this;return c._chipInformation=e,c._itemCreators=n,c._html=i,c._isLocked=s,c._isBrowseOnly=l,c._placeholderText=u,c._dataSelector=autotask.find(c.participantId),c}return __extends(e,t),Object.defineProperty(e.prototype,"isParticipantEnabled",{get:function(){return this._dataSelector.isLocked||this._dataSelector.isEnabled},enumerable:!1,configurable:!0}),e.prototype.applyValue=function(){this._dataSelector.clearSelection(),this._isLocked&&null!==this._placeholderText?this._dataSelector.enableLockedState(this._placeholderText):this._isBrowseOnly&&null!==this._placeholderText&&this._dataSelector.enableBrowseOnlyState(this._placeholderText),null!==this._html&&this._dataSelector.applyItemSetHtml(this._html,this._itemCreators),null!==this._chipInformation&&this._dataSelector.addMultiple(this._chipInformation),this._dataSelector.isDirty&&this._dataSelector.validate()},e}(t.FormTemplateApplicator);t.MultipleDataSelectorApplicator=e}(AutotaskFormTemplateSystem||(AutotaskFormTemplateSystem={})),function(t){var e=function(t){function e(e,n,i,o,a,r,s,l){var u=t.call(this,o,a,r)||this;return u._chipInformation=e,u._itemCreators=n,u._html=i,u._isLocked=s,u._placeholderText=l,u._multipleItemSelector=autotask.find(u.participantId),u}return __extends(e,t),Object.defineProperty(e.prototype,"isParticipantEnabled",{get:function(){return this._multipleItemSelector.isLocked||this._multipleItemSelector.isEnabled},enumerable:!1,configurable:!0}),e.prototype.applyValue=function(){this._multipleItemSelector.clearSelection(),this._isLocked&&null!==this._placeholderText&&this._multipleItemSelector.enableLockedState(this._placeholderText),null!==this._html&&this._multipleItemSelector.applyItemSetHtml(this._html,this._itemCreators),null!==this._chipInformation&&this._multipleItemSelector.addMultiple(this._chipInformation),this._multipleItemSelector.isDirty&&this._multipleItemSelector.validate()},e}(t.FormTemplateApplicator);t.MultipleItemSelectorApplicator=e}(AutotaskFormTemplateSystem||(AutotaskFormTemplateSystem={})),function(t){var e=function(t){function e(e,n,i,o){var a=t.call(this,n,i,o)||this;return a._value=e,a._radioButton=autotask.find(a.participantId),a}return __extends(e,t),Object.defineProperty(e.prototype,"isParticipantEnabled",{get:function(){return this._radioButton.isEnabled},enumerable:!1,configurable:!0}),e.prototype.applyValue=function(){this._radioButton.value=this._value},e}(t.FormTemplateApplicator);t.RadioButtonApplicator=e}(AutotaskFormTemplateSystem||(AutotaskFormTemplateSystem={})),function(t){var e=function(t){function e(e,n,i,o){var a=t.call(this,n,i,o)||this;return a._value=e,a._richTextBox=autotask.find(a.participantId),a}return __extends(e,t),Object.defineProperty(e.prototype,"isParticipantEnabled",{get:function(){return this._richTextBox.isEnabled},enumerable:!1,configurable:!0}),e.prototype.applyValue=function(){this._richTextBox.value=this._value},e}(t.FormTemplateApplicator);t.RichTextBoxApplicator=e}(AutotaskFormTemplateSystem||(AutotaskFormTemplateSystem={})),function(t){var e=function(t){function e(e,n,i,o,a,r,s,l,u){var c=t.call(this,o,a,r)||this;return c._chipInformation=e,c._itemCreators=n,c._html=i,c._isLocked=s,c._isBrowseOnly=l,c._placeholderText=u,c._dataSelector=autotask.find(c.participantId),c}return __extends(e,t),Object.defineProperty(e.prototype,"isParticipantEnabled",{get:function(){return this._dataSelector.isLocked||this._dataSelector.isEnabled},enumerable:!1,configurable:!0}),e.prototype.applyValue=function(){this._isLocked&&null!==this._placeholderText?this._dataSelector.enableLockedState(this._placeholderText):this._isBrowseOnly&&null!==this._placeholderText&&this._dataSelector.enableBrowseOnlyState(this._placeholderText),null!==this._html&&this._dataSelector.applyItemSetHtml(this._html,this._itemCreators),this._dataSelector.setSelection(this._chipInformation),this._dataSelector.isDirty&&this._dataSelector.validate()},e}(t.FormTemplateApplicator);t.SingleDataSelectorApplicator=e}(AutotaskFormTemplateSystem||(AutotaskFormTemplateSystem={})),function(t){var e=function(t){function e(e,n,i,o,a,r,s){var l=t.call(this,o,a,r)||this;return l._value=e,l._itemCreators=n,l._html=i,l._isLocked=s,l._itemSelector=autotask.find(l.participantId),l}return __extends(e,t),Object.defineProperty(e.prototype,"isParticipantEnabled",{get:function(){return this._itemSelector.isLocked||this._itemSelector.isEnabled},enumerable:!1,configurable:!0}),e.prototype.applyValue=function(){this._isLocked?this._itemSelector.enableLockedState(this._html):(null!==this._html&&this._itemSelector.applyItemSetHtml(this._html,this._itemCreators,this._value),this._itemSelector.value=this._value,this._itemSelector.isDirty&&this._itemSelector.validate())},e}(t.FormTemplateApplicator);t.SingleItemSelectorApplicator=e}(AutotaskFormTemplateSystem||(AutotaskFormTemplateSystem={})),function(t){var e=function(t){function e(e,n,i,o){var a=t.call(this,n,i,o)||this;return a._value=e,a._textArea=autotask.find(a.participantId),a}return __extends(e,t),Object.defineProperty(e.prototype,"isParticipantEnabled",{get:function(){return this._textArea.isEnabled},enumerable:!1,configurable:!0}),e.prototype.applyValue=function(){this._textArea.value=this._value},e}(t.FormTemplateApplicator);t.TextAreaApplicator=e}(AutotaskFormTemplateSystem||(AutotaskFormTemplateSystem={})),function(t){var e=function(t){function e(e,n,i,o){var a=t.call(this,n,i,o)||this;return a._value=e,a._textBox=autotask.find(a.participantId),a}return __extends(e,t),Object.defineProperty(e.prototype,"isParticipantEnabled",{get:function(){return this._textBox.isEnabled},enumerable:!1,configurable:!0}),e.prototype.applyValue=function(){this._textBox.value=this._value},e}(t.FormTemplateApplicator);t.TextBoxApplicator=e}(AutotaskFormTemplateSystem||(AutotaskFormTemplateSystem={})),function(t){var e=function(t){function e(e,n,i,o){var a=t.call(this,n,i,o)||this;return a._value=new AutotaskTimeBox.Time(e.getTime()),a._timeBox=autotask.find(a.participantId),a}return __extends(e,t),Object.defineProperty(e.prototype,"isParticipantEnabled",{get:function(){return this._timeBox.isEnabled},enumerable:!1,configurable:!0}),e.prototype.applyValue=function(){this._timeBox.value=this._value},e}(t.FormTemplateApplicator);t.TimeBoxApplicator=e}(AutotaskFormTemplateSystem||(AutotaskFormTemplateSystem={})),function(t){var e=function(e){function n(t,n,i,o){var a=e.call(this,t,i,o)||this;return a._value=n,a}return __extends(n,e),n.prototype.createApplicator=function(e,n){return new t.AdjustingTextBoxApplicator(this._value,this.participantToken,e,this.sortIndex)},n}(t.FormTemplateValueContainer);t.AdjustingTextBoxValueContainer=e}(AutotaskFormTemplateSystem||(AutotaskFormTemplateSystem={})),function(t){var e=function(e){function n(t,n,i,o){var a=e.call(this,t,i,o)||this;return a._value=n,a}return __extends(n,e),n.prototype.createApplicator=function(e,n){return new t.CheckboxApplicator(this._value,this.participantToken,e,this.sortIndex)},n}(t.FormTemplateValueContainer);t.CheckboxValueContainer=e}(AutotaskFormTemplateSystem||(AutotaskFormTemplateSystem={})),function(t){var e=function(e){function n(t,n,i,o){var a=e.call(this,t,i,o)||this;return a._value=n,a}return __extends(n,e),n.prototype.createApplicator=function(e,n){return new t.DateBoxApplicator(this._value,this.participantToken,e,this.sortIndex)},n}(t.FormTemplateValueContainer);t.DateBoxValueContainer=e}(AutotaskFormTemplateSystem||(AutotaskFormTemplateSystem={})),function(t){var e=function(e){function n(t,n,i,o){var a=e.call(this,t,i,o)||this;return a._value=n,a}return __extends(n,e),n.prototype.createApplicator=function(e,n){return new t.DecimalBoxApplicator(this._value,this.participantToken,e,this.sortIndex)},n}(t.FormTemplateValueContainer);t.DecimalBoxValueContainer=e}(AutotaskFormTemplateSystem||(AutotaskFormTemplateSystem={})),function(t){var e=function(e){function n(t,n,i,o){var a=e.call(this,t,i,o)||this;return a._value=n,a}return __extends(n,e),n.prototype.createApplicator=function(e,n){return new t.DropDownListApplicator(this._value,this.participantToken,e,this.sortIndex)},n}(t.FormTemplateValueContainer);t.DropDownListValueContainer=e}(AutotaskFormTemplateSystem||(AutotaskFormTemplateSystem={})),function(t){var e=function(e){function n(t,n,i,o){var a=e.call(this,t,i,o)||this;return a._value=n,a}return __extends(n,e),n.prototype.createApplicator=function(e,n){return new t.IntegerBoxApplicator(this._value,this.participantToken,e,this.sortIndex)},n}(t.FormTemplateValueContainer);t.IntegerBoxValueContainer=e}(AutotaskFormTemplateSystem||(AutotaskFormTemplateSystem={})),function(t){var e=function(e){function n(t,n,i,o){var a=e.call(this,t,i,o)||this;return a._value=n,a}return __extends(n,e),n.prototype.createApplicator=function(e,n){return new t.LargeMultipleTagSelectorApplicator(this._value,this.participantToken,e,this.sortIndex)},n}(t.FormTemplateValueContainer);t.LargeMultipleTagSelectorValueContainer=e}(AutotaskFormTemplateSystem||(AutotaskFormTemplateSystem={})),function(t){var e=function(e){function n(t,n,i,o){var a=e.call(this,t,i,o)||this;return a._value=n,a}return __extends(n,e),n.prototype.createApplicator=function(e,n){return new t.MinutesBoxApplicator(this._value,this.participantToken,e,this.sortIndex)},n}(t.FormTemplateValueContainer);t.MinutesBoxValueContainer=e}(AutotaskFormTemplateSystem||(AutotaskFormTemplateSystem={})),function(t){var e=function(e){function n(t,n,i,o,a,r,s,l){var u=e.call(this,t,o,a)||this;return u._value=n,u._itemCreators=i,u._isLocked=r,u._isBrowseOnly=s,u._placeholderText=l,u}return __extends(n,e),n.prototype.createApplicator=function(e,n){return new t.MultipleDataSelectorApplicator(this._value,this._itemCreators,null!==n?n.HtmlParts.ItemSetHtml[0]:null,this.participantToken,e,this.sortIndex,this._isLocked,this._isBrowseOnly,this._placeholderText)},n}(t.FormTemplateValueContainer);t.MultipleDataSelectorValueContainer=e}(AutotaskFormTemplateSystem||(AutotaskFormTemplateSystem={})),function(t){var e=function(e){function n(t,n,i,o,a,r,s){var l=e.call(this,t,o,a)||this;return l._value=n,l._itemCreators=i,l._isLocked=r,l._placeholderText=s,l}return __extends(n,e),n.prototype.createApplicator=function(e,n){return new t.MultipleItemSelectorApplicator(this._value,this._itemCreators,null!==n?n.HtmlParts.ItemSetHtml[0]:null,this.participantToken,e,this.sortIndex,this._isLocked,this._placeholderText)},n}(t.FormTemplateValueContainer);t.MultipleItemSelectorValueContainer=e}(AutotaskFormTemplateSystem||(AutotaskFormTemplateSystem={})),function(t){var e=function(e){function n(t,n,i,o){var a=e.call(this,t,i,o)||this;return a._value=n,a}return __extends(n,e),n.prototype.createApplicator=function(e,n){return new t.RadioButtonApplicator(this._value,this.participantToken,e,this.sortIndex)},n}(t.FormTemplateValueContainer);t.RadioButtonValueContainer=e}(AutotaskFormTemplateSystem||(AutotaskFormTemplateSystem={})),function(t){var e=function(e){function n(t,n,i,o){var a=e.call(this,t,i,o)||this;return a._value=n,a}return __extends(n,e),n.prototype.createApplicator=function(e,n){return new t.RichTextBoxApplicator(this._value,this.participantToken,e,this.sortIndex)},n}(t.FormTemplateValueContainer);t.RichTextBoxValueContainer=e}(AutotaskFormTemplateSystem||(AutotaskFormTemplateSystem={})),function(t){var e=function(e){function n(t,n,i,o,a,r,s,l){var u=e.call(this,t,o,a)||this;return u._value=n,u._itemCreators=i,u._isLocked=r,u._isBrowseOnly=s,u._placeholderText=l,u}return __extends(n,e),n.prototype.createApplicator=function(e,n){return new t.SingleDataSelectorApplicator(this._value,this._itemCreators,null!==n?n.HtmlParts.ItemSetHtml[0]:null,this.participantToken,e,this.sortIndex,this._isLocked,this._isBrowseOnly,this._placeholderText)},n}(t.FormTemplateValueContainer);t.SingleDataSelectorValueContainer=e}(AutotaskFormTemplateSystem||(AutotaskFormTemplateSystem={})),function(t){var e=function(e){function n(t,n,i,o,a,r){var s=e.call(this,t,o,a)||this;return s._value=n,s._itemCreators=i,s._isLocked=r,s}return __extends(n,e),n.prototype.createApplicator=function(e,n){var i=null;return null!==n&&(this._isLocked?i=n.HtmlParts.LockedItemHtml[0]:void 0!==n.HtmlParts.ItemSetHtml&&(i=n.HtmlParts.ItemSetHtml[0])),new t.SingleItemSelectorApplicator(this._value,this._itemCreators,i,this.participantToken,e,this.sortIndex,this._isLocked)},n}(t.FormTemplateValueContainer);t.SingleItemSelectorValueContainer=e}(AutotaskFormTemplateSystem||(AutotaskFormTemplateSystem={})),function(t){var e=function(e){function n(t,n,i,o){var a=e.call(this,t,i,o)||this;return a._value=n,a}return __extends(n,e),n.prototype.createApplicator=function(e,n){return new t.TextAreaApplicator(this._value,this.participantToken,e,this.sortIndex)},n}(t.FormTemplateValueContainer);t.TextAreaValueContainer=e}(AutotaskFormTemplateSystem||(AutotaskFormTemplateSystem={})),function(t){var e=function(e){function n(t,n,i,o){var a=e.call(this,t,i,o)||this;return a._value=n,a}return __extends(n,e),n.prototype.createApplicator=function(e,n){return new t.TextBoxApplicator(this._value,this.participantToken,e,this.sortIndex)},n}(t.FormTemplateValueContainer);t.TextBoxValueContainer=e}(AutotaskFormTemplateSystem||(AutotaskFormTemplateSystem={})),function(t){var e=function(e){function n(t,n,i,o){var a=e.call(this,t,i,o)||this;return a._value=n,a}return __extends(n,e),n.prototype.createApplicator=function(e,n){return new t.TimeBoxApplicator(this._value,this.participantToken,e,this.sortIndex)},n}(t.FormTemplateValueContainer);t.TimeBoxValueContainer=e}(AutotaskFormTemplateSystem||(AutotaskFormTemplateSystem={})),function(t){var e=function(){function t(t,e){this._gaugeConfigurationId=t,this._isCtrlKeyPressed=e}return Object.defineProperty(t.prototype,"isCtrlKeyPressed",{get:function(){return this._isCtrlKeyPressed},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"gaugeConfigurationId",{get:function(){return this._gaugeConfigurationId},enumerable:!1,configurable:!0}),t}();t.ClickEventArgs=e}(AutotaskGaugeSystem||(AutotaskGaugeSystem={})),function(t){!function(t){t.calculateShadingColor=function(t,e){var n=parseInt(t,16),i=Math.round(2.55*e),o=Math.min((n>>16)+i,255),a=Math.min((n>>8&255)+i,255),r=Math.min((255&n)+i,255);return(65536*(o<1?0:o)+256*(a<1?0:a)+(r<1?0:r)+16777216).toString(16).slice(1)},t.rgbToHexColor=function(t,e,n){var i=function(t){var e=t.toString(16);return 1===e.length?"0"+e:e};return i(t)+i(e)+i(n)}}(t.ColorManagement||(t.ColorManagement={}))}(AutotaskGaugeSystem||(AutotaskGaugeSystem={})),function(t){var e=function(){function e(n,i,o){var a=this;this._canvas=e._createCanvas(i.offsetWidth,i.offsetHeight),i.appendChild(this._canvas),this._containingElement=i,this._clickHandler=o,this._fontFamily=window.getComputedStyle(window.document.body).getPropertyValue("font-family"),this._eventCoordinator=new t.GaugeEventCoordinator(n,this._canvas,(function(t){a._onPointingDeviceClick(t)}),(function(){a._onPointingDeviceLeave()}),(function(t){a._onPointingDeviceMove(t)}))}return Object.defineProperty(e.prototype,"canvas",{get:function(){return this._canvas},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"containingElement",{get:function(){return this._containingElement},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"displayScale",{get:function(){return window.devicePixelRatio},enumerable:!1,configurable:!0}),e.prototype.__dispose=function(){delete this._eventCoordinator},e.prototype.__render=function(){this._renderContent()},e.prototype._adjustFontSize=function(e,n,i,o){t.FontManagement.adjustFontSize(e,n,i,o,this._fontFamily)},e.prototype._createRenderingContext=function(){var t=this.canvas.getContext("2d");return e._applyDeviceScaling(this.canvas,t,this.displayScale),t.font="10px "+this._fontFamily,t},e._applyDeviceScaling=function(t,e,n){var i=t.width,o=t.height;t.setAttribute("width",(i*n).toString()),t.setAttribute("height",(o*n).toString()),t.style.width=i.toString()+"px",t.style.height=o.toString()+"px",e.scale(n,n)},e._createCanvas=function(t,e){var n=document.createElement("canvas");return n.width=t,n.height=e,n.style.position="absolute",n.style.cursor="pointer",n},e.prototype._onPointingDeviceClick=function(t){null!==this._clickHandler&&this._clickHandler(t)},e}();t.Gauge=e}(AutotaskGaugeSystem||(AutotaskGaugeSystem={})),function(t){var e=function(e){function n(i,o,a,r){var s=e.call(this,o.configurationId,i,r)||this;return s._doughnutGaugeOptions=o,s._initialFontSize=n._determineInitialFontSize(a),s._tooltip=null,s._arcBackgroundColor=o.color,s._arcBackgroundColorShaded=t.ColorManagement.calculateShadingColor(o.color,20),s._valueTextColor=t.ColorManagement.calculateShadingColor(o.color,-.5),s._lineWidth=.1*s.canvas.height,s._radius=s.canvas.height/2-s._lineWidth/2,s._renderingContext=s._createRenderingContext(),s}return __extends(n,e),Object.defineProperty(n.prototype,"tooltip",{get:function(){return null===this._tooltip&&(this._tooltip=new t.GaugeTooltip(this.containingElement)),this._tooltip},enumerable:!1,configurable:!0}),n.prototype._onPointingDeviceLeave=function(){this.tooltip.hide(),this._rerender(this._valueTextColor,this._arcBackgroundColor)},n.prototype._onPointingDeviceMove=function(t){this.tooltip.isVisible?this.tooltip.move(t.tooltipX,t.tooltipY):(this._rerender(this._valueTextColor,this._arcBackgroundColorShaded),this.tooltip.show(this._doughnutGaugeOptions.tooltipText,this._arcBackgroundColor,t.tooltipX,t.tooltipY))},n.prototype._renderContent=function(){this._render(this._valueTextColor,this._arcBackgroundColor)},n._calculateTextRenderingTargetWidth=function(t,e,n){return t/n-e/n},n._calculateValueAngle=function(t,e){return 1.5*Math.PI+t/e*Math.PI*2},n._determineFontScalingValue=function(t,e){return null!==t||null!==e?2:1.5},n._determineInitialFontSize=function(t){return 1===t?32:26},n.prototype._render=function(t,e){var i=this.canvas.height/(2*this.displayScale),o=this.canvas.width/(2*this.displayScale),a=n._determineFontScalingValue(this._doughnutGaugeOptions.currencyValue,this._doughnutGaugeOptions.unitValue),r=n._calculateTextRenderingTargetWidth(this.canvas.height,this._lineWidth,a*this.displayScale);this._adjustFontSize(this._renderingContext,this._doughnutGaugeOptions.valueFormatted,r,this._initialFontSize),this._renderingContext.textAlign="center",this._renderingContext.textBaseline="middle",this._renderingContext.fillStyle="#"+t,this._renderingContext.fillText(this._doughnutGaugeOptions.valueFormatted,o,i),null!==this._doughnutGaugeOptions.currencyValue&&(r=n._calculateTextRenderingTargetWidth(this.canvas.height,this._lineWidth,4*this.displayScale),this._adjustFontSize(this._renderingContext,this._doughnutGaugeOptions.currencyValue,r,this._initialFontSize),this._renderingContext.fillText(this._doughnutGaugeOptions.currencyValue,o,.5*i)),null!==this._doughnutGaugeOptions.unitValue&&(r=n._calculateTextRenderingTargetWidth(this.canvas.height,this._lineWidth,4*this.displayScale),this._adjustFontSize(this._renderingContext,this._doughnutGaugeOptions.unitValue,r,this._initialFontSize),this._renderingContext.fillText(this._doughnutGaugeOptions.unitValue,o,1.5*i)),this._renderingContext.strokeStyle="#"+this._doughnutGaugeOptions.backgroundColor,this._renderingContext.beginPath(),this._renderingContext.arc(o,i,this._radius,0,2*Math.PI,!1),this._renderingContext.lineWidth=this._lineWidth,this._renderingContext.lineCap="butt",this._renderingContext.stroke(),this._renderingContext.strokeStyle="#"+e,this._renderingContext.beginPath();var s=n._calculateValueAngle(this._doughnutGaugeOptions.value,this._doughnutGaugeOptions.maxValue);this._renderingContext.arc(o,i,this._radius,1.5*Math.PI,s,!1),this._renderingContext.stroke()},n.prototype._rerender=function(t,e){this._renderingContext.clearRect(0,0,this.canvas.width,this.canvas.height),this._render(t,e)},n}(t.Gauge);t.DoughnutGauge=e}(AutotaskGaugeSystem||(AutotaskGaugeSystem={})),function(t){var e=function(){function t(t){this._configurationId=t}return Object.defineProperty(t.prototype,"configurationId",{get:function(){return this._configurationId},enumerable:!1,configurable:!0}),t}();t.GaugeOptions=e}(AutotaskGaugeSystem||(AutotaskGaugeSystem={})),function(t){var e=function(t){function e(e,n,i,o,a,r,s,l,u){var c=t.call(this,e)||this;return c._value=n,c._color=o,c._backgroundColor=a,c._valueFormatted=i,c._maxValue=r,c._currencyValue=s,c._unitValue=l,c._tooltipText=u,c}return __extends(e,t),Object.defineProperty(e.prototype,"backgroundColor",{get:function(){return this._backgroundColor},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"color",{get:function(){return this._color},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currencyValue",{get:function(){return this._currencyValue},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maxValue",{get:function(){return this._maxValue},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tooltipText",{get:function(){return this._tooltipText},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"unitValue",{get:function(){return this._unitValue},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"valueFormatted",{get:function(){return this._valueFormatted},enumerable:!1,configurable:!0}),e}(t.GaugeOptions);t.DoughnutGaugeOptions=e}(AutotaskGaugeSystem||(AutotaskGaugeSystem={})),function(t){!function(t){t.adjustFontSize=function(t,e,n,i,o){for(var a=i;a>0&&(t.font=a.toString()+"px "+o,!(t.measureText(e).width<=n));a-=2);}}(t.FontManagement||(t.FontManagement={}))}(AutotaskGaugeSystem||(AutotaskGaugeSystem={})),function(t){var e=function(t){function e(e,n){var i=t.call(this,e)||this;return i._bindingPropertyName=n,i._inputElements=i._getInputElements(),i}return __extends(e,t),e.prototype.createRequestData=function(){for(var t="",e=0,n=this._inputElements;e<n.length;e++){var i=n[e];t.length>0&&(t+=";"),t+=i.value}var o={};return o[this._bindingPropertyName]=t,o},e.prototype.__initialize=function(){for(var t=0,n=this._inputElements;t<n.length;t++){var i=n[t];i.addEventListener("click",(function(t){e._onClick(t)})),i.addEventListener("blur",(function(t){e._onBlur(t)})),i.addEventListener("focus",(function(t){e._onFocus(t)})),i.addEventListener("keypress",(function(t){e._onKeyPress(t)}))}},e._onBlur=function(t){if(null!==t.target){var e=t.target,n=window.autotask.convert.stringToDecimal(e.value,2);isNaN(n)&&(e.value="0")}},e._onClick=function(t){null!==t.target&&t.target.select()},e._onFocus=function(t){null!==t.target&&t.target.select()},e._onKeyPress=function(t){if(null!==t.target){var e=t.target;if(0!==t.charCode&&e.value.length>8)return!1}return!0},e.prototype._getInputElements=function(){for(var t=[],e=AutotaskDomSystem.Document.getElementById(this.id),n=0;n<e.children.length;n++)t.push(e.children[n].children[1]),n===e.children.length-1&&t.push(e.children[n].children[2]);return t},e}(Autotask.LifecycleObject);t.GaugeBreakpointBar=e}(AutotaskGaugeSystem||(AutotaskGaugeSystem={})),function(t){var e=function(){function e(t,e,n,i,o){this._gaugeConfigurationId=t,this._canvas=e,this._clickHandler=n,this._leaveHandler=i,this._moveHandler=o,this._isTouchStarted=!1,this._cachedX=null,this._cachedY=null,this._currentX=null,this._currentY=null,this._registerHandlers()}return e.prototype._onMouseDown=function(e){this._clickHandler(new t.ClickEventArgs(this._gaugeConfigurationId,e.ctrlKey))},e.prototype._onMouseLeave=function(t){t.preventDefault(),this._leaveHandler()},e.prototype._onMouseMove=function(t){if(null!==t.target){var e=t.target;this._onMove(e,t.clientX,t.clientY)}},e.prototype._onMouseOut=function(t){t.preventDefault(),this._leaveHandler()},e.prototype._onPointerDown=function(t){var e=this;t.preventDefault(),this._cachedX=t.pageX,this._cachedY=t.pageY,this._currentX=t.pageX,this._currentY=t.pageY,this._isTouchStarted=!0,setTimeout((function(){e._onTimer()}),200);var n=t.target;this._onMove(n,t.clientX,t.clientY)},e.prototype._onPointerLeave=function(t){t.preventDefault(),this._leaveHandler()},e.prototype._onPointerMove=function(t){t.preventDefault();var e=t.target,n=e.getBoundingClientRect(),i=e.ownerDocument;if(null!==i){var o=i.documentElement,a=n.left+window.pageXOffset-o.clientLeft,r=n.top+window.pageYOffset-o.clientTop,s=t.pageX-a,l=t.pageY-r;s<0||s>this._canvas.width||l<0||l>this._canvas.height?this._leaveHandler():this._onMove(e,t.clientX,t.clientY)}},e.prototype._onPointerUp=function(t){t.preventDefault(),this._leaveHandler(),this._isTouchStarted=!1},e.prototype._onTimer=function(){this._cachedX!==this._currentX||this._isTouchStarted||this._cachedY!==this._currentY||this._clickHandler(new t.ClickEventArgs(this._gaugeConfigurationId,!1))},e.prototype._onTouchEnd=function(t){t.preventDefault(),this._leaveHandler(),this._isTouchStarted=!1},e.prototype._onTouchMove=function(t){t.preventDefault();var e=t.changedTouches[0],n=t.target,i=n.getBoundingClientRect(),o=n.ownerDocument;if(null!==o){var a=o.documentElement,r=i.left+window.pageXOffset-a.clientLeft,s=i.top+window.pageYOffset-a.clientTop,l=e.pageX-r,u=e.pageY-s;l<0||l>this._canvas.width||u<0||u>this._canvas.height?this._leaveHandler():this._onMove(n,e.clientX,e.clientY)}},e.prototype._onTouchStart=function(t){var e=this;t.preventDefault();var n=t.changedTouches[0];this._cachedX=n.pageX,this._cachedY=n.pageY,this._currentX=n.pageX,this._currentY=n.pageY,this._isTouchStarted=!0,setTimeout((function(){e._onTimer()}),200);var i=t.target;this._onMove(i,n.clientX,n.clientY)},e.prototype._onMove=function(e,n,i){var o=e.getBoundingClientRect(),a=e.ownerDocument;if(null!==a){var r=a.documentElement,s=n-(o.left+window.pageXOffset-r.clientLeft),l=i-(o.top+window.pageYOffset-r.clientTop),u=s+40,c=l-40;s*=window.devicePixelRatio,l*=window.devicePixelRatio;var d=new t.MoveEventArgs(s,l,u,c);this._moveHandler(d)}},e.prototype._registerHandlers=function(){var t=this;this._canvas.addEventListener("mousedown",(function(e){t._onMouseDown(e)})),this._canvas.addEventListener("mouseleave",(function(e){t._onMouseLeave(e)})),this._canvas.addEventListener("mousemove",(function(e){t._onMouseMove(e)})),this._canvas.addEventListener("mouseout",(function(e){t._onMouseOut(e)})),window.autotask.deviceDetection.isTouch()&&(window.autotask.browserDetection.isInternetExplorer()?(this._canvas.addEventListener("pointerdown",(function(e){t._onPointerDown(e)})),this._canvas.addEventListener("pointerleave",(function(e){t._onPointerLeave(e)})),this._canvas.addEventListener("pointermove",(function(e){t._onPointerMove(e)})),this._canvas.addEventListener("pointerup",(function(e){t._onPointerUp(e)}))):(this._canvas.addEventListener("touchend",(function(e){t._onTouchEnd(e)})),this._canvas.addEventListener("touchmove",(function(e){t._onTouchMove(e)})),this._canvas.addEventListener("touchstart",(function(e){t._onTouchStart(e)}))))},e}();t.GaugeEventCoordinator=e}(AutotaskGaugeSystem||(AutotaskGaugeSystem={})),function(t){var e=function(){function t(e){this._parentElement=e,this._id=t._createTooltipElementId(),this._tooltipElement=null}return Object.defineProperty(t.prototype,"isVisible",{get:function(){return null!==this._tooltipElement},enumerable:!1,configurable:!0}),t.prototype.hide=function(){null!==this._tooltipElement&&(this._parentElement.removeChild(this._tooltipElement),this._tooltipElement=null)},t.prototype.move=function(t,e){null!==this._tooltipElement&&(this._tooltipElement.style.left=t.toString()+"px",this._tooltipElement.style.top=e.toString()+"px")},t.prototype.show=function(t,e,n,i){this._tooltipElement=this._createTooltipElement(t,e),this.move(n,i),this._parentElement.appendChild(this._tooltipElement)},t.prototype.updateContent=function(e,n){null!==this._tooltipElement&&t._updateTooltipElement(this._tooltipElement,e,n)},t._createTooltipElementId=function(){return"z"+(new Date).getTime().toString(16)},t._updateTooltipElement=function(t,e,n){var i=t.children[0];i.style.color="#"+n,i.textContent=e},t.prototype._createTooltipElement=function(t,e){var n=document.createElement("div");n.classList.add("WidgetOverlay"),n.style.color="#"+e,n.textContent=t;var i=document.createElement("div");return i.id=this._id,i.style.position="absolute",i.style.height="auto",i.style.boxShadow="1px 1px 2px 2px rgba(0,0,0,0.1)",i.style.zIndex="9",i.appendChild(n),i},t}();t.GaugeTooltip=e}(AutotaskGaugeSystem||(AutotaskGaugeSystem={})),function(t){var e=function(){function t(t,e,n,i){this._canvasX=t,this._canvasY=e,this._tooltipX=n,this._tooltipY=i}return Object.defineProperty(t.prototype,"canvasX",{get:function(){return this._canvasX},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"canvasY",{get:function(){return this._canvasY},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tooltipX",{get:function(){return this._tooltipX},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tooltipY",{get:function(){return this._tooltipY},enumerable:!1,configurable:!0}),t}();t.MoveEventArgs=e}(AutotaskGaugeSystem||(AutotaskGaugeSystem={})),function(t){var e=function(){function t(t,e,n,i,o,a){this._value=t,this._maxValue=e,this._minValue=n,this._length=i,this._color=o,this._strokeWidth=a}return t.prototype.__render=function(e,n,i){var o=t._calculateNeedleAngle(this._value,this._minValue,this._maxValue);e.fillStyle="#"+this._color,e.beginPath(),e.arc(n,i,this._strokeWidth,0,2*Math.PI,!0),e.fill();var a=Math.round(n+this._length*Math.cos(o)),r=Math.round(i+this._length*Math.sin(o)),s=Math.round(n+this._strokeWidth*Math.cos(o-Math.PI/2)),l=Math.round(i+this._strokeWidth*Math.sin(o-Math.PI/2)),u=Math.round(n+this._strokeWidth*Math.cos(o+Math.PI/2)),c=Math.round(i+this._strokeWidth*Math.sin(o+Math.PI/2));e.beginPath(),e.moveTo(s,l),e.lineTo(a,r),e.lineTo(u,c),e.fill()},t._calculateNeedleAngle=function(t,e,n){var i=Math.min(e,t),o=Math.max(n,t);return Math.PI+(t-i)/(o-i)*Math.PI},t}();t.Needle=e}(AutotaskGaugeSystem||(AutotaskGaugeSystem={})),function(t){var e=function(e){function n(t,i,o){var a=e.call(this,i.configurationId,t,o)||this;return a._needleGaugeOptions=i,a._paddingBottom=.3,a._highlightSegmentIndex=null,a._tooltip=null,a._segmentHighlightColors=n._initializeSegmentHighlightColors(i.segmentColors),a._arcLineWidth=a.canvas.height*(1-a._paddingBottom)*.28,a._radius=a.canvas.height*(1-a._paddingBottom)-a._arcLineWidth,a._needleLength=.6*a.canvas.height,a._needleStrokeWidth=.08*a.canvas.height,a._renderingContext=a._createRenderingContext(),a}return __extends(n,e),Object.defineProperty(n.prototype,"tooltip",{get:function(){return null===this._tooltip&&(this._tooltip=new t.GaugeTooltip(this.containingElement)),this._tooltip},enumerable:!1,configurable:!0}),n.prototype._onPointingDeviceLeave=function(){null!==this._highlightSegmentIndex&&(this._highlightSegmentIndex=null,this._render(this._needleGaugeOptions.segmentColors),this.tooltip.hide())},n.prototype._onPointingDeviceMove=function(e){var n,i,o=this._renderingContext.getImageData(e.canvasX,e.canvasY,1,1).data,a=t.ColorManagement.rgbToHexColor(o[0],o[1],o[2]);null===this._highlightSegmentIndex?-1!==(n=this._needleGaugeOptions.segmentColors.indexOf(a))&&(this._highlightSegmentIndex=n,(i=this._needleGaugeOptions.segmentColors.slice())[this._highlightSegmentIndex]=this._segmentHighlightColors[this._highlightSegmentIndex],this._render(i),this.tooltip.show(this._needleGaugeOptions.segmentTooltips[this._highlightSegmentIndex],this._needleGaugeOptions.segmentColors[this._highlightSegmentIndex],e.tooltipX,e.tooltipY)):-1===(n=this._segmentHighlightColors.indexOf(a))?-1!==this._needleGaugeOptions.segmentColors.indexOf(a)?(this._highlightSegmentIndex=this._needleGaugeOptions.segmentColors.indexOf(a),(i=this._needleGaugeOptions.segmentColors.slice())[this._highlightSegmentIndex]=this._segmentHighlightColors[this._highlightSegmentIndex],this._render(i),this.tooltip.updateContent(this._needleGaugeOptions.segmentTooltips[this._highlightSegmentIndex],this._needleGaugeOptions.segmentColors[this._highlightSegmentIndex]),this.tooltip.move(e.tooltipX,e.tooltipY)):(this._highlightSegmentIndex=null,this._render(this._needleGaugeOptions.segmentColors),this.tooltip.hide()):this.tooltip.move(e.tooltipX,e.tooltipY)},n.prototype._renderContent=function(){this._render(this._needleGaugeOptions.segmentColors)},n._createTestString=function(t,e){var n="567M";return t>=2&&(n="567MDS"),e.length>n.length&&(n=e),n},n._initializeSegmentHighlightColors=function(e){var n=[];return e.forEach((function(e){n.push(t.ColorManagement.calculateShadingColor(e,20))})),n},n.prototype._render=function(t){var e=this.canvas.width/(2*this.displayScale),n=this.canvas.height*(.7/this.displayScale);this._renderingContext.clearRect(0,0,this.canvas.width,this.canvas.height),this._renderSegments(this.displayScale,this._arcLineWidth,this._radius,t),this._renderLabels(this.displayScale,this._radius,e),this._renderNeedle(e,n)},n.prototype._renderLabels=function(e,i,o){var a=n._createTestString(e,this._needleGaugeOptions.valueFormatted),r=this.canvas.height*(.9/e),s=.93*r,l=o-i,u=o+i,c=this.canvas.height/(2*e)-.3/(2*e);this._adjustFontSize(this._renderingContext,a,c,32),this._renderingContext.textAlign="center",this._renderingContext.textBaseline="middle";var d=t.ColorManagement.calculateShadingColor(this._needleGaugeOptions.segmentColors[this._needleGaugeOptions.segmentIndex],-.5);this._renderingContext.fillStyle="#"+d,this._renderingContext.fillText(this._needleGaugeOptions.valueFormatted,o,r),this._renderingContext.fillStyle="#"+this._needleGaugeOptions.textColor,c=this.canvas.height/(3*e)-.3/(3*e),this._adjustFontSize(this._renderingContext,"Test",c,32),this._renderingContext.fillText(this._needleGaugeOptions.minValueFormatted,l,s),this._renderingContext.fillText(this._needleGaugeOptions.maxValueFormatted,u,s)},n.prototype._renderNeedle=function(e,n){new t.Needle(this._needleGaugeOptions.value,this._needleGaugeOptions.maxValue,this._needleGaugeOptions.minValue,this._needleLength,this._needleGaugeOptions.needleColor,this._needleStrokeWidth).__render(this._renderingContext,e,n)},n.prototype._renderSegments=function(t,e,n,i){var o=this.canvas.width/(2*t),a=this.canvas.height/t*(1-this._paddingBottom);this._renderingContext.lineCap="butt",this._renderingContext.lineWidth=e;for(var r=Math.PI,s=0,l=0;l<this._needleGaugeOptions.segmentPercents.length;l++)if(this._needleGaugeOptions.segmentPercents[l]>0){var u=((s+=this._needleGaugeOptions.segmentPercents[l])+1)*Math.PI;l===this._needleGaugeOptions.segmentPercents.length-1?u=6.281:u+=.01,this._renderingContext.strokeStyle="#"+i[l],this._renderingContext.beginPath(),this._renderingContext.arc(o,a,n,r,u,!1),this._renderingContext.stroke(),r=u-.01}},n}(t.Gauge);t.NeedleGauge=e}(AutotaskGaugeSystem||(AutotaskGaugeSystem={})),function(t){var e=function(t){function e(e,n,i,o,a,r,s,l,u,c,d,h,_){var p=t.call(this,e)||this;return p._value=n,p._valueFormatted=i,p._maxValue=r,p._maxValueFormatted=s,p._minValue=o,p._minValueFormatted=a,p._segmentIndex=l,p._segmentPercents=u,p._segmentColors=c,p._segmentTooltips=d,p._textColor=h,p._needleColor=_,p}return __extends(e,t),Object.defineProperty(e.prototype,"maxValue",{get:function(){return this._maxValue},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maxValueFormatted",{get:function(){return this._maxValueFormatted},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"minValue",{get:function(){return this._minValue},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"minValueFormatted",{get:function(){return this._minValueFormatted},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"needleColor",{get:function(){return this._needleColor},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"segmentColors",{get:function(){return this._segmentColors},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"segmentIndex",{get:function(){return this._segmentIndex},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"segmentPercents",{get:function(){return this._segmentPercents},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"segmentTooltips",{get:function(){return this._segmentTooltips},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textColor",{get:function(){return this._textColor},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"valueFormatted",{get:function(){return this._valueFormatted},enumerable:!1,configurable:!0}),e}(t.GaugeOptions);t.NeedleGaugeOptions=e}(AutotaskGaugeSystem||(AutotaskGaugeSystem={})),function(t){var e=function(e){function n(t,i,o,a){var r=e.call(this,i.configurationId,t,a)||this;return r._numberGaugeOptions=i,r._initialFontSize=n._determineInitialFontSize(o),r._tooltip=null,r._renderingContext=r._createRenderingContext(),r}return __extends(n,e),Object.defineProperty(n.prototype,"tooltip",{get:function(){return null===this._tooltip&&(this._tooltip=new t.GaugeTooltip(this.containingElement)),this._tooltip},enumerable:!1,configurable:!0}),n.prototype._onPointingDeviceLeave=function(){this.tooltip.hide()},n.prototype._onPointingDeviceMove=function(t){this.tooltip.isVisible?this.tooltip.move(t.tooltipX,t.tooltipY):this.tooltip.show(this._numberGaugeOptions.tooltipText,this._numberGaugeOptions.color,t.tooltipX,t.tooltipY)},n.prototype._renderContent=function(){var t=this.canvas.height/(2*this.displayScale),e=this.canvas.width/(2*this.displayScale),n=this.canvas.width/(1.5*this.displayScale);this._adjustFontSize(this._renderingContext,this._numberGaugeOptions.valueFormatted,n,this._initialFontSize),this._renderingContext.textAlign="center",this._renderingContext.textBaseline="middle",this._renderingContext.fillStyle="#"+this._numberGaugeOptions.color,this._renderingContext.fillText(this._numberGaugeOptions.valueFormatted,e,t)},n._determineInitialFontSize=function(t){return 1===t?52:33},n}(t.Gauge);t.NumberGauge=e}(AutotaskGaugeSystem||(AutotaskGaugeSystem={})),function(t){var e=function(t){function e(e,n,i,o,a,r){var s=t.call(this,e)||this;return s._value=n,s._color=o,s._valueFormatted=i,s._maxValue=a,s._tooltipText=r,s}return __extends(e,t),Object.defineProperty(e.prototype,"color",{get:function(){return this._color},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maxValue",{get:function(){return this._maxValue},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tooltipText",{get:function(){return this._tooltipText},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"valueFormatted",{get:function(){return this._valueFormatted},enumerable:!1,configurable:!0}),e}(t.GaugeOptions);t.NumberGaugeOptions=e}(AutotaskGaugeSystem||(AutotaskGaugeSystem={})),function(t){var e=function(){function t(t){this._continueDelegate=t}return t.prototype.continueChange=function(){this._continueDelegate()},t}();t.CheckboxEditCellChangeEventArgs=e}(AutotaskGridSystem||(AutotaskGridSystem={})),function(t){var e=function(){function t(t){this._continueDelegate=t}return t.prototype.continueChange=function(){this._continueDelegate()},t}();t.CurrencyBoxEditCellChangeEventArgs=e}(AutotaskGridSystem||(AutotaskGridSystem={})),function(t){var e=function(){function t(t){this._continueDelegate=t}return t.prototype.continueChange=function(){this._continueDelegate()},t}();t.DateBoxEditCellChangeEventArgs=e}(AutotaskGridSystem||(AutotaskGridSystem={})),function(t){var e=function(){function t(t){this._continueDelegate=t}return t.prototype.continueChange=function(){this._continueDelegate()},t}();t.DecimalBoxEditCellChangeEventArgs=e}(AutotaskGridSystem||(AutotaskGridSystem={})),function(t){var e=function(){function t(t){this._continueDelegate=t}return t.prototype.continueChange=function(){this._continueDelegate()},t}();t.DropDownListEditCellChangeEventArgs=e}(AutotaskGridSystem||(AutotaskGridSystem={})),function(t){var e=function(){function t(t){this._continueDelegate=t}return t.prototype.continueChange=function(){this._continueDelegate()},t}();t.EmailAreaEditCellChangeEventArgs=e}(AutotaskGridSystem||(AutotaskGridSystem={})),function(t){var e=function(){function t(t){this._continueDelegate=t}return t.prototype.continueChange=function(){this._continueDelegate()},t}();t.IntegerBoxEditCellChangeEventArgs=e}(AutotaskGridSystem||(AutotaskGridSystem={})),function(t){var e=function(){function t(t){this._continueDelegate=t}return t.prototype.continueChange=function(){this._continueDelegate()},t}();t.MultipleDataSelectorEditCellChangeEventArgs=e}(AutotaskGridSystem||(AutotaskGridSystem={})),function(t){var e=function(){function t(t){this._continueDelegate=t}return t.prototype.continueChange=function(){this._continueDelegate()},t}();t.MultipleItemSelectorEditCellChangeEventArgs=e}(AutotaskGridSystem||(AutotaskGridSystem={})),function(t){var e=function(){function t(t){this._continueDelegate=t}return t.prototype.continueChange=function(){this._continueDelegate()},t}();t.PercentageBoxEditCellChangeEventArgs=e}(AutotaskGridSystem||(AutotaskGridSystem={})),function(t){var e=function(){function t(t){this._continueDelegate=t}return t.prototype.continueChange=function(){this._continueDelegate()},t}();t.SingleDataSelectorEditCellChangeEventArgs=e}(AutotaskGridSystem||(AutotaskGridSystem={})),function(t){var e=function(){function t(t){this._continueDelegate=t}return t.prototype.continueChange=function(){this._continueDelegate()},t}();t.SingleItemSelectorEditCellChangeEventArgs=e}(AutotaskGridSystem||(AutotaskGridSystem={})),function(t){var e=function(){function t(t){this._continueDelegate=t}return t.prototype.continueChange=function(){this._continueDelegate()},t}();t.StandardColorSelectorEditCellChangeEventArgs=e}(AutotaskGridSystem||(AutotaskGridSystem={})),function(t){var e=function(){function t(t){this._continueDelegate=t}return t.prototype.continueChange=function(){this._continueDelegate()},t}();t.TextAreaEditCellChangeEventArgs=e}(AutotaskGridSystem||(AutotaskGridSystem={})),function(t){var e=function(){function t(t){this._continueDelegate=t}return t.prototype.continueChange=function(){this._continueDelegate()},t}();t.TextBoxEditCellChangeEventArgs=e}(AutotaskGridSystem||(AutotaskGridSystem={})),function(t){var e=function(){function t(t){this._continueDelegate=t}return t.prototype.continueChange=function(){this._continueDelegate()},t}();t.TimeBoxEditCellChangeEventArgs=e}(AutotaskGridSystem||(AutotaskGridSystem={})),function(t){var e=function(t){function e(e,n){var i=t.call(this,e)||this;return i._instanceTrackerContainerId=n,i._isContentLoaded=!1,i._instanceTracker=null,i}return __extends(e,t),e.prototype.__clear=function(){this._isContentLoaded&&this._instanceTracker.__clear(),this._isContentLoaded=!1},e.prototype.__dispose=function(){this._instanceTracker.__dispose(),this._isContentLoaded=!1},e.prototype.__initialize=function(){this._instanceTracker=new Autotask.InstanceTracker(this._instanceTrackerContainerId,this._instanceTrackerContainerId)},e.prototype.__loadHtmlAndJavaScript=function(t,e){this._instanceTracker.__loadHtmlAndJavaScript(t,e),this._isContentLoaded=!0},e}(Autotask.LifecycleObject);t.ContextMenuInstanceTrackerCoordinator=e}(AutotaskGridSystem||(AutotaskGridSystem={})),function(t){var e=function(e){function n(t,n,i,o){var a=e.call(this,t)||this;return a._checkbox=n,a._changeHandler=i,a._gridId=o,a}return __extends(n,e),n.prototype.dispatchChangeEvent=function(e){var n=new t.CheckboxEditCellChangeEventArgs(e);this._changeHandler(n)},n.prototype.__initialize=function(){autotask.find(this._gridId).__registerEditCellChangeEventDispatcher(this._checkbox,this)},n}(Autotask.LifecycleObject);t.CheckboxEditCellChangeEventDispatcher=e}(AutotaskGridSystem||(AutotaskGridSystem={})),function(t){var e=function(e){function n(t,n,i,o){var a=e.call(this,t)||this;return a._currencyBoxId=n,a._changeHandler=i,a._gridId=o,a}return __extends(n,e),n.prototype.dispatchChangeEvent=function(e){var n=new t.CurrencyBoxEditCellChangeEventArgs(e);this._changeHandler(n)},n.prototype.__initialize=function(){autotask.find(this._gridId).__registerEditCellChangeEventDispatcher(this._currencyBoxId,this)},n}(Autotask.LifecycleObject);t.CurrencyBoxEditCellChangeEventDispatcher=e}(AutotaskGridSystem||(AutotaskGridSystem={})),function(t){var e=function(e){function n(t,n,i,o){var a=e.call(this,t)||this;return a._dateBoxId=n,a._changeHandler=i,a._gridId=o,a}return __extends(n,e),n.prototype.dispatchChangeEvent=function(e){var n=new t.DateBoxEditCellChangeEventArgs(e);this._changeHandler(n)},n.prototype.__initialize=function(){autotask.find(this._gridId).__registerEditCellChangeEventDispatcher(this._dateBoxId,this)},n}(Autotask.LifecycleObject);t.DateBoxEditCellChangeEventDispatcher=e}(AutotaskGridSystem||(AutotaskGridSystem={})),function(t){var e=function(e){function n(t,n,i,o){var a=e.call(this,t)||this;return a._decimalBoxId=n,a._changeHandler=i,a._gridId=o,a}return __extends(n,e),n.prototype.dispatchChangeEvent=function(e){var n=new t.DecimalBoxEditCellChangeEventArgs(e);this._changeHandler(n)},n.prototype.__initialize=function(){autotask.find(this._gridId).__registerEditCellChangeEventDispatcher(this._decimalBoxId,this)},n}(Autotask.LifecycleObject);t.DecimalBoxEditCellChangeEventDispatcher=e}(AutotaskGridSystem||(AutotaskGridSystem={})),function(t){var e=function(e){function n(t,n,i,o){var a=e.call(this,t)||this;return a._dropDownListId=n,a._changeHandler=i,a._gridId=o,a}return __extends(n,e),n.prototype.dispatchChangeEvent=function(e){var n=new t.DropDownListEditCellChangeEventArgs(e);this._changeHandler(n)},n.prototype.__initialize=function(){autotask.find(this._gridId).__registerEditCellChangeEventDispatcher(this._dropDownListId,this)},n}(Autotask.LifecycleObject);t.DropDownListEditCellChangeEventDispatcher=e}(AutotaskGridSystem||(AutotaskGridSystem={})),function(t){var e=function(e){function n(t,n,i,o){var a=e.call(this,t)||this;return a._emailAreaId=n,a._changeHandler=i,a._gridId=o,a}return __extends(n,e),n.prototype.dispatchChangeEvent=function(e){var n=new t.EmailAreaEditCellChangeEventArgs(e);this._changeHandler(n)},n.prototype.__initialize=function(){autotask.find(this._gridId).__registerEditCellChangeEventDispatcher(this._emailAreaId,this)},n}(Autotask.LifecycleObject);t.EmailAreaEditCellChangeEventDispatcher=e}(AutotaskGridSystem||(AutotaskGridSystem={})),function(t){var e=function(e){function n(t,n,i,o){var a=e.call(this,t)||this;return a._integerBoxId=n,a._changeHandler=i,a._gridId=o,a}return __extends(n,e),n.prototype.dispatchChangeEvent=function(e){var n=new t.IntegerBoxEditCellChangeEventArgs(e);this._changeHandler(n)},n.prototype.__initialize=function(){autotask.find(this._gridId).__registerEditCellChangeEventDispatcher(this._integerBoxId,this)},n}(Autotask.LifecycleObject);t.IntegerBoxEditCellChangeEventDispatcher=e}(AutotaskGridSystem||(AutotaskGridSystem={})),function(t){var e=function(e){function n(t,n,i,o){var a=e.call(this,t)||this;return a._multipleDataSelectorId=n,a._changeHandler=i,a._gridId=o,a}return __extends(n,e),n.prototype.dispatchChangeEvent=function(e){var n=new t.MultipleDataSelectorEditCellChangeEventArgs(e);this._changeHandler(n)},n.prototype.__initialize=function(){autotask.find(this._gridId).__registerEditCellChangeEventDispatcher(this._multipleDataSelectorId,this)},n}(Autotask.LifecycleObject);t.MultipleDataSelectorEditCellChangeEventDispatcher=e}(AutotaskGridSystem||(AutotaskGridSystem={})),function(t){var e=function(e){function n(t,n,i,o){var a=e.call(this,t)||this;return a._multipleDataSelectorId=n,a._changeHandler=i,a._gridId=o,a}return __extends(n,e),n.prototype.dispatchChangeEvent=function(e){var n=new t.MultipleDataSelectorEditCellChangeEventArgs(e);this._changeHandler(n)},n.prototype.__initialize=function(){autotask.find(this._gridId).__registerEditCellChangeEventDispatcher(this._multipleDataSelectorId,this)},n}(Autotask.LifecycleObject);t.MultipleItemSelectorEditCellChangeEventDispatcher=e}(AutotaskGridSystem||(AutotaskGridSystem={})),function(t){var e=function(e){function n(t,n,i,o){var a=e.call(this,t)||this;return a._percentageBoxId=n,a._changeHandler=i,a._gridId=o,a}return __extends(n,e),n.prototype.dispatchChangeEvent=function(e){var n=new t.PercentageBoxEditCellChangeEventArgs(e);this._changeHandler(n)},n.prototype.__initialize=function(){autotask.find(this._gridId).__registerEditCellChangeEventDispatcher(this._percentageBoxId,this)},n}(Autotask.LifecycleObject);t.PercentageBoxEditCellChangeEventDispatcher=e}(AutotaskGridSystem||(AutotaskGridSystem={})),function(t){var e=function(e){function n(t,n,i,o){var a=e.call(this,t)||this;return a._singleDataSelectorId=n,a._changeHandler=i,a._gridId=o,a}return __extends(n,e),n.prototype.dispatchChangeEvent=function(e){var n=new t.SingleDataSelectorEditCellChangeEventArgs(e);this._changeHandler(n)},n.prototype.__initialize=function(){autotask.find(this._gridId).__registerEditCellChangeEventDispatcher(this._singleDataSelectorId,this)},n}(Autotask.LifecycleObject);t.SingleDataSelectorEditCellChangeEventDispatcher=e}(AutotaskGridSystem||(AutotaskGridSystem={})),function(t){var e=function(e){function n(t,n,i,o){var a=e.call(this,t)||this;return a._itemSelectorId=n,a._changeHandler=i,a._gridId=o,a}return __extends(n,e),n.prototype.dispatchChangeEvent=function(e){var n=new t.SingleItemSelectorEditCellChangeEventArgs(e);this._changeHandler(n)},n.prototype.__initialize=function(){autotask.find(this._gridId).__registerEditCellChangeEventDispatcher(this._itemSelectorId,this)},n}(Autotask.LifecycleObject);t.SingleItemSelectorEditCellChangeEventDispatcher=e}(AutotaskGridSystem||(AutotaskGridSystem={})),function(t){var e=function(e){function n(t,n,i,o){var a=e.call(this,t)||this;return a._colorSelectorId=n,a._changeHandler=i,a._gridId=o,a}return __extends(n,e),n.prototype.dispatchChangeEvent=function(e){var n=new t.StandardColorSelectorEditCellChangeEventArgs(e);this._changeHandler(n)},n.prototype.__initialize=function(){autotask.find(this._gridId).__registerEditCellChangeEventDispatcher(this._colorSelectorId,this)},n}(Autotask.LifecycleObject);t.StandardColorSelectorEditCellChangeEventDispatcher=e}(AutotaskGridSystem||(AutotaskGridSystem={})),function(t){var e=function(e){function n(t,n,i,o){var a=e.call(this,t)||this;return a._textAreaId=n,a._changeHandler=i,a._gridId=o,a}return __extends(n,e),n.prototype.dispatchChangeEvent=function(e){var n=new t.TextAreaEditCellChangeEventArgs(e);this._changeHandler(n)},n.prototype.__initialize=function(){autotask.find(this._gridId).__registerEditCellChangeEventDispatcher(this._textAreaId,this)},n}(Autotask.LifecycleObject);t.TextAreaEditCellChangeEventDispatcher=e}(AutotaskGridSystem||(AutotaskGridSystem={})),function(t){var e=function(e){function n(t,n,i,o){var a=e.call(this,t)||this;return a._textBoxId=n,a._changeHandler=i,a._gridId=o,a}return __extends(n,e),n.prototype.dispatchChangeEvent=function(e){var n=new t.TextBoxEditCellChangeEventArgs(e);this._changeHandler(n)},n.prototype.__initialize=function(){autotask.find(this._gridId).__registerEditCellChangeEventDispatcher(this._textBoxId,this)},n}(Autotask.LifecycleObject);t.TextBoxEditCellChangeEventDispatcher=e}(AutotaskGridSystem||(AutotaskGridSystem={})),function(t){var e=function(e){function n(t,n,i,o){var a=e.call(this,t)||this;return a._timeBoxId=n,a._changeHandler=i,a._gridId=o,a}return __extends(n,e),n.prototype.dispatchChangeEvent=function(e){var n=new t.TimeBoxEditCellChangeEventArgs(e);this._changeHandler(n)},n.prototype.__initialize=function(){autotask.find(this._gridId).__registerEditCellChangeEventDispatcher(this._timeBoxId,this)},n}(Autotask.LifecycleObject);t.TimeBoxEditCellChangeEventDispatcher=e}(AutotaskGridSystem||(AutotaskGridSystem={})),function(t){var e=function(t){function e(e,n){var i=t.call(this,e)||this;return i._parentId=n,i}return __extends(e,t),e.prototype.__initialize=function(){autotask.find(this._parentId).__addImmutableData(this)},e}(Autotask.LifecycleObject);t.ImmutableData=e}(AutotaskImmutableDataSystem||(AutotaskImmutableDataSystem={})),function(t){var e=function(t){function e(e,n,i,o){var a=t.call(this,e,n)||this;return a._bindingPropertyName=i,a._value=o,a}return __extends(e,t),Object.defineProperty(e.prototype,"requestData",{get:function(){var t={};if(null!==this._value){var e="false";this._value&&(e="true"),t[this._bindingPropertyName]=e}return t},enumerable:!1,configurable:!0}),e}(t.ImmutableData);t.BooleanData=e}(AutotaskImmutableDataSystem||(AutotaskImmutableDataSystem={})),function(t){var e=function(t){function e(e,n,i){var o=t.call(this,e,n)||this;return o._bindingPropertyName=i,o}return __extends(e,t),Object.defineProperty(e.prototype,"requestData",{get:function(){return this._createRequestData()},enumerable:!1,configurable:!0}),e.prototype._createRequestData=function(){var t={};return t[this._bindingPropertyName.concat(AutotaskRequestDataSystem.RequestData.TypeCodeSuffix)]=AutotaskRequestDataSystem.TypeCode.NullableDate,t},e}(t.ImmutableData);t.DateData=e}(AutotaskImmutableDataSystem||(AutotaskImmutableDataSystem={})),function(t){var e=function(t){function e(e,n,i){var o=t.call(this,e,n)||this;return o._bindingPropertyName=i,o}return __extends(e,t),Object.defineProperty(e.prototype,"requestData",{get:function(){return this._createRequestData()},enumerable:!1,configurable:!0}),e.prototype._createRequestData=function(){var t={};return t[this._bindingPropertyName.concat(AutotaskRequestDataSystem.RequestData.TypeCodeSuffix)]=AutotaskRequestDataSystem.TypeCode.NullableDecimal,t},e}(t.ImmutableData);t.DecimalData=e}(AutotaskImmutableDataSystem||(AutotaskImmutableDataSystem={})),function(t){var e=function(t){function e(e,n,i){var o=t.call(this,e,n)||this;return o._bindingPropertyName=i,o}return __extends(e,t),Object.defineProperty(e.prototype,"requestData",{get:function(){return this._createRequestData()},enumerable:!1,configurable:!0}),e.prototype._createRequestData=function(){var t={};return t[this._bindingPropertyName.concat(AutotaskRequestDataSystem.RequestData.TypeCodeSuffix)]=AutotaskRequestDataSystem.TypeCode.NullableInteger,t},e}(t.ImmutableData);t.IntegerData=e}(AutotaskImmutableDataSystem||(AutotaskImmutableDataSystem={})),function(t){var e=function(t){function e(e,n,i){var o=t.call(this,e,n)||this;return o._bindingPropertyName=i,o}return __extends(e,t),Object.defineProperty(e.prototype,"requestData",{get:function(){return this._createRequestData()},enumerable:!1,configurable:!0}),e.prototype._createRequestData=function(){var t={};return t[this._bindingPropertyName.concat(AutotaskRequestDataSystem.RequestData.TypeCodeSuffix)]=AutotaskRequestDataSystem.TypeCode.ItemValue,t},e}(t.ImmutableData);t.ItemValueCollectionData=e}(AutotaskImmutableDataSystem||(AutotaskImmutableDataSystem={})),function(t){var e=function(t){function e(e,n,i){var o=t.call(this,e,n)||this;return o._bindingPropertyName=i,o}return __extends(e,t),Object.defineProperty(e.prototype,"requestData",{get:function(){return this._createRequestData()},enumerable:!1,configurable:!0}),e.prototype._createRequestData=function(){var t={};return t[this._bindingPropertyName.concat(AutotaskRequestDataSystem.RequestData.TypeCodeSuffix)]=AutotaskRequestDataSystem.TypeCode.ItemValue,t},e}(t.ImmutableData);t.ItemValueData=e}(AutotaskImmutableDataSystem||(AutotaskImmutableDataSystem={})),function(t){var e=function(t){function e(e,n,i){var o=t.call(this,e,n)||this;return o._bindingPropertyName=i,o}return __extends(e,t),Object.defineProperty(e.prototype,"requestData",{get:function(){return this._createRequestData()},enumerable:!1,configurable:!0}),e.prototype._createRequestData=function(){var t={};return t[this._bindingPropertyName.concat(AutotaskRequestDataSystem.RequestData.TypeCodeSuffix)]=AutotaskRequestDataSystem.TypeCode.String,t},e}(t.ImmutableData);t.StringData=e}(AutotaskImmutableDataSystem||(AutotaskImmutableDataSystem={})),function(t){var e=function(){function t(t,e){this._primaryValue=t,this._secondaryValues=e}return Object.defineProperty(t.prototype,"__secondaryValues",{get:function(){return this._secondaryValues},enumerable:!1,configurable:!0}),t.prototype.containsSecondaryValue=function(t){var e=!1;return null!==this._secondaryValues&&this._secondaryValues.hasOwnProperty(t)&&(e=!0),e},t.prototype.get_primaryValue=function(){return this._primaryValue},t.prototype.getSecondaryValue=function(t){return null!==this._secondaryValues&&this._secondaryValues.hasOwnProperty(t)?this._secondaryValues[t]:autotask.throwException("The key parameter provided to the getSecondaryValue method on the ItemValue is invalid.")},t.prototype.__createRequestData=function(t){var e={};if(e[t]=this._primaryValue,null!==this._secondaryValues){var n=0;for(var i in this._secondaryValues)this._secondaryValues.hasOwnProperty(i)&&(e[t+"k"+n.toString(10)]=i,e[t+"v"+n.toString(10)]=this._secondaryValues[i],n++)}return e},t}();t.ItemValue=e}(AutotaskItemSelectionSystem||(AutotaskItemSelectionSystem={})),function(t){var e=function(){function t(t){this._itemValues=null===t?[]:t}return t.prototype.get_itemValues=function(){return this._itemValues},t.prototype.__createRequestData=function(t){for(var e,n={},i=0;i<this._itemValues.length;i++)for(var o in e=this._itemValues[i].__createRequestData(t+"["+i.toString(10)+"]"))e.hasOwnProperty(o)&&(n[o]=e[o]);return n},t}();t.ItemValueCollection=e}(AutotaskItemSelectionSystem||(AutotaskItemSelectionSystem={})),function(t){!function(t){t.equals=function(t,e){var n;return n=null===t&&null===e||null!==t&&null!==e&&function(t,e){var n=!1;if(t.get_primaryValue()===e.get_primaryValue()){var i=t.__secondaryValues,o=e.__secondaryValues;null===i&&null===o?n=!0:null!==i&&null!==o&&(n=function(t,e){var n=!0;if(Object.keys(t).length===Object.keys(e).length)for(var i in t)if(t.hasOwnProperty(i)&&t[i]!==e[i]){n=!1;break}return n}(i,o))}return n}(t,e),n}}(t.ItemValueComparer||(t.ItemValueComparer={}))}(AutotaskItemSelectionSystem||(AutotaskItemSelectionSystem={})),function(t){!function(t){t.compare=function(t,e){var n=0,i=t.get_primaryValue(),o=e.get_primaryValue();return i!==o&&(n=i<o?-1:1),n}}(t.ItemValueSorter||(t.ItemValueSorter={}))}(AutotaskItemSelectionSystem||(AutotaskItemSelectionSystem={})),function(t){var e=function(t){function e(e,n,i){var o=t.call(this,e)||this;return o._containerElement=AutotaskDomSystem.Document.getElementById(e),o._requiredIndicatorElement=AutotaskDomSystem.Document.getChildElementByClassName(o._containerElement,"Required"),o._textElement=AutotaskDomSystem.Document.getChildElementByClassName(o._containerElement,"Text"),o._textElement.addEventListener("click",(function(){o._clickListener()})),o._textElement.addEventListener("mousedown",(function(){o._mouseDownListener()})),o._textElement.addEventListener("mouseenter",(function(){o._mouseEnterListener()})),o._textElement.addEventListener("mouseleave",(function(){o._mouseLeaveListener()})),o._textElement.addEventListener("mouseup",(function(){o._mouseUpListener()})),o._activeCssClass="Active",o._clickEnabledCssClass="ClickEnabled",o._invalidCssClass="Invalid",o._isEnabled=i,o._clickHandlers=[],null!==n&&o._clickHandlers.push(n),o._mouseDownHandler=null,o._mouseEnterHandler=null,o._mouseLeaveHandler=null,o._mouseUpHandler=null,o}return __extends(e,t),Object.defineProperty(e.prototype,"isEnabled",{get:function(){return this._isEnabled},set:function(t){t!==this._isEnabled&&(this._isEnabled=t,this._textElement.classList.toggle("Disabled"))},enumerable:!1,configurable:!0}),e.prototype.addClickHandler=function(t){this._textElement.classList.add(this._clickEnabledCssClass),this._clickHandlers.push(t)},e.prototype.updateRequiredIndicatorVisibility=function(t){t?this._requiredIndicatorElement.classList.add(this._activeCssClass):this._requiredIndicatorElement.classList.remove(this._activeCssClass)},e.prototype.updateIndicationOfValidity=function(t){t?this._containerElement.classList.remove(this._invalidCssClass):this._containerElement.classList.add(this._invalidCssClass)},e.prototype.setMouseDownHandler=function(t){this._mouseDownHandler=t},e.prototype.setMouseEnterHandler=function(t){this._mouseEnterHandler=t},e.prototype.setMouseLeaveHandler=function(t){this._mouseLeaveHandler=t},e.prototype.setMouseUpHandler=function(t){this._mouseUpHandler=t},e.prototype._clickListener=function(){if(this._isEnabled&&this._clickHandlers.length>0)for(var t=0,e=this._clickHandlers;t<e.length;t++){(0,e[t])()}},e.prototype._mouseDownListener=function(){null!==this._mouseDownHandler&&this._isEnabled&&this._mouseDownHandler()},e.prototype._mouseEnterListener=function(){null!==this._mouseEnterHandler&&this._isEnabled&&this._mouseEnterHandler()},e.prototype._mouseLeaveListener=function(){null!==this._mouseLeaveHandler&&this._isEnabled&&this._mouseLeaveHandler()},e.prototype._mouseUpListener=function(){null!==this._mouseUpHandler&&this._isEnabled&&this._mouseUpHandler()},e}(Autotask.LifecycleObject);t.Label=e}(AutotaskLabel||(AutotaskLabel={})),function(t){var e=function(t){function e(e,n,i){var o=t.call(this,e)||this;return o._labelId=n,o._participantId=i,o}return __extends(e,t),e.prototype.__registerHandlers=function(){var t=autotask.find(this._labelId),e=autotask.find(this._participantId);e.participantValidation.addValidationCorrectedHandler((function(){t.updateIndicationOfValidity(!0)})),e.participantValidation.addValidationFailedHandler((function(){t.updateIndicationOfValidity(!1)})),e.participantValidation.addRequiredStateChangedHandler((function(e){t.updateRequiredIndicatorVisibility(e.isRequired)}))},e}(Autotask.LifecycleObject);t.LabelValidationCoordinator=e}(AutotaskLabel||(AutotaskLabel={})),function(t){var e=function(){function t(){var t=this;window.addEventListener("resize",(function(){t._windowResizeHandler()})),this._visibleOverlays=[]}return t.prototype.__determineIfElementIsWithinContextOverlay=function(t){return null!==t.closest(".ContextOverlay")},t.prototype.__hideIfEventOccursOutsideContextOverlay=function(t){!(void 0!==t.touches&&t.touches.length>1)&&this._isEventInVisibleContextOverlay(t)||this.__hideVisibleContextOverlays()},t.prototype.__hideVisibleContextOverlays=function(){for(;this._visibleOverlays.length>0;)this._visibleOverlays[this._visibleOverlays.length-1].__hideWithoutDelay()},t.prototype.__registerVisibleContextOverlay=function(t,e){if(this._visibleOverlays.indexOf(t)<0)for(var n=0,i=this._visibleOverlays;n<i.length;n++){var o=i[n];e.indexOf(o)<0&&o.__hideWithoutDelay()}this._visibleOverlays.push(t)},t.prototype.__unregisterVisibleContextOverlay=function(t){var e=this._visibleOverlays.indexOf(t);e>-1&&this._visibleOverlays.splice(e,1)},t.prototype._isEventInVisibleContextOverlay=function(t){var e=!1;if(null!==t.target&&t.target instanceof HTMLElement)for(var n=0,i=this._visibleOverlays;n<i.length;n++){if(i[n].isElementAssociated(t.target)){e=!0;break}}return e},t.prototype._windowResizeHandler=function(){this.__hideVisibleContextOverlays()},t}();t.ContextOverlayManagement=e}(AutotaskOverlaySystem||(AutotaskOverlaySystem={})),function(t){var e=function(){function t(t){this._overlayElementStyleApplicator=t,this._activeCssClass="Active",this._isVisible=!1,this._launchingElementStyleApplicator=null}return t.prototype.applyPosition=function(t,e,n,i){this._launchingElementStyleApplicator=e,null!==i&&(this._launchingElementStyleApplicator.reset(),this._launchingElementStyleApplicator.addCssClass(i)),null!==n&&(this._overlayElementStyleApplicator.reset(),this._isVisible&&this._overlayElementStyleApplicator.addCssClass(this._activeCssClass),this._overlayElementStyleApplicator.addCssClass(n)),this._overlayElementStyleApplicator.setLeftValue(t.leftValue),this._overlayElementStyleApplicator.setTopValue(t.topValue)},t.prototype.hide=function(){this._overlayElementStyleApplicator.reset(),null!==this._launchingElementStyleApplicator&&(this._launchingElementStyleApplicator.reset(),this._launchingElementStyleApplicator=null),this._isVisible=!1},t.prototype.show=function(){this._isVisible||(this._overlayElementStyleApplicator.addCssClass(this._activeCssClass),this._isVisible=!0)},t}();t.DefaultStyleCoordinator=e}(AutotaskOverlaySystem||(AutotaskOverlaySystem={})),function(t){var e=function(){function e(t){this._element=t}return e.prototype.analyzeSize=function(){return new t.ElementSizeTelemetry(this._element.offsetHeight,this._element.offsetWidth)},e.prototype.analyzeLocation=function(e,n){var i=this._element.getBoundingClientRect();return new t.LocationTelemetry(i.top,n-i.right,e-i.bottom,i.left)},e.prototype.isDescendant=function(t){return this._element.contains(t)},e.prototype.isSameElement=function(t){return this._element.isSameNode(t)},e}();t.ElementAnalyzer=e}(AutotaskOverlaySystem||(AutotaskOverlaySystem={})),function(t){var e=function(){function t(t,e){(t<=0||e<=0)&&autotask.throwException("Both height and width must be greater than zero."),this._height=t,this._width=e}return Object.defineProperty(t.prototype,"height",{get:function(){return this._height},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){return this._width},enumerable:!1,configurable:!0}),t}();t.ElementSizeTelemetry=e}(AutotaskOverlaySystem||(AutotaskOverlaySystem={})),function(t){var e=function(){function t(t){this._element=t,this._cssClasses=[],this._isLeftSet=!1,this._isTopSet=!1}return t.prototype.addCssClass=function(t){this._element.classList.add(t),this._cssClasses.push(t)},t.prototype.reset=function(){for(var t=0,e=this._cssClasses;t<e.length;t++){var n=e[t];this._element.classList.remove(n)}this._isLeftSet&&this._element.style.removeProperty("left"),this._isTopSet&&this._element.style.removeProperty("top")},t.prototype.setLeftValue=function(t){this._element.style.left=t.toString()+"px",this._isLeftSet=!0},t.prototype.setTopValue=function(t){this._element.style.top=t.toString()+"px",this._isTopSet=!0},t}();t.ElementStyleApplicator=e}(AutotaskOverlaySystem||(AutotaskOverlaySystem={})),function(t){var e=function(){function t(t,e,n){var i=this;this._contextOverlayElement=t,this._showHandler=e,this._hideHandler=n,this._isPointerEvent=!1,this._isTouchEvent=!1,this._clickListener=function(){i._click()},this._mouseEnterListener=function(){i._mouseEnter()},this._mouseLeaveListener=function(){i._mouseLeave()},this._touchStartListener=function(){i._touchStart()},this._touchEndListener=function(){i._touchEnd()},this._pointerOverListener=function(t){i._pointerOver(t)},this._contextOverlayElement.addEventListener("click",this._clickListener),this._contextOverlayElement.addEventListener("mouseenter",this._mouseEnterListener),this._contextOverlayElement.addEventListener("mouseleave",this._mouseLeaveListener),window.autotask.browserDetection.isInternetExplorer()?this._contextOverlayElement.addEventListener("pointerover",this._pointerOverListener):(this._contextOverlayElement.addEventListener("touchstart",this._touchStartListener,{passive:!0}),this._contextOverlayElement.addEventListener("touchend",this._touchEndListener))}return t.prototype.__dispose=function(){this._contextOverlayElement.removeEventListener("click",this._clickListener),this._contextOverlayElement.removeEventListener("mouseenter",this._mouseEnterListener),this._contextOverlayElement.removeEventListener("mouseleave",this._mouseLeaveListener),window.autotask.browserDetection.isInternetExplorer()?this._contextOverlayElement.removeEventListener("pointerover",this._pointerOverListener):(this._contextOverlayElement.removeEventListener("touchstart",this._touchStartListener),this._contextOverlayElement.removeEventListener("touchend",this._touchEndListener))},t.prototype._click=function(){this._isTouchEvent=!1},t.prototype._mouseEnter=function(){this._isTouchEvent||(this._isPointerEvent?this._hideHandler():this._showHandler())},t.prototype._mouseLeave=function(){this._isTouchEvent||this._isPointerEvent||this._hideHandler(),this._isPointerEvent=!1},t.prototype._pointerOver=function(t){"mouse"!==t.pointerType&&(this._isPointerEvent=!0)},t.prototype._touchEnd=function(){this._showHandler()},t.prototype._touchStart=function(){this._isTouchEvent=!0},t}();t.InteractionEventsCoordinator=e}(AutotaskOverlaySystem||(AutotaskOverlaySystem={})),function(t){var e=function(){function t(t,e){this._x=t,this._y=e}return Object.defineProperty(t.prototype,"x",{get:function(){return this._x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"y",{get:function(){return this._y},enumerable:!1,configurable:!0}),t.prototype.equals=function(t){return this._x===t.x&&this._y===t.y},t}();t.LaunchingPoint=e}(AutotaskOverlaySystem||(AutotaskOverlaySystem={})),function(t){var e=function(){function e(t){this._launchingPoint=t}return e.prototype.analyzeLocation=function(e,n){return new t.LocationTelemetry(this._launchingPoint.y,n-this._launchingPoint.x,e-this._launchingPoint.y,this._launchingPoint.x)},e}();t.LaunchingPointAnalyzer=e}(AutotaskOverlaySystem||(AutotaskOverlaySystem={})),function(t){var e=function(){function t(t,e,n,i){this._distanceToTopEdge=t,this._distanceToRightEdge=e,this._distanceToBottomEdge=n,this._distanceToLeftEdge=i}return Object.defineProperty(t.prototype,"distanceToBottomEdge",{get:function(){return this._distanceToBottomEdge},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"distanceToLeftEdge",{get:function(){return this._distanceToLeftEdge},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"distanceToRightEdge",{get:function(){return this._distanceToRightEdge},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"distanceToTopEdge",{get:function(){return this._distanceToTopEdge},enumerable:!1,configurable:!0}),t}();t.LocationTelemetry=e}(AutotaskOverlaySystem||(AutotaskOverlaySystem={})),function(t){var e=function(){function t(){this._positions=[],this._applicators=[]}return t.prototype.addPositionAndApplicator=function(t,e){this._positions.push(t),this._applicators.push(e)},t.prototype.applyPosition=function(e,n){0===this._positions.length&&autotask.throwException("There needs to be at least one position.");for(var i=t._createTelemetrySnapshot(e,n),o=!1,a=0;a<this._positions.length;a++){var r=this._positions[a];if(r.determineFeasibility(i)){var s=r.createPositionData(i);this._applicators[a].applyPosition(s),o=!0;break}}if(!o){var l=this._positions[0],u=this._applicators[0];s=l.createPositionData(i);u.applyPosition(s)}},t._createTelemetrySnapshot=function(t,e){var n=window.document.documentElement.clientHeight,i=window.document.documentElement.clientWidth,o=t.analyzeSize(),a=t.analyzeLocation(n,i),r=e.analyzeSize();return new AutotaskPositionSystem.TelemetrySnapshot(o,a,r,n,i)},t}();t.PositionCoordinator=e}(AutotaskOverlaySystem||(AutotaskOverlaySystem={})),function(t){var e=function(){function t(){this._allowedConcurrentOverlays=[]}return Object.defineProperty(t.prototype,"allowedConcurrentOverlays",{get:function(){return Object.freeze(this._allowedConcurrentOverlays.slice())},enumerable:!1,configurable:!0}),t.prototype.allowConcurrentOverlay=function(t){this._allowedConcurrentOverlays.push(t)},t}();t.ShowingEventArgs=e}(AutotaskOverlaySystem||(AutotaskOverlaySystem={})),function(t){var e=function(){function t(){this._positions=[],this._applicators=[]}return t.prototype.addPositionAndApplicator=function(t,e){this._positions.push(t),this._applicators.push(e)},t.prototype.applyPosition=function(e,n){0===this._positions.length&&autotask.throwException("There needs to be at least one position.");for(var i=t._createTelemetrySnapshot(e,n),o=!1,a=0;a<this._positions.length;a++){var r=this._positions[a];if(r.determineFeasibility(i)){var s=r.createPositionData(i);this._applicators[a].applyPosition(s),o=!0;break}}if(!o){var l=this._positions[0],u=this._applicators[0];s=l.createPositionData(i);u.applyPosition(s)}},t._createTelemetrySnapshot=function(t,e){var n=window.document.documentElement.clientHeight,i=window.document.documentElement.clientWidth,o=t.analyzeLocation(n,i),a=e.analyzeSize();return new AutotaskSinglePointPositionSystem.TelemetrySnapshot(a,o,n,i)},t}();t.SinglePointPositionCoordinator=e}(AutotaskOverlaySystem||(AutotaskOverlaySystem={})),function(t){var e=function(e){function n(n,i,o){var a=e.call(this,n)||this;a._isVisible=!1,a._hideTimer=new t.SinglePointTimer((function(){a._onHiding()})),a._showTimer=new t.SinglePointTimer((function(){a._onShowing()})),a._hidingHandlers=new Array,a._hideCompletedHandlers=new Array,a._positioningHandlers=new Array,a._launchingPoint=null,a._showingHandlers=new Array,a._showCompletedHandlers=new Array;var r=AutotaskDomSystem.Document.getElementById(i),s=AutotaskDomSystem.Document.getChildElementByClassName(r,"ContextOverlay");return a._overlayElement=s,a._overlayElementAnalyzer=new t.ElementAnalyzer(s),a._overlayStyleApplicator=new t.ElementStyleApplicator(s),o&&(s.addEventListener("mouseenter",(function(){a._mouseEnterListener()})),s.addEventListener("mouseleave",(function(){a._mouseLeaveListener()}))),a}return __extends(n,e),Object.defineProperty(n.prototype,"isVisible",{get:function(){return this._isVisible},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"_overlayElementStyleApplicator",{get:function(){return this._overlayStyleApplicator},enumerable:!1,configurable:!0}),n.prototype.addHidingHandler=function(t){this._hidingHandlers.push(t)},n.prototype.addHideCompletedHandler=function(t){this._hideCompletedHandlers.push(t)},n.prototype.addPositioningHandler=function(t){this._positioningHandlers.push(t)},n.prototype.addShowingHandler=function(t){this._showingHandlers.push(t)},n.prototype.addShowCompletedHandler=function(t){this._showCompletedHandlers.push(t)},n.prototype.clearShowingHandlers=function(){this._showingHandlers=[]},n.prototype.hide=function(){this._showTimer.isRunning&&this._showTimer.cancel(),this._isVisible&&!this._hideTimer.isRunning&&this._hideTimer.start(this._delayBeforeHiding,this._launchingPoint)},n.prototype.isElementAssociated=function(t){return this._overlayElementAnalyzer.isSameElement(t)||this._overlayElementAnalyzer.isDescendant(t)},n.prototype.__dispose=function(){this._showTimer.isRunning?this._showTimer.cancel():this._hideTimer.isRunning&&this._hideTimer.cancel()},n.prototype.__hideWithoutDelay=function(){this._showTimer.isRunning?this._showTimer.cancel():this._hideTimer.isRunning&&this._hideTimer.cancel(),this._onHiding()},n.prototype.__reposition=function(){this._isVisible&&this._onPositioning(!0)},n.prototype._getChildElementByClassName=function(t){return AutotaskDomSystem.Document.getChildElementByClassName(this._overlayElement,t)},n.prototype._show=function(e,i){var o=new t.LaunchingPoint(e,i);this._showTimer.isRunning?n._equalLaunchingPoints(o,this._showTimer.associatedPoint)||(this._showTimer.cancel(),this._isVisible&&n._equalLaunchingPoints(o,this._launchingPoint)||this._startShowTimer(o)):this._hideTimer.isRunning?n._equalLaunchingPoints(o,this._hideTimer.associatedPoint)?this._hideTimer.cancel():(this._hideTimer.cancel(),this._makeInvisible(),this._startShowTimer(o)):this._isVisible&&n._equalLaunchingPoints(o,this._launchingPoint)||this._startShowTimer(o)},n._equalLaunchingPoints=function(t,e){return null===t&&null===e||null!==t&&null!==e&&t.equals(e)},n.prototype._makeInvisible=function(){this._styleCoordinator.hide(),this._isVisible=!1,window.autotask.contextOverlayManagement.__unregisterVisibleContextOverlay(this)},n.prototype._makeVisible=function(t){this._styleCoordinator.show(),this._isVisible=!0,window.autotask.contextOverlayManagement.__registerVisibleContextOverlay(this,t)},n.prototype._mouseEnterListener=function(){this._hideTimer.isRunning&&this._hideTimer.cancel()},n.prototype._mouseLeaveListener=function(){this.hide()},n.prototype._onHiding=function(){for(var t=0,e=this._hidingHandlers;t<e.length;t++){(0,e[t])()}this._makeInvisible(),this._onHideCompleted()},n.prototype._onHideCompleted=function(){for(var t=0,e=this._hideCompletedHandlers;t<e.length;t++){(0,e[t])()}this._launchingPoint=null},n.prototype._onPositioning=function(e){for(var n=0,i=this._positioningHandlers;n<i.length;n++){(0,i[n])()}var o=new t.LaunchingPointAnalyzer(this._launchingPoint);this._createPositionCoordinator().applyPosition(o,this._overlayElementAnalyzer),e||this._onShowCompleted()},n.prototype._onShowing=function(){for(var e=new t.ShowingEventArgs,n=0,i=this._showingHandlers;n<i.length;n++){(0,i[n])(e)}this._makeVisible(e.allowedConcurrentOverlays),this._onPositioning(!1)},n.prototype._onShowCompleted=function(){for(var t=0,e=this._showCompletedHandlers;t<e.length;t++){(0,e[t])()}},n.prototype._startShowTimer=function(t){this._showTimer.start(this._delayBeforeShowing,t),this._launchingPoint=t},n}(Autotask.LifecycleObject);t.SinglePointContextOverlay=e}(AutotaskOverlaySystem||(AutotaskOverlaySystem={})),function(t){var e=function(){function t(t){this._overlayElementStyleApplicator=t,this._activeCssClass="Active",this._isVisible=!1}return t.prototype.applyPosition=function(t,e){null!==e&&this._overlayElementStyleApplicator.addCssClass(e),this._overlayElementStyleApplicator.setLeftValue(t.leftValue),this._overlayElementStyleApplicator.setTopValue(t.topValue)},t.prototype.hide=function(){this._overlayElementStyleApplicator.reset(),this._isVisible=!1},t.prototype.show=function(){this._isVisible||(this._overlayElementStyleApplicator.addCssClass(this._activeCssClass),this._isVisible=!0)},t}();t.SinglePointStyleCoordinator=e}(AutotaskOverlaySystem||(AutotaskOverlaySystem={})),function(t){var e=function(){function t(t){this._callback=t,this._associatedPoint=null,this._timeoutId=null}return Object.defineProperty(t.prototype,"associatedPoint",{get:function(){return this._associatedPoint},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isRunning",{get:function(){return null!==this._associatedPoint},enumerable:!1,configurable:!0}),t.prototype.cancel=function(){this._associatedPoint=null,window.clearTimeout(this._timeoutId)},t.prototype.start=function(t,e){var n=this;this._timeoutId=window.setTimeout((function(){n._finished()}),t),this._associatedPoint=e},t.prototype._finished=function(){this._associatedPoint=null,this._callback()},t}();t.SinglePointTimer=e}(AutotaskOverlaySystem||(AutotaskOverlaySystem={})),function(t){var e=function(){function t(t){this._callback=t,this._associatedElement=null,this._timeoutId=null}return Object.defineProperty(t.prototype,"associatedElement",{get:function(){return this._associatedElement},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isRunning",{get:function(){return null!==this._associatedElement},enumerable:!1,configurable:!0}),t.prototype.cancel=function(){this._associatedElement=null,window.clearTimeout(this._timeoutId)},t.prototype.start=function(t,e){var n=this;this._timeoutId=window.setTimeout((function(){n._finished()}),t),this._associatedElement=e},t.prototype._finished=function(){this._associatedElement=null,this._callback()},t}();t.Timer=e}(AutotaskOverlaySystem||(AutotaskOverlaySystem={})),function(t){var e=function(t){function e(e){var n=t.call(this,e,!0)||this;return n._defaultStyleCoordinator=new AutotaskOverlaySystem.DefaultStyleCoordinator(n._overlayElementStyleApplicator),n}return __extends(e,t),e.prototype.show=function(t){this._show(t)},Object.defineProperty(e.prototype,"_delayBeforeHiding",{get:function(){return 300},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_delayBeforeShowing",{get:function(){return 100},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_styleCoordinator",{get:function(){return this._defaultStyleCoordinator},enumerable:!1,configurable:!0}),e.prototype._createPositionCoordinator=function(t){var e=new AutotaskOverlaySystem.PositionCoordinator,n=new AutotaskPositionSystem.BottomAlignedLeft(0,8),i=new AutotaskPositionApplicatorSystem.Default(this._defaultStyleCoordinator,t,"Bottom","Active");e.addPositionAndApplicator(n,i);var o=new AutotaskPositionSystem.TopAlignedLeft(0,-8),a=new AutotaskPositionApplicatorSystem.Default(this._defaultStyleCoordinator,t,"Top","Active");return e.addPositionAndApplicator(o,a),e},e}(AutotaskOverlaySystem.ContextOverlay);t.AppliedFiltersBadgeContextOverlay=e}(AutotaskOverlays||(AutotaskOverlays={})),function(t){var e=function(t){function e(e,n,i){var o=t.call(this,e,!0)||this;return o._instanceTrackerContainerElement=AutotaskDomSystem.Document.getElementById(n),o._instanceTrackerContainerId=n,o._loadingIndicatorElement=o._getChildElementByClassName("LoadingIndicator"),o._defaultStyleCoordinator=new AutotaskOverlaySystem.DefaultStyleCoordinator(o._overlayElementStyleApplicator),o._activeCssClass="Active",o._instanceTracker=null,o._requestCanceler=null,o.addShowingHandler((function(){o._showingHandler(i)})),o}return __extends(e,t),Object.defineProperty(e.prototype,"isEnabled",{get:function(){return!1},enumerable:!1,configurable:!0}),e.prototype.addTabbingAwayHandler=function(){},e.prototype.focus=function(){},e.prototype.focusEnd=function(){},e.prototype.focusStart=function(){},e.prototype.hideWithoutDelay=function(){this._cancelRequest(),this.__hideWithoutDelay()},e.prototype.show=function(t){this._show(t)},e.prototype.__dispose=function(){t.prototype.__dispose.call(this),this._cancelRequest(),null!==this._instanceTracker&&this._instanceTracker.__dispose()},Object.defineProperty(e.prototype,"_delayBeforeHiding",{get:function(){return 300},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_delayBeforeShowing",{get:function(){return 0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_styleCoordinator",{get:function(){return this._defaultStyleCoordinator},enumerable:!1,configurable:!0}),e.prototype._createPositionCoordinator=function(t){var e=new AutotaskOverlaySystem.PositionCoordinator,n=new AutotaskPositionSystem.BottomAlignedLeft(0,1),i=new AutotaskPositionApplicatorSystem.Default(this._defaultStyleCoordinator,t,null,"Active");e.addPositionAndApplicator(n,i);var o=new AutotaskPositionSystem.BottomAlignedRight(0,1),a=new AutotaskPositionApplicatorSystem.Default(this._defaultStyleCoordinator,t,null,"Active");e.addPositionAndApplicator(o,a);var r=new AutotaskPositionSystem.TopAlignedLeft(0,-1),s=new AutotaskPositionApplicatorSystem.Default(this._defaultStyleCoordinator,t,null,"Active");e.addPositionAndApplicator(r,s);var l=new AutotaskPositionSystem.TopAlignedRight(0,-1),u=new AutotaskPositionApplicatorSystem.Default(this._defaultStyleCoordinator,t,null,"Active");return e.addPositionAndApplicator(l,u),e},e.prototype._cancelRequest=function(){null!==this._requestCanceler&&(this._requestCanceler.__cancelRequest(),this._requestCanceler=null)},e.prototype._routeSuccessHandler=function(t,e){this._requestCanceler=null,null===this._instanceTracker&&(this._instanceTracker=new Autotask.InstanceTracker(this._instanceTrackerContainerId,this._instanceTrackerContainerId)),this._loadingIndicatorElement.classList.remove(this._activeCssClass),this._instanceTracker.__loadHtmlAndJavaScript(t,e),this._instanceTrackerContainerElement.classList.add(this._activeCssClass),this.__reposition()},e.prototype._showingHandler=function(t){var e=this;this._cancelRequest(),null!==this._instanceTracker&&this._instanceTracker.__clear(),this._instanceTrackerContainerElement.classList.remove(this._activeCssClass),this._loadingIndicatorElement.classList.add(this._activeCssClass),this._requestCanceler=t.__makeRequest(null,(function(t,n){e._routeSuccessHandler(t,n)}))},e}(AutotaskOverlaySystem.ContextOverlay);t.ContextMenuButtonContextOverlay=e}(AutotaskOverlays||(AutotaskOverlays={})),function(t){var e=function(t){function e(e){var n=t.call(this,e,!0)||this;return n._defaultStyleCoordinator=new AutotaskOverlaySystem.DefaultStyleCoordinator(n._overlayElementStyleApplicator),n}return __extends(e,t),e.prototype.show=function(t){this._show(t)},Object.defineProperty(e.prototype,"_delayBeforeHiding",{get:function(){return 300},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_delayBeforeShowing",{get:function(){return 0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_styleCoordinator",{get:function(){return this._defaultStyleCoordinator},enumerable:!1,configurable:!0}),e.prototype._createPositionCoordinator=function(t){var e=new AutotaskOverlaySystem.PositionCoordinator,n=new AutotaskPositionSystem.BottomAlignedRight(0,-1),i=new AutotaskPositionApplicatorSystem.Default(this._defaultStyleCoordinator,t,null,"Active");return e.addPositionAndApplicator(n,i),e},e}(AutotaskOverlaySystem.ContextOverlay);t.DashboardContextMenu=e}(AutotaskOverlays||(AutotaskOverlays={})),function(t){var e=function(t){function e(e){var n=t.call(this,e,!0)||this;return n._defaultStyleCoordinator=new AutotaskOverlaySystem.DefaultStyleCoordinator(n._overlayElementStyleApplicator),n}return __extends(e,t),e.prototype.show=function(t){this._show(t)},Object.defineProperty(e.prototype,"_delayBeforeHiding",{get:function(){return 300},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_delayBeforeShowing",{get:function(){return 0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_styleCoordinator",{get:function(){return this._defaultStyleCoordinator},enumerable:!1,configurable:!0}),e.prototype._createPositionCoordinator=function(t){var e=new AutotaskOverlaySystem.PositionCoordinator,n=new AutotaskPositionSystem.BottomAlignedRight(0,-1),i=new AutotaskPositionApplicatorSystem.Default(this._defaultStyleCoordinator,t,null,"Active");return e.addPositionAndApplicator(n,i),e},e}(AutotaskOverlaySystem.ContextOverlay);t.DashboardTabGroupContextMenu=e}(AutotaskOverlays||(AutotaskOverlays={})),function(t){var e=function(e){function n(t,n,i,o,a){var r=e.call(this,t,!0)||this;return r._instanceTrackerContainerElement=AutotaskDomSystem.Document.getElementById(n),r._instanceTrackerContainerId=n,r._isPrimaryPositionEnabled=i,r._loadingIndicatorElement=r._getChildElementByClassName("LoadingIndicator"),r._defaultStyleCoordinator=new AutotaskOverlaySystem.DefaultStyleCoordinator(r._overlayElementStyleApplicator),r._activeCssClass="Active",r._instanceTracker=null,r._requestCanceler=null,null!==o&&r.addShowingHandler((function(){r._showingHandler(o,a)})),r}return __extends(n,e),Object.defineProperty(n.prototype,"isEnabled",{get:function(){return!1},enumerable:!1,configurable:!0}),n.prototype.addTabbingAwayHandler=function(){},n.prototype.focus=function(){},n.prototype.focusEnd=function(){},n.prototype.focusStart=function(){},n.prototype.hideWithoutDelay=function(){this._cancelRequest(),this.__hideWithoutDelay()},n.prototype.show=function(t){this._show(t)},n.prototype.__dispose=function(){e.prototype.__dispose.call(this),this._cancelRequest(),null!==this._instanceTracker&&this._instanceTracker.__dispose()},Object.defineProperty(n.prototype,"_delayBeforeHiding",{get:function(){return 300},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"_delayBeforeShowing",{get:function(){return 0},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"_styleCoordinator",{get:function(){return this._defaultStyleCoordinator},enumerable:!1,configurable:!0}),n.prototype._createPositionCoordinator=function(t){var e,n=new AutotaskOverlaySystem.PositionCoordinator,i=new AutotaskPositionApplicatorSystem.Default(this._defaultStyleCoordinator,t,null,"Active");return e=this._isPrimaryPositionEnabled?new AutotaskPositionSystem.BottomAlignedLeft(0,-1):new AutotaskPositionSystem.BottomAlignedRight(0,-1),n.addPositionAndApplicator(e,i),n},n.prototype._cancelRequest=function(){null!==this._requestCanceler&&(this._requestCanceler.__cancelRequest(),this._requestCanceler=null)},n.prototype._routeSuccessHandler=function(t,e){this._requestCanceler=null,null===this._instanceTracker&&(this._instanceTracker=new Autotask.InstanceTracker(this._instanceTrackerContainerId,this._instanceTrackerContainerId)),this._loadingIndicatorElement.classList.remove(this._activeCssClass),this._instanceTracker.__loadHtmlAndJavaScript(t,e),this._instanceTrackerContainerElement.classList.add(this._activeCssClass),this.__reposition()},n.prototype._showingHandler=function(e,n){return __awaiter(this,void 0,void 0,(function(){var i,o,a=this;return __generator(this,(function(r){switch(r.label){case 0:return this._cancelRequest(),null!==this._instanceTracker&&this._instanceTracker.__clear(),this._instanceTrackerContainerElement.classList.remove(this._activeCssClass),this._loadingIndicatorElement.classList.add(this._activeCssClass),i=null,null===n?[3,2]:(o=new t.DropDownButtonContextOverlayShowingEventArgs,[4,n(o)]);case 1:r.sent(),i=o.data,r.label=2;case 2:return this._requestCanceler=e.__makeRequest(i,(function(t,e){a._routeSuccessHandler(t,e)})),[2]}}))}))},n}(AutotaskOverlaySystem.ContextOverlay);t.DropDownButtonContextOverlay=e}(AutotaskOverlays||(AutotaskOverlays={})),function(t){var e=function(){function t(){this._data=new AutotaskRequestDataSystem.RequestData}return Object.defineProperty(t.prototype,"data",{get:function(){return this._data},enumerable:!1,configurable:!0}),t}();t.DropDownButtonContextOverlayShowingEventArgs=e}(AutotaskOverlays||(AutotaskOverlays={})),function(t){var e=function(t){function e(e,n){var i=t.call(this,e,!0)||this;return i._calendarId=n,i._defaultStyleCoordinator=new AutotaskOverlaySystem.DefaultStyleCoordinator(i._overlayElementStyleApplicator),i._calendar=null,i}return __extends(e,t),Object.defineProperty(e.prototype,"Calendar",{get:function(){return null===this._calendar?autotask.throwException("AutotaskOverlays.GlobalCalendarOverlay.Calendar: unexpected null value."):this._calendar},enumerable:!1,configurable:!0}),e.prototype.__initialize=function(){this._calendar=autotask.find(this._calendarId)},e.prototype.__show=function(t,e,n){this.Calendar.__loadDate(e,n),this._show(t)},Object.defineProperty(e.prototype,"_delayBeforeHiding",{get:function(){return 300},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_delayBeforeShowing",{get:function(){return 0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_styleCoordinator",{get:function(){return this._defaultStyleCoordinator},enumerable:!1,configurable:!0}),e.prototype._createPositionCoordinator=function(t){var e=new AutotaskOverlaySystem.PositionCoordinator,n=new AutotaskPositionApplicatorSystem.Default(this._defaultStyleCoordinator,t,null,null);return e.addPositionAndApplicator(new AutotaskPositionSystem.BottomAlignedLeft(0,0),n),e.addPositionAndApplicator(new AutotaskPositionSystem.TopAlignedLeft(0,0),n),e.addPositionAndApplicator(new AutotaskPositionSystem.BottomAlignedRight(0,0),n),e.addPositionAndApplicator(new AutotaskPositionSystem.TopAlignedRight(0,0),n),e},e}(AutotaskOverlaySystem.ContextOverlay);t.GlobalCalendarOverlay=e}(AutotaskOverlays||(AutotaskOverlays={})),function(t){var e=function(t){function e(e,n){var i=t.call(this,e,!0)||this;return i._defaultStyleCoordinator=new AutotaskOverlaySystem.DefaultStyleCoordinator(i._overlayElementStyleApplicator),i._instanceTracker=new Autotask.InstanceTracker(n,n),i._contentDiv=i._getChildElementByClassName("Content"),i._loadingIndicatorDiv=i._getChildElementByClassName("LoadingIndicator"),i.addHideCompletedHandler((function(){i._showLoadingIndicator()})),i}return __extends(e,t),e.prototype.show=function(t){this._show(t)},e.prototype.__dispose=function(){t.prototype.__dispose.call(this),this._instanceTracker.__dispose()},e.prototype.__loadHtmlAndJavaScript=function(t,e){this._loadingIndicatorDiv.classList.remove("Active"),this._instanceTracker.__loadHtmlAndJavaScript(t,e),this._contentDiv.classList.add("Active"),this.__reposition()},Object.defineProperty(e.prototype,"_delayBeforeHiding",{get:function(){return 300},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_delayBeforeShowing",{get:function(){return 0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_styleCoordinator",{get:function(){return this._defaultStyleCoordinator},enumerable:!1,configurable:!0}),e.prototype._createPositionCoordinator=function(t){var e=new AutotaskOverlaySystem.PositionCoordinator,n=new AutotaskPositionSystem.BottomAlignedLeft(0,0),i=new AutotaskPositionApplicatorSystem.Default(this._defaultStyleCoordinator,t,"Bottom",null);e.addPositionAndApplicator(n,i);var o=new AutotaskPositionSystem.TopAlignedLeft(0,0),a=new AutotaskPositionApplicatorSystem.Default(this._defaultStyleCoordinator,t,"Top",null);e.addPositionAndApplicator(o,a);var r=new AutotaskPositionSystem.RightAlignedTop(8,0),s=new AutotaskPositionApplicatorSystem.Default(this._defaultStyleCoordinator,t,"Right",null);e.addPositionAndApplicator(r,s);var l=new AutotaskPositionSystem.LeftAlignedTop(-8,0),u=new AutotaskPositionApplicatorSystem.Default(this._defaultStyleCoordinator,t,"Left",null);return e.addPositionAndApplicator(l,u),e},e.prototype._showLoadingIndicator=function(){this._contentDiv.classList.remove("Active"),this._loadingIndicatorDiv.classList.add("Active")},e}(AutotaskOverlaySystem.ContextOverlay);t.GlobalCurrencyTranslationContextOverlay=e}(AutotaskOverlays||(AutotaskOverlays={})),function(t){var e=function(t){function e(e,n){var i=t.call(this,e,!0)||this;return i._defaultStyleCoordinator=new AutotaskOverlaySystem.DefaultStyleCoordinator(i._overlayElementStyleApplicator),i._instanceTracker=new Autotask.InstanceTracker(n,n),i._contentDiv=i._getChildElementByClassName("Content"),i._loadingIndicatorDiv=i._getChildElementByClassName("LoadingIndicator"),i.addHideCompletedHandler((function(){i._showLoadingIndicator()})),i}return __extends(e,t),e.prototype.show=function(t){this._show(t)},e.prototype.__dispose=function(){t.prototype.__dispose.call(this),this._instanceTracker.__dispose()},e.prototype.__loadHtmlAndJavaScript=function(t,e){this._loadingIndicatorDiv.classList.remove("Active"),this._instanceTracker.__loadHtmlAndJavaScript(t,e),this._contentDiv.classList.add("Active"),this.__reposition()},Object.defineProperty(e.prototype,"_delayBeforeHiding",{get:function(){return 300},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_delayBeforeShowing",{get:function(){return 0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_styleCoordinator",{get:function(){return this._defaultStyleCoordinator},enumerable:!1,configurable:!0}),e.prototype._createPositionCoordinator=function(t){var e=new AutotaskOverlaySystem.PositionCoordinator,n=new AutotaskPositionSystem.BottomAlignedLeft(0,8),i=new AutotaskPositionApplicatorSystem.Default(this._defaultStyleCoordinator,t,"BottomLeft",null);e.addPositionAndApplicator(n,i);var o=new AutotaskPositionSystem.TopAlignedLeft(0,-8),a=new AutotaskPositionApplicatorSystem.Default(this._defaultStyleCoordinator,t,"TopLeft",null);e.addPositionAndApplicator(o,a);var r=new AutotaskPositionSystem.BottomAlignedRight(0,8),s=new AutotaskPositionApplicatorSystem.Default(this._defaultStyleCoordinator,t,"BottomRight",null);e.addPositionAndApplicator(r,s);var l=new AutotaskPositionSystem.TopAlignedRight(0,-8),u=new AutotaskPositionApplicatorSystem.Default(this._defaultStyleCoordinator,t,"TopRight",null);return e.addPositionAndApplicator(l,u),e},e.prototype._showLoadingIndicator=function(){this._contentDiv.classList.remove("Active"),this._loadingIndicatorDiv.classList.add("Active")},e}(AutotaskOverlaySystem.ContextOverlay);t.GlobalTooltipContextOverlay=e}(AutotaskOverlays||(AutotaskOverlays={})),function(t){var e=function(t){function e(e){var n=t.call(this,e,!1)||this;n._defaultStyleCoordinator=new AutotaskOverlaySystem.DefaultStyleCoordinator(n._overlayElementStyleApplicator),n._isBottomPositionFavored=!0,n._closeButtonClickHandler=null;var i=n._getChildElementByClassName("Content");return AutotaskDomSystem.Document.getChildElementByClassName(i,"ValidationOverlayCloseButton").addEventListener("click",(function(){n._onCloseButtonClick()})),n._messageContainer=AutotaskDomSystem.Document.getChildElementByClassName(i,"ValidationMessage"),n}return __extends(e,t),e.prototype.show=function(t,e,n){this._isBottomPositionFavored=e,this._closeButtonClickHandler=n,this._show(t)},e.prototype.setMessage=function(t){this._messageContainer.textContent=t},Object.defineProperty(e.prototype,"_delayBeforeHiding",{get:function(){return 300},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_delayBeforeShowing",{get:function(){return 0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_styleCoordinator",{get:function(){return this._defaultStyleCoordinator},enumerable:!1,configurable:!0}),e.prototype._createPositionCoordinator=function(t){return this._isBottomPositionFavored?this._createPositionCoordinatorForFavoringBottom(t):this._createPositionCoordinatorForFavoringTop(t)},e.prototype._createPositionCoordinatorForFavoringBottom=function(t){var e=new AutotaskOverlaySystem.PositionCoordinator,n=new AutotaskPositionSystem.BottomAlignedLeft(0,18),i=new AutotaskPositionApplicatorSystem.Default(this._defaultStyleCoordinator,t,"Bottom",null);e.addPositionAndApplicator(n,i);var o=new AutotaskPositionSystem.TopAlignedLeft(0,-14),a=new AutotaskPositionApplicatorSystem.Default(this._defaultStyleCoordinator,t,"Top",null);e.addPositionAndApplicator(o,a);var r=new AutotaskPositionSystem.LeftAlignedTop(-14,0),s=new AutotaskPositionApplicatorSystem.Default(this._defaultStyleCoordinator,t,"Left",null);e.addPositionAndApplicator(r,s);var l=new AutotaskPositionSystem.RightAlignedTop(14,0),u=new AutotaskPositionApplicatorSystem.Default(this._defaultStyleCoordinator,t,"Right",null);return e.addPositionAndApplicator(l,u),e},e.prototype._createPositionCoordinatorForFavoringTop=function(t){var e=new AutotaskOverlaySystem.PositionCoordinator,n=new AutotaskPositionSystem.TopAlignedLeft(0,-14),i=new AutotaskPositionApplicatorSystem.Default(this._defaultStyleCoordinator,t,"Top",null);e.addPositionAndApplicator(n,i);var o=new AutotaskPositionSystem.LeftAlignedTop(-14,0),a=new AutotaskPositionApplicatorSystem.Default(this._defaultStyleCoordinator,t,"Left",null);e.addPositionAndApplicator(o,a);var r=new AutotaskPositionSystem.RightAlignedTop(14,0),s=new AutotaskPositionApplicatorSystem.Default(this._defaultStyleCoordinator,t,"Right",null);e.addPositionAndApplicator(r,s);var l=new AutotaskPositionSystem.BottomAlignedLeft(0,18),u=new AutotaskPositionApplicatorSystem.Default(this._defaultStyleCoordinator,t,"Bottom",null);return e.addPositionAndApplicator(l,u),e},e.prototype._onCloseButtonClick=function(){null!==this._closeButtonClickHandler&&this._closeButtonClickHandler(),this.__hideWithoutDelay()},e}(AutotaskOverlaySystem.ContextOverlay);t.GlobalValidationContextOverlay=e}(AutotaskOverlays||(AutotaskOverlays={})),function(t){var e=function(t){function e(e,n){var i=t.call(this,e,!0)||this;return i._instanceTrackerCoordinatorId=n,i._defaultStyleCoordinator=new AutotaskOverlaySystem.DefaultStyleCoordinator(i._overlayElementStyleApplicator),i._contentDiv=i._getChildElementByClassName("Content"),i._loadingIndicatorDiv=i._getChildElementByClassName("LoadingIndicator"),i._instanceTrackerCoordinator=null,i}return __extends(e,t),e.prototype.show=function(t){this._show(t)},e.prototype.__requestContent=function(t){var e=this;t((function(t){e._requestSuccess(t)}))},e.prototype.__showLoadingIndicator=function(){null!==this._instanceTrackerCoordinator&&(this._instanceTrackerCoordinator.__clear(),this._contentDiv.classList.remove("Active"),this._loadingIndicatorDiv.classList.add("Active"))},Object.defineProperty(e.prototype,"_delayBeforeHiding",{get:function(){return 300},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_delayBeforeShowing",{get:function(){return 0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_styleCoordinator",{get:function(){return this._defaultStyleCoordinator},enumerable:!1,configurable:!0}),e.prototype._createPositionCoordinator=function(t){var e=new AutotaskOverlaySystem.PositionCoordinator,n=new AutotaskPositionSystem.BottomAlignedLeft(0,-1),i=new AutotaskPositionApplicatorSystem.Default(this._defaultStyleCoordinator,t,"Bottom","Bottom");e.addPositionAndApplicator(n,i);var o=new AutotaskPositionSystem.TopAlignedLeft(0,1),a=new AutotaskPositionApplicatorSystem.Default(this._defaultStyleCoordinator,t,"Top","Top");return e.addPositionAndApplicator(o,a),e},e.prototype._loadHtmlAndJavaScript=function(t,e){null===this._instanceTrackerCoordinator&&(this._instanceTrackerCoordinator=autotask.find(this._instanceTrackerCoordinatorId)),this._loadingIndicatorDiv.classList.remove("Active"),this._instanceTrackerCoordinator.__loadHtmlAndJavaScript(t,e),this._contentDiv.classList.add("Active"),this.__reposition()},e.prototype._requestSuccess=function(t){!0===t.isDataUnavailable?this.__hideWithoutDelay():this._loadHtmlAndJavaScript(t.htmlForInstanceTrackerContainer,t.script)},e}(AutotaskOverlaySystem.ContextOverlay);t.GridContextMenu=e}(AutotaskOverlays||(AutotaskOverlays={})),function(t){var e=function(t){function e(e,n){var i=t.call(this,e,!0)||this;return i._defaultStyleCoordinator=new AutotaskOverlaySystem.DefaultStyleCoordinator(i._overlayElementStyleApplicator),i._instanceTrackerContainerId=n,i._instanceTracker=null,i._contentDiv=i._getChildElementByClassName("Content"),i._loadingIndicatorDiv=i._getChildElementByClassName("LoadingIndicator"),i}return __extends(e,t),e.prototype.show=function(t){this._show(t)},e.prototype.__dispose=function(){t.prototype.__dispose.call(this),null!==this._instanceTracker&&this._instanceTracker.__dispose()},e.prototype.__requestContent=function(t){var e=this;t((function(t){e._requestSuccess(t)}))},e.prototype.__showLoadingIndicator=function(){null!==this._instanceTracker&&(this._instanceTracker.__clear(),this._contentDiv.classList.remove("Active"),this._loadingIndicatorDiv.classList.add("Active"))},Object.defineProperty(e.prototype,"_delayBeforeHiding",{get:function(){return 300},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_delayBeforeShowing",{get:function(){return 100},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_styleCoordinator",{get:function(){return this._defaultStyleCoordinator},enumerable:!1,configurable:!0}),e.prototype._createPositionCoordinator=function(t){var e=new AutotaskOverlaySystem.PositionCoordinator,n=new AutotaskPositionSystem.BottomAlignedLeft(0,0),i=new AutotaskPositionApplicatorSystem.Default(this._defaultStyleCoordinator,t,"Bottom",null);e.addPositionAndApplicator(n,i);var o=new AutotaskPositionSystem.TopAlignedLeft(0,0),a=new AutotaskPositionApplicatorSystem.Default(this._defaultStyleCoordinator,t,"Top",null);e.addPositionAndApplicator(o,a);var r=new AutotaskPositionSystem.RightAlignedTop(0,0),s=new AutotaskPositionApplicatorSystem.Default(this._defaultStyleCoordinator,t,"Right",null);e.addPositionAndApplicator(r,s);var l=new AutotaskPositionSystem.LeftAlignedTop(0,0),u=new AutotaskPositionApplicatorSystem.Default(this._defaultStyleCoordinator,t,"Left",null);return e.addPositionAndApplicator(l,u),e},e.prototype._loadHtmlAndJavaScript=function(t,e){null===this._instanceTracker&&(this._instanceTracker=new Autotask.InstanceTracker(this._instanceTrackerContainerId,this._instanceTrackerContainerId)),this._loadingIndicatorDiv.classList.remove("Active"),this._instanceTracker.__loadHtmlAndJavaScript(t,e),this._contentDiv.classList.add("Active"),this.__reposition()},e.prototype._requestSuccess=function(t){!0===t.isDataUnavailable?this.__hideWithoutDelay():this._loadHtmlAndJavaScript(t.htmlForInstanceTrackerContainer,t.script)},e}(AutotaskOverlaySystem.ContextOverlay);t.GridDisplayCellContextOverlay=e}(AutotaskOverlays||(AutotaskOverlays={})),function(t){var e=function(t){function e(e,n,i){var o=t.call(this,e,n,!0)||this;return o._instanceTrackerCoordinatorId=i,o._singlePointStyleCoordinator=new AutotaskOverlaySystem.SinglePointStyleCoordinator(o._overlayElementStyleApplicator),o._contentDiv=o._getChildElementByClassName("Content"),o._loadingIndicatorDiv=o._getChildElementByClassName("LoadingIndicator"),o._instanceTrackerCoordinator=null,o}return __extends(e,t),e.prototype.show=function(t,e){this._show(t,e)},e.prototype.__requestContent=function(t){var e=this;t((function(t){e._requestSuccess(t)}))},e.prototype.__showLoadingIndicator=function(){null!==this._instanceTrackerCoordinator&&(this._instanceTrackerCoordinator.__clear(),this._contentDiv.classList.remove("Active"),this._loadingIndicatorDiv.classList.add("Active"))},Object.defineProperty(e.prototype,"_delayBeforeHiding",{get:function(){return 1e3},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_delayBeforeShowing",{get:function(){return 0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_styleCoordinator",{get:function(){return this._singlePointStyleCoordinator},enumerable:!1,configurable:!0}),e.prototype._createPositionCoordinator=function(){var t=new AutotaskOverlaySystem.SinglePointPositionCoordinator,e=new AutotaskSinglePointPositionSystem.BottomRight(-5,-5),n=new AutotaskPositionApplicatorSystem.SinglePoint(this._singlePointStyleCoordinator,null);t.addPositionAndApplicator(e,n);var i=new AutotaskSinglePointPositionSystem.TopRight(-5,5),o=new AutotaskPositionApplicatorSystem.SinglePoint(this._singlePointStyleCoordinator,null);t.addPositionAndApplicator(i,o);var a=new AutotaskSinglePointPositionSystem.BottomLeft(5,-5),r=new AutotaskPositionApplicatorSystem.SinglePoint(this._singlePointStyleCoordinator,null);t.addPositionAndApplicator(a,r);var s=new AutotaskSinglePointPositionSystem.TopLeft(5,5),l=new AutotaskPositionApplicatorSystem.SinglePoint(this._singlePointStyleCoordinator,null);return t.addPositionAndApplicator(s,l),t},e.prototype._loadHtmlAndJavaScript=function(t,e){null===this._instanceTrackerCoordinator&&(this._instanceTrackerCoordinator=autotask.find(this._instanceTrackerCoordinatorId)),this._loadingIndicatorDiv.classList.remove("Active"),this._instanceTrackerCoordinator.__loadHtmlAndJavaScript(t,e),this._contentDiv.classList.add("Active"),this.__reposition()},e.prototype._requestSuccess=function(t){!0===t.isDataUnavailable?this.__hideWithoutDelay():this._loadHtmlAndJavaScript(t.htmlForInstanceTrackerContainer,t.script)},e}(AutotaskOverlaySystem.SinglePointContextOverlay);t.GridRightClickContextMenu=e}(AutotaskOverlays||(AutotaskOverlays={})),function(t){var e=function(t){function e(e){var n=t.call(this,e,!1)||this;n._defaultStyleCoordinator=new AutotaskOverlaySystem.DefaultStyleCoordinator(n._overlayElementStyleApplicator);var i=AutotaskDomSystem.Document.getElementById(e);n._contentElement=i.querySelector(".Content"),n._closeButtonElement=n._contentElement.querySelector(".LabelHelpOverlayCloseButton"),n._isOverlayShowing=!1,n._activeCssClass="Active";return n._closeButtonElement.classList.contains("Yes")&&console.log(null),n._closeButtonElement.addEventListener("click",n._onCloseButtonClick.bind(n)),t.prototype.addHidingHandler.call(n,n._overlayHiding.bind(n)),t.prototype.addShowingHandler.call(n,n._overlayShowing.bind(n)),n}return __extends(e,t),Object.defineProperty(e.prototype,"isOverlayShowing",{get:function(){return this._isOverlayShowing},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_delayBeforeHiding",{get:function(){return 0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_delayBeforeShowing",{get:function(){return 0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_styleCoordinator",{get:function(){return this._defaultStyleCoordinator},enumerable:!1,configurable:!0}),e.prototype.show=function(t){this._show(t)},e.prototype.hide=function(){this.__hideWithoutDelay()},e.prototype._createPositionCoordinator=function(t){var e=new AutotaskOverlaySystem.PositionCoordinator,n=new AutotaskPositionSystem.TopAlignedLeft(0,-4),i=new AutotaskPositionApplicatorSystem.Default(this._defaultStyleCoordinator,t,"TopLeft",null);e.addPositionAndApplicator(n,i);var o=new AutotaskPositionSystem.TopAlignedRight(0,-4),a=new AutotaskPositionApplicatorSystem.Default(this._defaultStyleCoordinator,t,"TopRight",null);e.addPositionAndApplicator(o,a);var r=new AutotaskPositionSystem.BottomAlignedLeft(0,4),s=new AutotaskPositionApplicatorSystem.Default(this._defaultStyleCoordinator,t,"BottomLeft",null);e.addPositionAndApplicator(r,s);var l=new AutotaskPositionSystem.BottomAlignedRight(0,4),u=new AutotaskPositionApplicatorSystem.Default(this._defaultStyleCoordinator,t,"BottomRight",null);return e.addPositionAndApplicator(l,u),e},e.prototype._onCloseButtonClick=function(e){t.prototype.__hideWithoutDelay.call(this),e.stopPropagation()},e.prototype._overlayHiding=function(){this._isOverlayShowing=!1,this._contentElement.classList.remove(this._activeCssClass)},e.prototype._overlayShowing=function(){this._isOverlayShowing=!0,this._contentElement.classList.add(this._activeCssClass)},e}(AutotaskOverlaySystem.ContextOverlay);t.LabelHelpContextOverlay=e}(AutotaskOverlays||(AutotaskOverlays={})),function(t){var e=function(t){function e(e){var n=t.call(this,e,!0)||this;return n._defaultStyleCoordinator=new AutotaskOverlaySystem.DefaultStyleCoordinator(n._overlayElementStyleApplicator),n}return __extends(e,t),e.prototype.show=function(t){this._show(t)},Object.defineProperty(e.prototype,"_delayBeforeHiding",{get:function(){return 300},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_delayBeforeShowing",{get:function(){return 0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_styleCoordinator",{get:function(){return this._defaultStyleCoordinator},enumerable:!1,configurable:!0}),e.prototype._createPositionCoordinator=function(t){var e=new AutotaskOverlaySystem.PositionCoordinator,n=new AutotaskPositionSystem.BottomAlignedLeft(0,-1),i=new AutotaskPositionApplicatorSystem.Default(this._defaultStyleCoordinator,t,null,"Active");return e.addPositionAndApplicator(n,i),e},e}(AutotaskOverlaySystem.ContextOverlay);t.RichTextContextMenu=e}(AutotaskOverlays||(AutotaskOverlays={})),function(t){var e=function(t){function e(e){var n=t.call(this,e,!0)||this;return n._defaultStyleCoordinator=new AutotaskOverlaySystem.DefaultStyleCoordinator(n._overlayElementStyleApplicator),n}return __extends(e,t),e.prototype.show=function(t){this._show(t)},Object.defineProperty(e.prototype,"_delayBeforeHiding",{get:function(){return 300},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_delayBeforeShowing",{get:function(){return 0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_styleCoordinator",{get:function(){return this._defaultStyleCoordinator},enumerable:!1,configurable:!0}),e.prototype._createPositionCoordinator=function(t){var e=new AutotaskOverlaySystem.PositionCoordinator,n=new AutotaskPositionSystem.BottomAlignedRight(-6,-14),i=new AutotaskPositionApplicatorSystem.Default(this._defaultStyleCoordinator,t,null,null);return e.addPositionAndApplicator(n,i),e},e}(AutotaskOverlaySystem.ContextOverlay);t.WidgetContextMenu=e}(AutotaskOverlays||(AutotaskOverlays={})),function(t){var e=function(){function t(t,e,n,i){this._styleCoordinator=t,this._launchingElementStyleApplicator=e,this._overlayCssClass=n,this._launchingElementCssClass=i}return t.prototype.applyPosition=function(t){this._styleCoordinator.applyPosition(t,this._launchingElementStyleApplicator,this._overlayCssClass,this._launchingElementCssClass)},t}();t.Default=e}(AutotaskPositionApplicatorSystem||(AutotaskPositionApplicatorSystem={})),function(t){var e=function(){function t(t,e){this._styleCoordinator=t,this._overlayCssClass=e}return t.prototype.applyPosition=function(t){this._styleCoordinator.applyPosition(t,this._overlayCssClass)},t}();t.SinglePoint=e}(AutotaskPositionApplicatorSystem||(AutotaskPositionApplicatorSystem={})),function(t){var e=function(){function e(t,e){this._leftOffset=t,this._topOffset=e}return e.prototype.createPositionData=function(e){var n=e.launchingElementLocation.distanceToLeftEdge-e.overlayElementSize.width/2+this._leftOffset+e.launchingElementSize.width/2,i=e.launchingElementLocation.distanceToTopEdge+this._topOffset+e.launchingElementSize.height;return new t.PositionData(n,i)},e.prototype.determineFeasibility=function(e){var n=e.launchingElementLocation.distanceToRightEdge+e.launchingElementSize.width-this._leftOffset-t.CalculationValues.defaultMargin,i=e.launchingElementLocation.distanceToLeftEdge+e.launchingElementSize.width+this._leftOffset-t.CalculationValues.defaultMargin,o=e.launchingElementLocation.distanceToBottomEdge-this._topOffset-t.CalculationValues.defaultMargin,a=n>e.overlayElementSize.width/2&&i>e.overlayElementSize.width/2,r=o>e.overlayElementSize.height;return a&&r},e}();t.BottomAlignedCenter=e}(AutotaskPositionSystem||(AutotaskPositionSystem={})),function(t){var e=function(){function e(t,e){this._leftOffset=t,this._topOffset=e}return e.prototype.createPositionData=function(e){var n=e.launchingElementLocation.distanceToLeftEdge+this._leftOffset,i=e.launchingElementLocation.distanceToTopEdge+e.launchingElementSize.height+this._topOffset;return new t.PositionData(n,i)},e.prototype.determineFeasibility=function(e){var n=e.launchingElementLocation.distanceToRightEdge+e.launchingElementSize.width-this._leftOffset-t.CalculationValues.defaultMargin,i=e.launchingElementLocation.distanceToBottomEdge-this._topOffset-t.CalculationValues.defaultMargin,o=n>e.overlayElementSize.width,a=i>e.overlayElementSize.height;return o&&a},e}();t.BottomAlignedLeft=e}(AutotaskPositionSystem||(AutotaskPositionSystem={})),function(t){var e=function(){function e(t,e){this._leftOffset=t,this._topOffset=e}return e.prototype.createPositionData=function(e){var n=e.launchingElementLocation.distanceToLeftEdge+e.launchingElementSize.width-e.overlayElementSize.width+this._leftOffset,i=e.launchingElementLocation.distanceToTopEdge+e.launchingElementSize.height+this._topOffset;return new t.PositionData(n,i)},e.prototype.determineFeasibility=function(e){var n=e.launchingElementLocation.distanceToLeftEdge+e.launchingElementSize.width+this._leftOffset-t.CalculationValues.defaultMargin,i=e.launchingElementLocation.distanceToBottomEdge-this._topOffset-t.CalculationValues.defaultMargin,o=n>e.overlayElementSize.width,a=i>e.overlayElementSize.height;return o&&a},e}();t.BottomAlignedRight=e}(AutotaskPositionSystem||(AutotaskPositionSystem={})),function(t){!function(t){t.defaultMargin=5}(t.CalculationValues||(t.CalculationValues={}))}(AutotaskPositionSystem||(AutotaskPositionSystem={})),function(t){var e=function(){function e(t,e){this._leftOffset=t,this._topOffset=e}return e.prototype.createPositionData=function(e){var n=e.launchingElementLocation.distanceToLeftEdge+this._leftOffset-e.overlayElementSize.width,i=e.launchingElementLocation.distanceToTopEdge+this._topOffset+e.launchingElementSize.height/2-e.overlayElementSize.height/2;return new t.PositionData(n,i)},e.prototype.determineFeasibility=function(e){var n=e.launchingElementLocation.distanceToLeftEdge+this._leftOffset-t.CalculationValues.defaultMargin,i=e.launchingElementLocation.distanceToTopEdge-this._topOffset-t.CalculationValues.defaultMargin+e.launchingElementSize.height/2,o=e.launchingElementLocation.distanceToBottomEdge-this._topOffset-t.CalculationValues.defaultMargin-e.launchingElementSize.height/2,a=n>e.overlayElementSize.width,r=i>e.overlayElementSize.height/2&&o>e.overlayElementSize.height/2;return a&&r},e}();t.LeftAlignedCenter=e}(AutotaskPositionSystem||(AutotaskPositionSystem={})),function(t){var e=function(){function e(t,e){this._leftOffset=t,this._topOffset=e}return e.prototype.createPositionData=function(e){var n=e.launchingElementLocation.distanceToLeftEdge+this._leftOffset-e.overlayElementSize.width,i=e.launchingElementLocation.distanceToTopEdge+this._topOffset;return new t.PositionData(n,i)},e.prototype.determineFeasibility=function(e){var n=e.launchingElementLocation.distanceToLeftEdge+this._leftOffset-t.CalculationValues.defaultMargin,i=e.launchingElementLocation.distanceToBottomEdge+e.launchingElementSize.height-this._topOffset-t.CalculationValues.defaultMargin,o=n>e.overlayElementSize.width,a=i>e.overlayElementSize.height;return o&&a},e}();t.LeftAlignedTop=e}(AutotaskPositionSystem||(AutotaskPositionSystem={})),function(t){var e=function(){function t(t,e){this._leftValue=t,this._topValue=e}return Object.defineProperty(t.prototype,"leftValue",{get:function(){return this._leftValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"topValue",{get:function(){return this._topValue},enumerable:!1,configurable:!0}),t}();t.PositionData=e}(AutotaskPositionSystem||(AutotaskPositionSystem={})),function(t){var e=function(){function e(t,e){this._leftOffset=t,this._topOffset=e}return e.prototype.createPositionData=function(e){var n=e.launchingElementLocation.distanceToLeftEdge+this._leftOffset+e.launchingElementSize.width,i=e.launchingElementLocation.distanceToTopEdge+this._topOffset+e.launchingElementSize.height/2-e.overlayElementSize.height/2;return new t.PositionData(n,i)},e.prototype.determineFeasibility=function(e){var n=e.launchingElementLocation.distanceToRightEdge-this._leftOffset-t.CalculationValues.defaultMargin,i=e.launchingElementLocation.distanceToTopEdge-this._topOffset-t.CalculationValues.defaultMargin+e.launchingElementSize.height/2,o=e.launchingElementLocation.distanceToBottomEdge-this._topOffset-t.CalculationValues.defaultMargin-e.launchingElementSize.height/2,a=n>e.overlayElementSize.width,r=i>e.overlayElementSize.height/2&&o>e.overlayElementSize.height/2;return a&&r},e}();t.RightAlignedCenter=e}(AutotaskPositionSystem||(AutotaskPositionSystem={})),function(t){var e=function(){function e(t,e){this._leftOffset=t,this._topOffset=e}return e.prototype.createPositionData=function(e){var n=e.launchingElementLocation.distanceToLeftEdge+e.launchingElementSize.width+this._leftOffset,i=e.launchingElementLocation.distanceToTopEdge+this._topOffset;return new t.PositionData(n,i)},e.prototype.determineFeasibility=function(e){var n=e.launchingElementLocation.distanceToRightEdge-this._leftOffset-t.CalculationValues.defaultMargin,i=e.launchingElementLocation.distanceToBottomEdge+e.launchingElementSize.height-this._topOffset-t.CalculationValues.defaultMargin,o=n>e.overlayElementSize.width,a=i>e.overlayElementSize.height;return o&&a},e}();t.RightAlignedTop=e}(AutotaskPositionSystem||(AutotaskPositionSystem={})),function(t){var e=function(){function t(t,e,n,i,o){this._launchingElementSize=t,this._launchingElementLocation=e,this._overlayElementSize=n,this._documentHeight=i,this._documentWidth=o}return Object.defineProperty(t.prototype,"documentHeight",{get:function(){return this._documentHeight},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"documentWidth",{get:function(){return this._documentWidth},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"launchingElementLocation",{get:function(){return this._launchingElementLocation},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"launchingElementSize",{get:function(){return this._launchingElementSize},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"overlayElementSize",{get:function(){return this._overlayElementSize},enumerable:!1,configurable:!0}),t}();t.TelemetrySnapshot=e}(AutotaskPositionSystem||(AutotaskPositionSystem={})),function(t){var e=function(){function e(t,e){this._leftOffset=t,this._topOffset=e}return e.prototype.createPositionData=function(e){var n=e.launchingElementLocation.distanceToLeftEdge-e.overlayElementSize.width/2+this._leftOffset+e.launchingElementSize.width/2,i=e.launchingElementLocation.distanceToTopEdge-e.overlayElementSize.height+this._topOffset;return new t.PositionData(n,i)},e.prototype.determineFeasibility=function(e){var n=e.launchingElementLocation.distanceToRightEdge+e.launchingElementSize.width-this._leftOffset-t.CalculationValues.defaultMargin,i=e.launchingElementLocation.distanceToLeftEdge+e.launchingElementSize.width+this._leftOffset-t.CalculationValues.defaultMargin,o=e.launchingElementLocation.distanceToTopEdge+this._topOffset-t.CalculationValues.defaultMargin,a=n>e.overlayElementSize.width/2&&i>e.overlayElementSize.width/2,r=o>e.overlayElementSize.height;return a&&r},e}();t.TopAlignedCenter=e}(AutotaskPositionSystem||(AutotaskPositionSystem={})),function(t){var e=function(){function e(t,e){this._leftOffset=t,this._topOffset=e}return e.prototype.createPositionData=function(e){var n=e.launchingElementLocation.distanceToLeftEdge+this._leftOffset,i=e.launchingElementLocation.distanceToTopEdge-e.overlayElementSize.height+this._topOffset;return new t.PositionData(n,i)},e.prototype.determineFeasibility=function(e){var n=e.launchingElementLocation.distanceToRightEdge+e.launchingElementSize.width-this._leftOffset-t.CalculationValues.defaultMargin,i=e.launchingElementLocation.distanceToTopEdge+this._topOffset-t.CalculationValues.defaultMargin,o=n>e.overlayElementSize.width,a=i>e.overlayElementSize.height;return o&&a},e}();t.TopAlignedLeft=e}(AutotaskPositionSystem||(AutotaskPositionSystem={})),function(t){var e=function(){function e(t,e){this._leftOffset=t,this._topOffset=e}return e.prototype.createPositionData=function(e){var n=e.launchingElementLocation.distanceToLeftEdge+e.launchingElementSize.width-e.overlayElementSize.width+this._leftOffset,i=e.launchingElementLocation.distanceToTopEdge-e.overlayElementSize.height+this._topOffset;return new t.PositionData(n,i)},e.prototype.determineFeasibility=function(e){var n=e.launchingElementLocation.distanceToLeftEdge+e.launchingElementSize.width+this._leftOffset-t.CalculationValues.defaultMargin,i=e.launchingElementLocation.distanceToTopEdge+this._topOffset-t.CalculationValues.defaultMargin,o=n>e.overlayElementSize.width,a=i>e.overlayElementSize.height;return o&&a},e}();t.TopAlignedRight=e}(AutotaskPositionSystem||(AutotaskPositionSystem={})),function(t){var e=function(){function e(){this._isBusy=!1,this._isPaused=!1,this._queue=[]}return e.prototype.clear=function(){this._queue=[]},e.prototype.enqueue=function(e){return __awaiter(this,void 0,void 0,(function(){var n=this;return __generator(this,(function(i){return[2,new Promise((function(i){var o=new t.QueuedPromiseCreator(e,(function(t){i(t),n._isBusy=!1,n._dequeue()}));n._queue.push(o),n._dequeue()}))]}))}))},e.prototype.pause=function(){this._isPaused=!0},e.prototype.resume=function(){this._isPaused=!1,this._dequeue()},e.prototype._dequeue=function(){if(!this._isBusy&&!this._isPaused){var t=this._queue.shift();void 0!==t&&(this._isBusy=!0,t.create())}},e}();t.PromiseQueue=e}(AutotaskPromiseSystem||(AutotaskPromiseSystem={})),function(t){var e=function(){function t(t,e){this._createHandler=t,this._resolveHandler=e}return t.prototype.create=function(){var t=this;this._createHandler().then((function(e){return t._resolveHandler(e)}))},t}();t.QueuedPromiseCreator=e}(AutotaskPromiseSystem||(AutotaskPromiseSystem={})),function(t){var e=function(t){function e(e,n){var i=t.call(this,e)||this;i._unmaskRoute=n,i._primaryElement=AutotaskDomSystem.Document.getElementById(e);var o=i._primaryElement.children[1];return i._valueElement=o.children[0],i._progressBarElement=i._primaryElement.children[2],i._progressElement=i._progressBarElement.children[0],i._primaryElement.children[0].children[5].addEventListener("click",(function(){i._unmaskClickListener()})),o.children[1].addEventListener("click",(function(){i._maskClickListener()})),i._intervalId=null,i._maskedCssClass="Masked1",i._progress=0,i}return __extends(e,t),e.prototype._mask=function(){null!==this._intervalId&&(window.clearInterval(this._intervalId),this._intervalId=null),this._primaryElement.classList.add(this._maskedCssClass),this._valueElement.textContent=null},e.prototype._maskClickListener=function(){this._mask()},e.prototype._startProgress=function(){var t=this;this._progress=0,this._progressElement.style.width="0";this._intervalId=window.setInterval((function(){t._timerHandler(.25)}),50)},e.prototype._timerHandler=function(t){this._progress>=100?this._mask():this._progress+t>=100?(this._progress=100,this._progressElement.style.width="100%"):(this._progress+=t,this._progressElement.style.width=this._progress.toString()+"%")},e.prototype._unmaskClickListener=function(){var t=this;this._unmaskRoute.makeRequest((function(e){t._unmaskSuccess(e)}))},e.prototype._unmaskSuccess=function(t){this._valueElement.textContent=t.value,this._startProgress(),this._primaryElement.classList.remove(this._maskedCssClass)},e}(Autotask.LifecycleObject);t.MaskedUserDefinedField=e}(AutotaskReadOnlyDataSystem||(AutotaskReadOnlyDataSystem={})),function(t){var e=function(){function e(){this._data={}}return Object.defineProperty(e.prototype,"__data",{get:function(){return this._data},enumerable:!1,configurable:!0}),e.prototype.addBoolean=function(e,n){if(this._validateKey(e),null!==n){if("boolean"!=typeof n)return autotask.throwException("The value must an instance of Boolean.");this._addData(e,t.ValueSerializer.serializeBoolean(n))}else this._addData(e,null)},e.prototype.addDataDictionary=function(e,n){if(this._validateKey(e),null!==n){if(!(n instanceof t.RequestDataDictionary))return autotask.throwException("The value must be an instance of AutotaskRequestDataSystem.RequestDataDictionary.");var i=n.data;for(var o in i)i.hasOwnProperty(o)&&this._addData(e.concat(".",o),i[o])}else this._addData(e,null)},e.prototype.addDataDictionaryCollection=function(t,e){if(this._validateKey(t),null!==e){if(!(e instanceof Array))return autotask.throwException("The value must be an instance of Array.");for(var n=0;n<e.length;n++)this.addDataDictionary(t.concat("[",n.toString(10),"]"),e[n])}else this._addData(t,null)},e.prototype.addDecimal=function(n,i){if(this._validateKey(n),null!==i){if("number"!=typeof i||isNaN(i))return autotask.throwException("The value must be an instance of Number.");this._addData(n,window.autotask.convert.decimalToString(i,null,null)),this._addData(n.concat(e.TypeCodeSuffix),t.TypeCode.NullableDecimal)}else this._addData(n,null)},e.prototype.addFieldData=function(e,n){if(this._validateKey(e),null!==n){n instanceof t.SerializedRequestData||autotask.throwException("value must be an instance of AutotaskRequestDataSystem.SerializedRequestData.");var i=n.requestData;for(var o in i)i.hasOwnProperty(o)&&this._addData(e.concat(".",o),i[o])}else this._addData(e,null)},e.prototype.addFieldDataCollection=function(t,e){if(this._validateKey(t),null!==e){if(!(e instanceof Array))return autotask.throwException("The value must be an instance of Array.");for(var n=0;n<e.length;n++)this.addFieldData(t.concat("[",n.toString(10),"]"),e[n])}else this._addData(t,null)},e.prototype.addGridDisplayData=function(t,e){this._validateKey(t),null!==e?(e instanceof Autotask.GridDisplayData||autotask.throwException("value must be an instance of Autotask.GridDisplayData."),e.__mergeWithData(t,this._data)):this._addData(t,null)},e.prototype.addInteger=function(n,i){if(this._validateKey(n),null!==i){if("number"!=typeof i||isNaN(i))return autotask.throwException("The value must be an instance of number.");this._addData(n,window.autotask.convert.integerToString(i)),this._addData(n.concat(e.TypeCodeSuffix),t.TypeCode.NullableInteger)}else this._addData(n,null)},e.prototype.addString=function(n,i){if(this._validateKey(n),null!==i&&"string"!=typeof i)return autotask.throwException("The value must be an instance of string.");this._addData(n,i),this._addData(n.concat(e.TypeCodeSuffix),t.TypeCode.String)},e.prototype.addStringArray=function(t,e){if(this._validateKey(t),null!==e){if(!(e instanceof Array))return autotask.throwException("The value must be an instance of Array.");for(var n=0;n<e.length;n++){if("string"!=typeof e[n])return autotask.throwException("The value must be an instance of string.");this._addData(t.concat("[",n.toString(10),"]"),e[n])}}else this._addData(t,null)},e.prototype._addData=function(t,e){this._data[t]=e},e.prototype._validateKey=function(t){this._data.hasOwnProperty(t)&&autotask.throwException("The data already has an entry for the key: "+t)},e.TypeCodeSuffix="_TC",e}();t.RequestData=e}(AutotaskRequestDataSystem||(AutotaskRequestDataSystem={})),function(t){var e=function(){function e(){this._data={}}return Object.defineProperty(e.prototype,"data",{get:function(){return this._data},enumerable:!1,configurable:!0}),e.prototype.addBoolean=function(e,n){if(this._validateKey(e),null!==n){if("boolean"!=typeof n)return autotask.throwException("The value must an instance of Boolean.");this._data[e]=t.ValueSerializer.serializeBoolean(n)}else this._data[e]=null},e.prototype.addDataDictionary=function(t,n){if(this._validateKey(t),null!==n){if(!(n instanceof e))return autotask.throwException("The value must be an instance of AutotaskRequestDataSystem.RequestDataDictionary.");var i=n.data;for(var o in i)i.hasOwnProperty(o)&&(this._data[t.concat(".",o)]=i[o])}else this._data[t]=null},e.prototype.addDate=function(e,n){if(this._validateKey(e),null!==n){if(!(n instanceof Date))return autotask.throwException("The value must be an instance of Date.");this._data[e]=window.autotask.convert.dateToString(n,null),this._data[e+t.RequestData.TypeCodeSuffix]=t.TypeCode.NullableDate}else this._data[e]=null},e.prototype.addDateTime=function(e,n){if(this._validateKey(e),null!==n){if(!(n instanceof Date))return autotask.throwException("The value must be an instance of Date.");this._data[e]=window.autotask.convert.dateToString(n,"F"),this._data[e+t.RequestData.TypeCodeSuffix]=t.TypeCode.NullableDate}else this._data[e]=null},e.prototype.addDecimal=function(e,n){if(this._validateKey(e),null!==n){if("number"!=typeof n||isNaN(n))return autotask.throwException("The value must be an instance of Number.");this._data[e]=window.autotask.convert.decimalToString(n,null,null),this._data[e+t.RequestData.TypeCodeSuffix]=t.TypeCode.NullableDecimal}else this._data[e]=null},e.prototype.addFieldData=function(e,n){if(this._validateKey(e),null!==n){n instanceof t.SerializedRequestData||autotask.throwException("value must be an instance of AutotaskRequestDataSystem.SerializedRequestData.");var i=n.requestData;for(var o in i)i.hasOwnProperty(o)&&(this._data[e+"."+o]=i[o])}else this._data[e]=null},e.prototype.addGridDisplayData=function(t,e){this._validateKey(t),null!==e?(e instanceof Autotask.GridDisplayData||autotask.throwException("value must be an instance of Autotask.GridDisplayData."),e.__mergeWithData(t,this._data)):this._data[t]=null},e.prototype.addInteger=function(e,n){if(this._validateKey(e),null!==n){if("number"!=typeof n||isNaN(n))return autotask.throwException("The value must be an instance of Number.");this._data[e]=window.autotask.convert.integerToString(n),this._data[e+t.RequestData.TypeCodeSuffix]=t.TypeCode.NullableInteger}else this._data[e]=null},e.prototype.addItemValue=function(t,e){if(this._validateKey(t),null!==e){e instanceof AutotaskItemSelectionSystem.ItemValue||autotask.throwException("value must be an instance of AutotaskRequestDataSystem.SerializedRequestData.");var n=e.__createRequestData(t);for(var i in n)n.hasOwnProperty(i)&&(this._data[i]=n[i])}else this._data[t]=null},e.prototype.addItemValueCollection=function(t,e){if(this._validateKey(t),null!==e){e instanceof AutotaskItemSelectionSystem.ItemValueCollection||autotask.throwException("value must be an instance of AutotaskRequestDataSystem.SerializedRequestData.");var n=e.__createRequestData(t);for(var i in n)n.hasOwnProperty(i)&&(this._data[i]=n[i])}else this._data[t]=null},e.prototype.addRichText=function(t,e){if(this._validateKey(t),null!==e){if(!(e instanceof AutotaskRichTextBox.RichTextValue))return autotask.throwException("The value must be an instance of AutotaskRichTextBox.RichTextValue.");var n=e.createRequestData(t);for(var i in n)n.hasOwnProperty(i)&&(this._data[i]=n[i])}else this._data[t]=null},e.prototype.addString=function(e,n){if(this._validateKey(e),null!==n&&"string"!=typeof n)return autotask.throwException("The value must be an instance of String.");this._data[e]=n,this._data[e+t.RequestData.TypeCodeSuffix]=t.TypeCode.String},e.prototype.addTime=function(e,n){if(this._validateKey(e),null!==n){if(!(n instanceof AutotaskTimeBox.Time))return autotask.throwException("The value must be an instance of AutotaskTimeBox.Time.");var i=new Date(n.time);this._data[e]=window.autotask.convert.timeToString(i,null),this._data[e+t.RequestData.TypeCodeSuffix]=t.TypeCode.NullableTime}else this._data[e]=null},e.prototype._addData=function(t,e){this._data[t]=e},e.prototype._validateKey=function(t){this._data.hasOwnProperty(t)&&autotask.throwException("The ajax data dictionary already has an entry for the key: "+t)},e}();t.RequestDataDictionary=e}(AutotaskRequestDataSystem||(AutotaskRequestDataSystem={})),function(t){var e=function(){function t(t){this._postedContainerAttributeName="data-posted-container",this._data=this._generateData(t)}return Object.defineProperty(t.prototype,"requestData",{get:function(){return this._data},enumerable:!1,configurable:!0}),t.prototype.__addImmutableData=function(t){var e=t.requestData;for(var n in e)e.hasOwnProperty(n)&&(this._data[n]=e[n])},t._addRequestData=function(t,e){var n=t.createRequestData();if(null!==n){var i=void 0;for(var o in n)n.hasOwnProperty(o)&&(i=n[o],e[o]=i)}},t.prototype._findParentPostedContainerId=function(t){var e=AutotaskDomSystem.Document.getParentElementByAttributeName(t,this._postedContainerAttributeName).getAttribute(this._postedContainerAttributeName);return null===e||0===e.length?autotask.throwException('The element must be have an ancestor with a valid "'+this._postedContainerAttributeName+'" attribute value.'):e},t.prototype._generateData=function(e){for(var n,i,o,a={},r=0,s=e;r<s.length;r++){var l=s[r];n=this._getPostedContainerId(l),i=l.querySelectorAll("[data-systems]");for(var u=0;u<i.length;u++)t._isRequestDataSystemParticipant(i[u].dataset.systems)&&this._findParentPostedContainerId(i[u])===n&&(o=autotask.find(i[u].dataset.alphaId),t._addRequestData(o,a))}return a},t.prototype._getPostedContainerId=function(t){if(!t.hasAttribute(this._postedContainerAttributeName))return autotask.throwException('The element is not decorated with the "'+this._postedContainerAttributeName+'" attribute.');var e=t.getAttribute(this._postedContainerAttributeName);return null===e||0===e.length?autotask.throwException('The element is not decorated with a valid "'+this._postedContainerAttributeName+'" attribute value.'):e},t._isRequestDataSystemParticipant=function(t){return"1"===t[0]},t}();t.SerializedRequestData=e}(AutotaskRequestDataSystem||(AutotaskRequestDataSystem={})),function(t){!function(t){t.ItemValue="11",t.NullableDate="16",t.NullableDecimal="14",t.NullableInteger="12",t.NullableTime="18",t.String="10"}(t.TypeCode||(t.TypeCode={}))}(AutotaskRequestDataSystem||(AutotaskRequestDataSystem={})),function(t){!function(t){t.serializeBoolean=function(t){return t?"true":"false"}}(t.ValueSerializer||(t.ValueSerializer={}))}(AutotaskRequestDataSystem||(AutotaskRequestDataSystem={})),function(t){var e=function(){function t(t){this._isCollapsed=t}return Object.defineProperty(t.prototype,"isCollapsed",{get:function(){return this._isCollapsed},enumerable:!1,configurable:!0}),t}();t.CollapsedStateChangeEventArgs=e}(AutotaskSection||(AutotaskSection={})),function(t){var e=function(e){function n(t,n){var i=e.call(this,t)||this;i._isCollapsed=n,i._sectionElement=AutotaskDomSystem.Document.getElementById(t),i._collapsedStateChangeHandlers=[];var o=AutotaskDomSystem.Document.firstElementChild(i._sectionElement);return i._headingElement=AutotaskDomSystem.Document.firstElementChild(o),i._toggleElement=AutotaskDomSystem.Document.getChildElementByClassName(i._headingElement,"Toggle"),i._toggleElement.addEventListener("click",(function(){i._clickListener()})),AutotaskDomSystem.Document.getChildElementByClassName(i._headingElement,"Left").addEventListener("click",(function(){i._clickListener()})),i._tabbingAwayHandlers=[],i._tabbingSystem=new AutotaskTabbingSystem.TabbingSystem(i._sectionElement,(function(t){i._tabbingAwayhandler(t)})),i}return __extends(n,e),Object.defineProperty(n.prototype,"isCollapsed",{get:function(){return this._isCollapsed},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isEnabled",{get:function(){return!this._isCollapsed&&this._tabbingSystem.hasFocusableParticipants},enumerable:!1,configurable:!0}),n.prototype.addCollapsedStateChangeHandler=function(t){this._collapsedStateChangeHandlers.push(t)},n.prototype.addTabbingAwayHandler=function(t){this._tabbingAwayHandlers.push(t),this._tabbingSystem.isEnabled||(this._tabbingSystem.reset(),this._tabbingSystem.isEnabled=!0)},n.prototype.collapse=function(){this._isCollapsed||this._collapse()},n.prototype.expand=function(){this._isCollapsed&&this._expand()},n.prototype.focus=function(){this._tabbingSystem.focusFirstParticipant()},n.prototype.focusEnd=function(){this._tabbingSystem.focusLastParticipant()},n.prototype.focusStart=function(){this._tabbingSystem.focusFirstParticipant()},n.prototype._clickListener=function(){this._isCollapsed?(this._expand(),window.autotask.scrolling.__scrollUntilVisible([this._sectionElement],0,!0)):this._collapse()},n.prototype._collapse=function(){if(this._sectionElement.classList.add("Collapsed"),this._headingElement.classList.remove("Collapse"),this._headingElement.classList.add("Expand"),this._isCollapsed=!0,this._collapsedStateChangeHandlers.length>0)for(var e=0,n=this._collapsedStateChangeHandlers;e<n.length;e++){(0,n[e])(new t.CollapsedStateChangeEventArgs(this._isCollapsed))}},n.prototype._expand=function(){if(this._sectionElement.classList.remove("Collapsed"),this._headingElement.classList.remove("Expand"),this._headingElement.classList.add("Collapse"),this._isCollapsed=!1,this._collapsedStateChangeHandlers.length>0)for(var e=0,n=this._collapsedStateChangeHandlers;e<n.length;e++){(0,n[e])(new t.CollapsedStateChangeEventArgs(this._isCollapsed))}},n.prototype._tabbingAwayhandler=function(t){if(this._tabbingAwayHandlers.length>0)for(var e=new AutotaskTabbingSystem.TabbingAwayEventArgs(this.id,t,(function(){})),n=0,i=this._tabbingAwayHandlers;n<i.length;n++){(0,i[n])(e)}},n}(Autotask.LifecycleObject);t.CollapsibleSection=e}(AutotaskSection||(AutotaskSection={})),function(t){var e=function(){function t(t){this._sectionId=t,this._sectionElement=AutotaskDomSystem.Document.getElementById(t)}return t.prototype.__registerHandlers=function(){for(var t=autotask.find(this._sectionId),e=this._sectionElement.querySelectorAll("[data-systems]"),n=0;n<e.length;n++)if(this._isValidationSystemParticipant(e[n].dataset.systems)){var i=e[n];if(void 0!==i.dataset.alphaId)autotask.find(i.dataset.alphaId).participantValidation.addValidationFailedHandler((function(){t.expand()}))}},t.prototype._isValidationSystemParticipant=function(t){return void 0!==t&&"1"===t[6]},t}();t.SectionValidationCoordinator=e}(AutotaskSection||(AutotaskSection={})),function(t){var e=function(){function e(t,e){this._leftOffset=t,this._topOffset=e}return e.prototype.createPositionData=function(t){var e=t.launchingPointTelemetry.distanceToLeftEdge+this._leftOffset,n=t.launchingPointTelemetry.distanceToTopEdge+this._topOffset;return new AutotaskPositionSystem.PositionData(e,n)},e.prototype.determineFeasibility=function(e){var n=e.launchingPointTelemetry.distanceToRightEdge-this._leftOffset-t.CalculationValues.defaultMargin,i=e.launchingPointTelemetry.distanceToBottomEdge-this._topOffset-t.CalculationValues.defaultMargin,o=n>e.overlayElementSize.width,a=i>e.overlayElementSize.height;return o&&a},e}();t.BottomRight=e}(AutotaskSinglePointPositionSystem||(AutotaskSinglePointPositionSystem={})),function(t){var e=function(){function e(t,e){this._leftOffset=t,this._topOffset=e}return e.prototype.createPositionData=function(t){var e=t.launchingPointTelemetry.distanceToLeftEdge-t.overlayElementSize.width+this._leftOffset,n=t.launchingPointTelemetry.distanceToTopEdge+this._topOffset;return new AutotaskPositionSystem.PositionData(e,n)},e.prototype.determineFeasibility=function(e){var n=e.launchingPointTelemetry.distanceToLeftEdge+this._leftOffset-t.CalculationValues.defaultMargin,i=e.launchingPointTelemetry.distanceToBottomEdge-this._topOffset-t.CalculationValues.defaultMargin,o=n>e.overlayElementSize.width,a=i>e.overlayElementSize.height;return o&&a},e}();t.BottomLeft=e}(AutotaskSinglePointPositionSystem||(AutotaskSinglePointPositionSystem={})),function(t){!function(t){t.defaultMargin=5}(t.CalculationValues||(t.CalculationValues={}))}(AutotaskSinglePointPositionSystem||(AutotaskSinglePointPositionSystem={})),function(t){var e=function(){function t(t,e,n,i){this._overlayElementSize=t,this._launchingPointTelemetry=e,this._documentHeight=n,this._documentWidth=i}return Object.defineProperty(t.prototype,"documentHeight",{get:function(){return this._documentHeight},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"documentWidth",{get:function(){return this._documentWidth},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"overlayElementSize",{get:function(){return this._overlayElementSize},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"launchingPointTelemetry",{get:function(){return this._launchingPointTelemetry},enumerable:!1,configurable:!0}),t}();t.TelemetrySnapshot=e}(AutotaskSinglePointPositionSystem||(AutotaskSinglePointPositionSystem={})),function(t){var e=function(){function e(t,e){this._leftOffset=t,this._topOffset=e}return e.prototype.createPositionData=function(t){var e=t.launchingPointTelemetry.distanceToLeftEdge-t.overlayElementSize.width+this._leftOffset,n=t.launchingPointTelemetry.distanceToTopEdge-t.overlayElementSize.height+this._topOffset;return new AutotaskPositionSystem.PositionData(e,n)},e.prototype.determineFeasibility=function(e){var n=e.launchingPointTelemetry.distanceToLeftEdge+this._leftOffset-t.CalculationValues.defaultMargin,i=e.launchingPointTelemetry.distanceToTopEdge+this._topOffset-t.CalculationValues.defaultMargin,o=n>e.overlayElementSize.width,a=i>e.overlayElementSize.height;return o&&a},e}();t.TopLeft=e}(AutotaskSinglePointPositionSystem||(AutotaskSinglePointPositionSystem={})),function(t){var e=function(){function e(t,e){this._leftOffset=t,this._topOffset=e}return e.prototype.createPositionData=function(t){var e=t.launchingPointTelemetry.distanceToLeftEdge+this._leftOffset,n=t.launchingPointTelemetry.distanceToTopEdge-t.overlayElementSize.height+this._topOffset;return new AutotaskPositionSystem.PositionData(e,n)},e.prototype.determineFeasibility=function(e){var n=e.launchingPointTelemetry.distanceToRightEdge-this._leftOffset-t.CalculationValues.defaultMargin,i=e.launchingPointTelemetry.distanceToTopEdge+this._topOffset-t.CalculationValues.defaultMargin,o=n>e.overlayElementSize.width,a=i>e.overlayElementSize.height;return o&&a},e}();t.TopRight=e}(AutotaskSinglePointPositionSystem||(AutotaskSinglePointPositionSystem={})),function(t){var e=function(){function t(t,e,n){this._instanceId=t,this._isShiftKeyPressed=e,this._cancelDelegate=n}return Object.defineProperty(t.prototype,"instanceId",{get:function(){return this._instanceId},enumerable:!1,configurable:!0}),t.prototype.cancel=function(){this._cancelDelegate()},Object.defineProperty(t.prototype,"isShiftKeyPressed",{get:function(){return this._isShiftKeyPressed},enumerable:!1,configurable:!0}),t}();t.TabbingAwayEventArgs=e}(AutotaskTabbingSystem||(AutotaskTabbingSystem={})),function(t){var e=function(){function t(t,e){var n=this;this._containerElement=t,this._containerElement.addEventListener("keydown",(function(t){n._keyDownListener(t)})),this._isEnabled=!1,this._tabbingAwayDelegate=e,this._participantIds=[],this._participants=[]}return Object.defineProperty(t.prototype,"hasFocusableParticipants",{get:function(){for(var t=!1,e=0,n=this._participants;e<n.length;e++){if(n[e].isEnabled){t=!0;break}}return t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isEnabled",{get:function(){return this._isEnabled},set:function(t){this._isEnabled=t},enumerable:!1,configurable:!0}),t.prototype.focusFirstParticipant=function(){for(var t=0;t<this._participants.length;t++){var e=this._participants[t];if(e.isEnabled){e.focusStart();break}}},t.prototype.focusLastParticipant=function(){for(var t=this._participants.length-1;t>=0;t--){var e=this._participants[t];if(e.isEnabled){e.focusEnd();break}}},t.prototype.reset=function(){var e=this;this._participantIds.splice(0),this._participants.splice(0);for(var n=0,i=t._findParticipantIds(this._containerElement);n<i.length;n++){var o=i[n];this._participantIds.push(o);var a=autotask.find(o);a.addTabbingAwayHandler((function(t){e._tabbingAwayHandler(t)})),this._participants.push(a)}},t._findParticipantIds=function(t){for(var e=[],n=t.querySelectorAll("[data-tabbing-system]"),i=0;i<n.length;i++){for(var o=n[i].parentElement;null!==o&&o!==t&&!o.hasAttribute("data-tabbing-system");)o=o.parentElement;if(o===t){var a=n[i].dataset.alphaId;e.push(a)}}return e},t.prototype._keyDownListener=function(t){this._isEnabled&&AutotaskDomSystem.KeyCode.isTab(t.which)&&t.preventDefault()},t.prototype._tabbingAwayHandler=function(t){if(this._isEnabled){t.cancel();var e=this._participantIds.indexOf(t.instanceId);if(t.isShiftKeyPressed){for(;--e>=0;)if(this._participants[e].isEnabled){this._participants[e].focusEnd();break}}else for(;++e<this._participants.length;)if(this._participants[e].isEnabled){this._participants[e].focusStart();break}null!==this._tabbingAwayDelegate&&(e<0||e>=this._participants.length)&&this._tabbingAwayDelegate(t.isShiftKeyPressed)}},t}();t.TabbingSystem=e}(AutotaskTabbingSystem||(AutotaskTabbingSystem={})),function(t){var e=function(){function t(t,e){var n=this;this._anchorElement=AutotaskDomSystem.Document.getElementById(t),this._anchorElement.addEventListener("click",(function(){n._onClick()})),this._navigationRoute=e}return t.prototype._onClick=function(){this._navigationRoute.__navigate()},t}();t.NavigationLinkText=e}(AutotaskTextSystem||(AutotaskTextSystem={})),function(t){var e=function(){function e(){this._currentParticipantId=null,this._overlay=null}return e.prototype.hide=function(t){null!==t&&t!==this._currentParticipantId||this._overlay.__hideWithoutDelay()},e.prototype.__initialize=function(){var t=this;this._overlay=autotask.find("validationOverlay5D75D30D92504706A949DC4DD367328A"),this._overlay.addHidingHandler((function(){t._overlayHiding()}))},e.prototype.show=function(n,i,o,a,r,s){var l=this;if(e._isLaunchingElementVisible(n)){var u=this._overlay;if(i===this._currentParticipantId)u.setMessage(o);else{u.__hideWithoutDelay(),u.clearShowingHandlers(),u.addShowingHandler((function(t){l._overlayShowing(t,s)})),u.setMessage(o);var c=null;null!==r&&(c=function(){var e=new t.ValidationOverlayClosedEventArgs(i);r(e)}),this._currentParticipantId=i,u.show(n,a,c)}}},e._isLaunchingElementVisible=function(t){for(var e=!0,n=t.getBoundingClientRect(),i=window.autotask.scrolling.__scrollParentForHtmlElement(t);null!==i&&i!==window.document;){var o=i,a=o.getBoundingClientRect();if(!(n.top>a.top&&n.bottom<a.bottom&&n.left>a.left&&n.right<a.right)){e=!1;break}i=window.autotask.scrolling.__scrollParentForHtmlElement(o)}return e},e.prototype._overlayHiding=function(){this._currentParticipantId=null},e.prototype._overlayShowing=function(t,e){if(null!==e)for(var n=0,i=e;n<i.length;n++){var o=i[n];t.allowConcurrentOverlay(o)}},e}();t.GlobalValidationOverlay=e}(AutotaskValidationSystem||(AutotaskValidationSystem={})),function(t){var e=function(){function t(t){this._participantId=t}return Object.defineProperty(t.prototype,"participantId",{get:function(){return this._participantId},enumerable:!1,configurable:!0}),t}();t.ValidationCorrectedEventArgs=e}(AutotaskValidationSystem||(AutotaskValidationSystem={})),function(t){var e=function(){function t(t,e,n,i,o,a){this._participantId=t,this._message=e,this._isTriggeredByUserInteraction=n,this._element=i,this._positionRequirement=o,this._overlayMessage=a}return Object.defineProperty(t.prototype,"element",{get:function(){return this._element},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"message",{get:function(){return this._message},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isTriggeredByUserInteraction",{get:function(){return this._isTriggeredByUserInteraction},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"overlayMessage",{get:function(){return this._overlayMessage},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"participantId",{get:function(){return this._participantId},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"positionRequirement",{get:function(){return this._positionRequirement},enumerable:!1,configurable:!0}),t}();t.ValidationFailedEventArgs=e}(AutotaskValidationSystem||(AutotaskValidationSystem={})),function(t){var e=function(){function t(t){this._participantId=t}return Object.defineProperty(t.prototype,"participantId",{get:function(){return this._participantId},enumerable:!1,configurable:!0}),t}();t.ValidationOverlayClosedEventArgs=e}(AutotaskValidationSystem||(AutotaskValidationSystem={})),function(t){var e=function(t){function e(e,n){var i=t.call(this,e)||this,o=AutotaskDomSystem.Document.getElementById(e);return i._contextMenuCoordinatorId=n,i._isDraggingEnabled=!1,i._titleBar=AutotaskDomSystem.Document.getChildElementByClassName(o,"Title"),i._titleBarMouseDownHandler=function(t){i._mouseDown(t)},i._titleBarTouchStartHandler=function(t){i._touchStart(t)},i._contextMenuCoordinator=null,i._mouseDownDragEventHandler=null,i._refreshDelegate=null,i._touchStartDragEventHandler=null,i._userInteractionEventEndedHandler=null,i._userInteractionEventStartedHandler=null,i._widgetFilterData=null,i}return __extends(e,t),Object.defineProperty(e.prototype,"widgetFilterData",{get:function(){return this._widgetFilterData},set:function(t){this._widgetFilterData=t},enumerable:!1,configurable:!0}),e.prototype.refresh=function(){if(null===this._refreshDelegate)return autotask.throwException("The refresh delegate is not set.");this._refreshDelegate()},e.prototype.__dispose=function(){this._isDraggingEnabled&&(this._titleBar.removeEventListener("mousedown",this._titleBarMouseDownHandler),this._titleBar.removeEventListener("touchstart",this._titleBarTouchStartHandler)),this._mouseDownDragEventHandler=null,this._touchStartDragEventHandler=null,this._userInteractionEventStartedHandler=null,this._userInteractionEventEndedHandler=null},e.prototype.__enableDragging=function(t,e){this._titleBar.addEventListener("mousedown",this._titleBarMouseDownHandler),this._titleBar.addEventListener("touchstart",this._titleBarTouchStartHandler,{passive:!0}),this._mouseDownDragEventHandler=t,this._touchStartDragEventHandler=e,this._titleBar.classList.add("Draggable"),this._isDraggingEnabled=!0},e.prototype.__initialize=function(){var t=this;null!==this._contextMenuCoordinatorId&&(this._contextMenuCoordinator=autotask.find(this._contextMenuCoordinatorId),this._contextMenuCoordinator.setContextMenuHidingHandler((function(){t._onUserInteractionEventEnded()})),this._contextMenuCoordinator.setContextMenuShowingHandler((function(){t._onUserInteractionEventStarted()})))},e.prototype.__registerUserInteractionEventHandlers=function(t,e){this._userInteractionEventStartedHandler=t,this._userInteractionEventEndedHandler=e},e.prototype.__setRefreshDelegate=function(t){this._refreshDelegate=t},e.prototype._onUserInteractionEventEnded=function(){null!==this._userInteractionEventEndedHandler&&this._userInteractionEventEndedHandler()},e.prototype._onUserInteractionEventStarted=function(){null!==this._userInteractionEventStartedHandler&&this._userInteractionEventStartedHandler()},e.prototype._mouseDown=function(t){this._onMouseDownDragEvent(t.clientX,t.clientY)},e.prototype._onMouseDownDragEvent=function(t,e){null!==this._mouseDownDragEventHandler&&this._mouseDownDragEventHandler(t,e)},e.prototype._onTouchStartDragEvent=function(t,e){null!==this._touchStartDragEventHandler&&this._touchStartDragEventHandler(t,e)},e.prototype._touchStart=function(t){var e=t.targetTouches[0];this._onTouchStartDragEvent(e.clientX,e.clientY)},e}(Autotask.LifecycleObject);t.Widget=e}(AutotaskWidgetSystem||(AutotaskWidgetSystem={})),function(t){var e=function(t){function e(e,n,i,o){var a=t.call(this,e,n)||this;return a._contentTypeId=i,a._isDrilldownEnabled=o,a._drilldownEventHandlers=[],a}return __extends(e,t),e.prototype.addDrilldownHandler=function(t){this._isDrilldownEnabled||autotask.throwException("DrilldownWidget.__addDrilldownHandler is being called on a widget that has not been enabled for drilldown."),this._drilldownEventHandlers.push(t)},Object.defineProperty(e.prototype,"contentTypeId",{get:function(){return this._contentTypeId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isDrilldownEnabled",{get:function(){return this._isDrilldownEnabled},enumerable:!1,configurable:!0}),e.prototype.onDrilldown=function(t){for(var e=0,n=this._drilldownEventHandlers;e<n.length;e++){(0,n[e])(t)}},e}(t.Widget);t.DrilldownWidget=e}(AutotaskWidgetSystem||(AutotaskWidgetSystem={})),function(t){var e=function(){function t(t,e,n,i,o,a,r){this._colorOptions=t,this._xAxisOptions=e,this._yAxisOptions=n,this._secondaryYAxisOptions=i,this._dataSeriesList=o,this._trendLineOptionsList=a,this._isLegendEnabled=r}return Object.defineProperty(t.prototype,"colorOptions",{get:function(){return this._colorOptions},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dataSeriesList",{get:function(){return this._dataSeriesList},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isLegendEnabled",{get:function(){return this._isLegendEnabled},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"secondaryYAxisOptions",{get:function(){return this._secondaryYAxisOptions},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"trendLineOptionsList",{get:function(){return this._trendLineOptionsList},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"xAxisOptions",{get:function(){return this._xAxisOptions},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"yAxisOptions",{get:function(){return this._yAxisOptions},enumerable:!1,configurable:!0}),t}();t.ChartOptions=e}(AutotaskWidgetSystem||(AutotaskWidgetSystem={})),function(t){var e=function(e){function n(t,n,i,o,a,r,s){var l=e.call(this,t,i,o,a)||this;return l._chartConfigurationId=n,l._totalId=r,l._chartOptions=s,l._canvasJsChart=null,l}return __extends(n,e),n.prototype.__dispose=function(){null!==this._canvasJsChart&&this._canvasJsChart.__dispose()},n.prototype.__initialize=function(){var e=this,n=null;(this._chartOptions.isLegendEnabled&&(n=new t.ChartLegendOptions(this._legendFontSize,this._isLegendRightAlignedHorizontally,this._isLegendCenteredVertically,this._isLegendClickAssociatedWithDataPoint)),this.isDrilldownEnabled&&null!==this._totalId)&&(autotask.find(this._totalId).drilldownEventHandler=function(){e._onTotalDrilldown()});var i=AutotaskDomSystem.Document.getElementById(this.id).getElementsByClassName("Chart")[0].id;this._canvasJsChart=new t.CanvasJsChart(i,this._chartType,this._chartOptions.colorOptions,this._chartOptions.xAxisOptions,this._chartOptions.yAxisOptions,this._chartOptions.secondaryYAxisOptions,n,this._chartOptions.dataSeriesList,this._chartOptions.trendLineOptionsList,(function(t,n){e._onDataPointDrilldownHandler(t,n)}),(function(t,n){e._onDataSeriesDrilldownHandler(t,n)})),this._canvasJsChart.render()},Object.defineProperty(n.prototype,"_isLegendCenteredVertically",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"_isLegendClickAssociatedWithDataPoint",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"_isLegendRightAlignedHorizontally",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"_legendFontSize",{get:function(){return null},enumerable:!1,configurable:!0}),n.prototype._onDataSeriesDrilldownHandler=function(e,n){var i=new t.DrilldownEventArgs(this._chartConfigurationId,this.contentTypeId,n.dataSeries.hasPrimaryGroupByValue,n.dataSeries.primaryGroupByValue,n.dataSeries.hasSecondaryGroupByValue,n.dataSeries.secondaryGroupByValue,n.dataSeries.reportOnFieldOptionId,this.widgetFilterData,e.ctrlKey);this.onDrilldown(i)},n.prototype._onDataPointDrilldownHandler=function(e,n){n&&n.dataPoint&&n.dataSeries&&(n.dataSeries.click=null);var i=new t.DrilldownEventArgs(this._chartConfigurationId,this.contentTypeId,n.dataPoint.hasPrimaryGroupByValue,n.dataPoint.primaryGroupByValue,n.dataPoint.hasSecondaryGroupByValue,n.dataPoint.secondaryGroupByValue,n.dataPoint.reportOnFieldOptionId,this.widgetFilterData,e.ctrlKey);this.onDrilldown(i)},n.prototype._onTotalDrilldown=function(){var e=new t.DrilldownEventArgs(this._chartConfigurationId,this.contentTypeId,!1,null,!1,null,null,this.widgetFilterData,!1);this.onDrilldown(e)},n}(t.DrilldownWidget);t.ChartWidget=e}(AutotaskWidgetSystem||(AutotaskWidgetSystem={})),function(t){var e=function(t){function e(e,n,i,o,a,r,s){return t.call(this,e,n,i,o,a,r,s)||this}return __extends(e,t),Object.defineProperty(e.prototype,"_chartType",{get:function(){return"area"},enumerable:!1,configurable:!0}),e}(t.ChartWidget);t.AreaChartWidget=e}(AutotaskWidgetSystem||(AutotaskWidgetSystem={})),function(t){var e=function(t){function e(e,n,i,o,a,r,s){return t.call(this,e,n,i,o,a,r,s)||this}return __extends(e,t),Object.defineProperty(e.prototype,"_chartType",{get:function(){return"bar"},enumerable:!1,configurable:!0}),e}(t.ChartWidget);t.BarChartWidget=e}(AutotaskWidgetSystem||(AutotaskWidgetSystem={})),function(t){var e=function(){function t(t,e,n,i,o,a,r,s,l,u,c){var d=new ChartDataGenerator(e,n,i,o,a,r,s,l,u,c).__generate();this._canvasJsChart=new CanvasJS.Chart(t,d)}return t.addColorSet=function(t,e){CanvasJS.addColorSet(t,e)},t.prototype.render=function(){this._canvasJsChart.render()},t.prototype.__dispose=function(){this._canvasJsChart.dispose(),this._canvasJsChart=null},t}();t.CanvasJsChart=e}(AutotaskWidgetSystem||(AutotaskWidgetSystem={})),function(t){var e=function(){function t(t,e,n,i){this._textColor=t,this._axisColor=e,this._gridColor=n,this._pieBorderColor=i}return Object.defineProperty(t.prototype,"axisColor",{get:function(){return this._axisColor},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"gridColor",{get:function(){return this._gridColor},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pieBorderColor",{get:function(){return this._pieBorderColor},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"textColor",{get:function(){return this._textColor},enumerable:!1,configurable:!0}),t}();t.ChartColorOptions=e}(AutotaskWidgetSystem||(AutotaskWidgetSystem={})),function(t){var e=function(){function t(t,e,n,i,o,a,r,s,l,u,c,d,h,_,p,m,f,y,g,v){this._isSecondary=t,this._name=e,this._legendText=n,this._totalText=i,this._hasPrimaryGroupByValue=o,this._primaryGroupByValue=a,this._hasSecondaryGroupByValue=r,this._secondaryGroupByValue=s,this._reportOnFieldOptionId=l,this._dataPointFullLabels=u,this._dataPointLabels=c,this._dataPointLegendText=d,this._dataPointNames=h,this._dataPointXValues=_,this._dataPointYValues=p,this._dataPointYValuesFormatted=m,this._dataPointHasPrimaryGroupByValue=f,this._dataPointPrimaryGroupByValues=y,this._dataPointHasSecondaryGroupByValue=g,this._dataPointSecondaryGroupByValues=v}return Object.defineProperty(t.prototype,"dataPointHasPrimaryGroupByValue",{get:function(){return this._dataPointHasPrimaryGroupByValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dataPointHasSecondaryGroupByValue",{get:function(){return this._dataPointHasSecondaryGroupByValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dataPointFullLabels",{get:function(){return this._dataPointFullLabels},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dataPointLabels",{get:function(){return this._dataPointLabels},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dataPointLegendText",{get:function(){return this._dataPointLegendText},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dataPointNames",{get:function(){return this._dataPointNames},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dataPointXValues",{get:function(){return this._dataPointXValues},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dataPointYValues",{get:function(){return this._dataPointYValues},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dataPointYValuesFormatted",{get:function(){return this._dataPointYValuesFormatted},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dataPointPrimaryGroupByValues",{get:function(){return this._dataPointPrimaryGroupByValues},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dataPointSecondaryGroupByValues",{get:function(){return this._dataPointSecondaryGroupByValues},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isSecondary",{get:function(){return this._isSecondary},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasPrimaryGroupByValue",{get:function(){return this._hasPrimaryGroupByValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasSecondaryGroupByValue",{get:function(){return this._hasSecondaryGroupByValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"legendText",{get:function(){return this._legendText},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this._name},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"primaryGroupByValue",{get:function(){return this._primaryGroupByValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"reportOnFieldOptionId",{get:function(){return this._reportOnFieldOptionId},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"secondaryGroupByValue",{get:function(){return this._secondaryGroupByValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"totalText",{get:function(){return this._totalText},enumerable:!1,configurable:!0}),t}();t.ChartDataSeries=e}(AutotaskWidgetSystem||(AutotaskWidgetSystem={})),function(t){var e=function(){function t(t,e,n,i){this._fontSize=t,this._isRightAlignedHorizontally=e,this._isCenteredVertically=n,this._isClickAssociatedWithDataPoint=i}return Object.defineProperty(t.prototype,"fontSize",{get:function(){return this._fontSize},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isCenteredVertically",{get:function(){return this._isCenteredVertically},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isClickAssociatedWithDataPoint",{get:function(){return this._isClickAssociatedWithDataPoint},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isRightAlignedHorizontally",{get:function(){return this._isRightAlignedHorizontally},enumerable:!1,configurable:!0}),t}();t.ChartLegendOptions=e}(AutotaskWidgetSystem||(AutotaskWidgetSystem={})),function(t){var e=function(t){function e(e,n){var i=t.call(this,e)||this;return i._chartWidgetId=e,i._isDrilldownEnabled=n,i._drilldownEventHandler=null,i}return __extends(e,t),Object.defineProperty(e.prototype,"drilldownEventHandler",{set:function(t){this._drilldownEventHandler=t},enumerable:!1,configurable:!0}),e.prototype.__initialize=function(){var t=this;this._isDrilldownEnabled&&AutotaskDomSystem.Document.getElementById(this._chartWidgetId).addEventListener("click",(function(){t._onClick()}))},e.prototype._onClick=function(){null!==this._drilldownEventHandler&&this._drilldownEventHandler()},e}(Autotask.LifecycleObject);t.ChartTotal=e}(AutotaskWidgetSystem||(AutotaskWidgetSystem={})),function(t){var e=function(){function t(t,e){this._dataPointXValues=t,this._dataPointYValues=e}return Object.defineProperty(t.prototype,"dataPointXValues",{get:function(){return this._dataPointXValues},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dataPointYValues",{get:function(){return this._dataPointYValues},enumerable:!1,configurable:!0}),t}();t.ChartTrendLineOptions=e}(AutotaskWidgetSystem||(AutotaskWidgetSystem={})),function(t){var e=function(){function t(t){this._title=t}return Object.defineProperty(t.prototype,"title",{get:function(){return this._title},enumerable:!1,configurable:!0}),t}();t.ChartXAxisOptions=e}(AutotaskWidgetSystem||(AutotaskWidgetSystem={})),function(t){var e=function(){function t(t,e,n,i,o,a,r,s){this._isSecondary=t,this._title=e,this._prefix=n,this._suffix=i,this._interval=o,this._minValue=a,this._maxValue=r,this._labelAngle=s}return Object.defineProperty(t.prototype,"interval",{get:function(){return this._interval},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isSecondary",{get:function(){return this._isSecondary},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"labelAngle",{get:function(){return this._labelAngle},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maxValue",{get:function(){return this._maxValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"minValue",{get:function(){return this._minValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"prefix",{get:function(){return this._prefix},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"suffix",{get:function(){return this._suffix},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"title",{get:function(){return this._title},enumerable:!1,configurable:!0}),t}();t.ChartYAxisOptions=e}(AutotaskWidgetSystem||(AutotaskWidgetSystem={})),function(t){var e=function(t){function e(e,n,i,o,a,r,s){return t.call(this,e,n,i,o,a,r,s)||this}return __extends(e,t),Object.defineProperty(e.prototype,"_chartType",{get:function(){return"column"},enumerable:!1,configurable:!0}),e}(t.ChartWidget);t.ColumnChartWidget=e}(AutotaskWidgetSystem||(AutotaskWidgetSystem={})),function(t){var e=function(t){function e(e,n,i,o,a,r,s){return t.call(this,e,n,i,o,a,r,s)||this}return __extends(e,t),Object.defineProperty(e.prototype,"_chartType",{get:function(){return"pie"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_isLegendCenteredVertically",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_isLegendClickAssociatedWithDataPoint",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_isLegendRightAlignedHorizontally",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_legendFontSize",{get:function(){return 11},enumerable:!1,configurable:!0}),e}(t.ChartWidget);t.PieChartWidget=e}(AutotaskWidgetSystem||(AutotaskWidgetSystem={})),function(t){var e=function(t){function e(e,n,i,o,a,r,s){return t.call(this,e,n,i,o,a,r,s)||this}return __extends(e,t),Object.defineProperty(e.prototype,"_chartType",{get:function(){return"doughnut"},enumerable:!1,configurable:!0}),e}(t.PieChartWidget);t.DoughnutChartWidget=e}(AutotaskWidgetSystem||(AutotaskWidgetSystem={})),function(t){var e=function(e){function n(t,n,i,o,a){var r=e.call(this,t,n,i,o)||this;return r._gaugeWidgetId=t,r._gaugeCount=a,r._gauges=[],r}return __extends(n,e),Object.defineProperty(n.prototype,"__gaugeCount",{get:function(){return this._gaugeCount},enumerable:!1,configurable:!0}),n.prototype.__dispose=function(){this._gauges.forEach((function(t){t.__dispose()})),e.prototype.__dispose.call(this)},n.prototype.__initialize=function(){e.prototype.__initialize.call(this);for(var t=0,n=AutotaskDomSystem.Document.getElementById(this._gaugeWidgetId),i=AutotaskDomSystem.Document.getChildElementByClassName(n,"Content"),o=AutotaskDomSystem.Document.getChildElementByClassName(i,"GaugeTable"),a=0,r=AutotaskDomSystem.Document.getChildElementsByClassName(o,"GaugeColumn");a<r.length;a++)for(var s=r[a],l=0,u=AutotaskDomSystem.Document.getChildElementsByClassName(s,"GaugeContainer");l<u.length;l++){var c=u[l],d=AutotaskDomSystem.Document.getChildElementsByClassName(c,"Gauge");if(d.length>0){var h=d[0],_=this._createGauge(h,t);null!==_&&(_.__render(),this._gauges.push(_))}t++}},n.prototype._clickHandler=function(e){if(this.isDrilldownEnabled){var n=new t.DrilldownEventArgs(e.gaugeConfigurationId,this.contentTypeId,!1,null,!1,null,null,this.widgetFilterData,e.isCtrlKeyPressed);this.onDrilldown(n)}},n}(t.DrilldownWidget);t.GaugeWidget=e}(AutotaskWidgetSystem||(AutotaskWidgetSystem={})),function(t){var e=function(t){function e(e,n,i,o,a){var r=t.call(this,e,n,i,o,a.length)||this;return r._optionsList=a,r}return __extends(e,t),e.prototype._createGauge=function(t,e){var n=this,i=null,o=this._optionsList[e];return null!==o&&(i=new AutotaskGaugeSystem.DoughnutGauge(t,o,this.__gaugeCount,(function(t){n._clickHandler(t)}))),i},e}(t.GaugeWidget);t.DoughnutGaugeWidget=e}(AutotaskWidgetSystem||(AutotaskWidgetSystem={})),function(t){var e=function(){function t(t,e,n,i,o,a,r,s,l){this._contentId=t,this._widgetContentTypeId=e,this._hasPrimaryGroupByValue=n,this._primaryGroupByValue=i,this._hasSecondaryGroupByValue=o,this._secondaryGroupByValue=a,this._reportOnFieldOptionId=r,this._filterData=s,this._isCtrlKeyPressed=l}return t.prototype.get_contentId=function(){return this._contentId},t.prototype.get_filterData=function(){return this._filterData},t.prototype.get_isCtrlKeyPressed=function(){return this._isCtrlKeyPressed},t.prototype.get_hasPrimaryGroupByValue=function(){return this._hasPrimaryGroupByValue},t.prototype.get_hasSecondaryGroupByValue=function(){return this._hasSecondaryGroupByValue},t.prototype.get_primaryGroupByValue=function(){return this._primaryGroupByValue},t.prototype.get_reportOnFieldOptionId=function(){return this._reportOnFieldOptionId},t.prototype.get_secondaryGroupByValue=function(){return this._secondaryGroupByValue},t.prototype.get_widgetContentTypeId=function(){return this._widgetContentTypeId},t}();t.DrilldownEventArgs=e}(AutotaskWidgetSystem||(AutotaskWidgetSystem={})),function(t){var e=function(t){function e(e,n,i,o,a,r,s){return t.call(this,e,n,i,o,a,r,s)||this}return __extends(e,t),Object.defineProperty(e.prototype,"_chartType",{get:function(){return"funnel"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_isLegendCenteredVertically",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_isLegendClickAssociatedWithDataPoint",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_isLegendRightAlignedHorizontally",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_legendFontSize",{get:function(){return 11},enumerable:!1,configurable:!0}),e}(t.ChartWidget);t.FunnelChartWidget=e}(AutotaskWidgetSystem||(AutotaskWidgetSystem={})),function(t){var e=function(e){function n(t,n,i,o,a,r){var s=e.call(this,t,i,o,a)||this;return s._gridWidgetConfigurationId=n,s._gridId=r,s._immutableData=[],s}return __extends(n,e),n.prototype.get_widgetGrid=function(){var e=autotask.find(this._gridId);return new t.WidgetGrid(e)},n.prototype.generateImmutableData=function(){for(var t=new AutotaskRequestDataSystem.SerializedRequestData([]),e=0,n=this._immutableData;e<n.length;e++){var i=n[e];t.__addImmutableData(i)}return t},n.prototype.__addImmutableData=function(t){this._immutableData.push(t)},n.prototype.__initialize=function(){var t=this;if(this.isDrilldownEnabled){var e=autotask.find(this._gridId);e.__addShowAllRecords((function(e){t._showAllRecords(e)})),e.__registerUserInteractionEventHandlers((function(){t._userInteractionEventStarted()}),(function(){t._userInteractionEventEnded()}))}},n.prototype._showAllRecords=function(e){var n=new t.DrilldownEventArgs(this._gridWidgetConfigurationId,this.contentTypeId,!1,null,!1,null,null,this.widgetFilterData,e.get_isCtrlKeyPressed());this.onDrilldown(n)},n.prototype._userInteractionEventEnded=function(){this._onUserInteractionEventEnded()},n.prototype._userInteractionEventStarted=function(){this._onUserInteractionEventStarted()},n}(t.DrilldownWidget);t.GridWidget=e}(AutotaskWidgetSystem||(AutotaskWidgetSystem={})),function(t){var e=function(t){function e(e,n){return t.call(this,e,n)||this}return __extends(e,t),e}(t.Widget);t.HtmlWidget=e}(AutotaskWidgetSystem||(AutotaskWidgetSystem={})),function(t){var e=function(t){function e(e,n,i,o,a,r,s){return t.call(this,e,n,i,o,a,r,s)||this}return __extends(e,t),Object.defineProperty(e.prototype,"_chartType",{get:function(){return"line"},enumerable:!1,configurable:!0}),e}(t.ChartWidget);t.LineChartWidget=e}(AutotaskWidgetSystem||(AutotaskWidgetSystem={})),function(t){var e=function(t){function e(e,n){return t.call(this,e,n)||this}return __extends(e,t),e}(t.Widget);t.MessageWidget=e}(AutotaskWidgetSystem||(AutotaskWidgetSystem={})),function(t){var e=function(t){function e(e,n,i,o,a){var r=t.call(this,e,n,i,o,a.length)||this;return r._optionsList=a,r}return __extends(e,t),e.prototype._createGauge=function(t,e){var n=this,i=null,o=this._optionsList[e];return null!==o&&(i=new AutotaskGaugeSystem.NeedleGauge(t,o,(function(t){n._clickHandler(t)}))),i},e}(t.GaugeWidget);t.NeedleGaugeWidget=e}(AutotaskWidgetSystem||(AutotaskWidgetSystem={})),function(t){var e=function(t){function e(e,n,i,o,a){var r=t.call(this,e,n,i,o,a.length)||this;return r._optionsList=a,r}return __extends(e,t),e.prototype._createGauge=function(t,e){var n=this,i=null,o=this._optionsList[e];return null!==o&&(i=new AutotaskGaugeSystem.NumberGauge(t,o,this.__gaugeCount,(function(t){n._clickHandler(t)}))),i},e}(t.GaugeWidget);t.NumberGaugeWidget=e}(AutotaskWidgetSystem||(AutotaskWidgetSystem={})),function(t){var e=function(t){function e(e,n,i,o,a,r,s){return t.call(this,e,n,i,o,a,r,s)||this}return __extends(e,t),Object.defineProperty(e.prototype,"_chartType",{get:function(){return"stackedBar100"},enumerable:!1,configurable:!0}),e}(t.BarChartWidget);t.StackedBar100ChartWidget=e}(AutotaskWidgetSystem||(AutotaskWidgetSystem={})),function(t){var e=function(t){function e(e,n,i,o,a,r,s){return t.call(this,e,n,i,o,a,r,s)||this}return __extends(e,t),Object.defineProperty(e.prototype,"_chartType",{get:function(){return"stackedBar"},enumerable:!1,configurable:!0}),e}(t.BarChartWidget);t.StackedBarChartWidget=e}(AutotaskWidgetSystem||(AutotaskWidgetSystem={})),function(t){var e=function(t){function e(e,n,i,o,a,r,s){return t.call(this,e,n,i,o,a,r,s)||this}return __extends(e,t),Object.defineProperty(e.prototype,"_chartType",{get:function(){return"stackedColumn100"},enumerable:!1,configurable:!0}),e}(t.ColumnChartWidget);t.StackedColumn100ChartWidget=e}(AutotaskWidgetSystem||(AutotaskWidgetSystem={})),function(t){var e=function(t){function e(e,n,i,o,a,r,s){return t.call(this,e,n,i,o,a,r,s)||this}return __extends(e,t),Object.defineProperty(e.prototype,"_chartType",{get:function(){return"stackedColumn"},enumerable:!1,configurable:!0}),e}(t.ColumnChartWidget);t.StackedColumnChartWidget=e}(AutotaskWidgetSystem||(AutotaskWidgetSystem={})),function(t){var e=function(e){function n(t,n,i,o,a,r){var s=e.call(this,t,i,o,r)||this;return s._tableWidgetId=t,s._chartConfigurationId=n,s._isTotalEnabled=a,s}return __extends(n,e),n.prototype.__initialize=function(){if(this.isDrilldownEnabled){var t=AutotaskDomSystem.Document.getElementById(this._tableWidgetId);this._setTableCellClickHandler(t),this._isTotalEnabled&&this._setTotalClickHandler(t)}},n.prototype._onTableCellClick=function(t){var e=t.target;if(null===e)autotask.throwException("TableWidget._onTableCellClick MouseEvent.target is null.");else{var n=e,i=this._createTableCellDrilldownEventArgs(n,t.ctrlKey);this.onDrilldown(i)}},n.prototype._onTotalClick=function(e){var n=new t.DrilldownEventArgs(this._chartConfigurationId,this.contentTypeId,!1,null,!1,null,null,this.widgetFilterData,e.ctrlKey);this.onDrilldown(n)},n.prototype._createTableCellDrilldownEventArgs=function(e,n){var i=!1;null!==AutotaskDomSystem.Document.getIntegerAttributeValue(e,"data-hpgbv")&&(i=!0);var o=!1;null!==AutotaskDomSystem.Document.getIntegerAttributeValue(e,"data-hsgbv")&&(o=!0);var a=AutotaskDomSystem.Document.getIntegerAttributeValue(e,"data-pgbv"),r=AutotaskDomSystem.Document.getIntegerAttributeValue(e,"data-sgbv"),s=e.getAttribute("data-rofi");return new t.DrilldownEventArgs(this._chartConfigurationId,this.contentTypeId,i,a,o,r,s,this.widgetFilterData,n)},n.prototype._setTableCellClickHandler=function(t){var e=this,n=t.querySelector("table");if(null===n)autotask.throwException("Could not find table element.");else{for(var i=n.querySelectorAll("th.DD"),o=0;o<i.length;o++)i[o].addEventListener("click",(function(t){e._onTableCellClick(t)}));var a=n.querySelectorAll("td.DD");for(o=0;o<a.length;o++)a[o].addEventListener("click",(function(t){e._onTableCellClick(t)}))}},n.prototype._setTotalClickHandler=function(t){var e=this,n=t.getElementsByClassName("TableTotal");0===n.length?autotask.throwException("Could not find total element."):n[0].addEventListener("click",(function(t){e._onTotalClick(t)}))},n}(t.DrilldownWidget);t.TableWidget=e}(AutotaskWidgetSystem||(AutotaskWidgetSystem={})),function(t){var e=function(t){function e(e,n){return t.call(this,e,n)||this}return __extends(e,t),e}(t.Widget);t.VendorWidget=e}(AutotaskWidgetSystem||(AutotaskWidgetSystem={})),function(t){var e=function(e){function n(t,n){var i=e.call(this,t)||this;return i._chartColors=n,i}return __extends(n,e),n.prototype.__finalize=function(){for(var e=0;e<this._chartColors.length;e++)this._chartColors[e]="#"+this._chartColors[e];t.CanvasJsChart.addColorSet("dashboardColorSet",this._chartColors)},n}(Autotask.LifecycleObject);t.ColorCoordinator=e}(AutotaskWidgetSystem||(AutotaskWidgetSystem={})),function(t){var e=function(t){function e(e,n,i){var o=t.call(this,e)||this;return o._contextMenuId=i,o._contextMenuButton=AutotaskDomSystem.Document.getElementById(n),o._contextMenuInteractionEventsCoordinator=new AutotaskOverlaySystem.InteractionEventsCoordinator(o._contextMenuButton,(function(){o._showContextMenu()}),(function(){o._hideContextMenu()})),o._contextMenuShowingHandler=null,o._contextMenuHidingHandler=null,o._contextMenu=null,o}return __extends(e,t),e.prototype.setContextMenuHidingHandler=function(t){this._contextMenuHidingHandler=t},e.prototype.setContextMenuShowingHandler=function(t){this._contextMenuShowingHandler=t},e.prototype.__dispose=function(){this._contextMenuInteractionEventsCoordinator.__dispose()},e.prototype.__initialize=function(){var t=this;this._contextMenu=autotask.find(this._contextMenuId),this._contextMenu.addHideCompletedHandler((function(){t._onHideComplete()}))},e.prototype._hideContextMenu=function(){null!==this._contextMenu&&(this._contextMenu.hide(),null!==this._contextMenuHidingHandler&&this._contextMenuHidingHandler())},e.prototype._showContextMenu=function(){null!==this._contextMenu&&(null!==this._contextMenuShowingHandler&&this._contextMenuShowingHandler(),this._contextMenuButton.classList.add("Hover"),this._contextMenu.show(this._contextMenuButton))},e.prototype._onHideComplete=function(){this._contextMenuButton.classList.remove("Hover")},e}(Autotask.LifecycleObject);t.WidgetContextMenuCoordinator=e}(AutotaskWidgetSystem||(AutotaskWidgetSystem={})),function(t){var e=function(){function t(t){this._grid=t}return t.prototype.get_gridId=function(){return this._grid.get_gridId()},t.prototype.addRemovingRows=function(t){this._grid.addRemovingRows(t)},t.prototype.addRowClick=function(t){this._grid.addRowClick(t)},t.prototype.addStateChanging=function(t){this._grid.addStateChanging(t)},t.prototype.getAccessoryDataValue=function(t,e){return this._grid.getAccessoryDataValue(t,e)},t.prototype.refresh=function(){this._grid.refresh()},t.prototype.removeRows=function(t,e,n,i){this._grid.removeRows(t,e,n,i)},t}();t.WidgetGrid=e}(AutotaskWidgetSystem||(AutotaskWidgetSystem={}));var __extends=this&&this.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),__awaiter=this&&this.__awaiter||function(t,e,n,i){return new(n||(n=Promise))((function(o,a){function r(t){try{l(i.next(t))}catch(t){a(t)}}function s(t){try{l(i.throw(t))}catch(t){a(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(r,s)}l((i=i.apply(t,e||[])).next())}))},__generator=this&&this.__generator||function(t,e){var n,i,o,a,r={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(o=2&a[0]?i.return:a[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,a[1])).done)return o;switch(i=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(!(o=r.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){r.label=a[1];break}if(6===a[0]&&r.label<o[1]){r.label=o[1],o=a;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(a);break}o[2]&&r.ops.pop(),r.trys.pop();continue}a=e.call(t,r)}catch(t){a=[6,t],i=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}},AutotaskAccessoryTabSystem,AutotaskAccessoryTabSystem,AutotaskAccessoryTabSystem,AutotaskAccessoryTabSystem,AutotaskAccessoryTabSystem,AutotaskAccessoryTabSystem,AutotaskAccessoryTabSystem,AutotaskAccessoryTabSystem,AutotaskAccessoryTabSystem,AutotaskAccessoryTabSystem,AutotaskActivitySystem,AutotaskActivitySystem,AutotaskActivitySystem,AutotaskQuickTimeEntryMinutesBox,AutotaskQuickTimeEntryMinutesBox,AutotaskAjaxSystem,AutotaskAnnouncementsIndicatorSystem,AutotaskAnnouncementsIndicatorSystem,AutotaskAnnouncementsIndicatorSystem,AutotaskAuthenticationSystem,AutotaskAuthenticationSystem,AutotaskAuthenticationSystem,AutotaskAuthenticationSystem,AutotaskAuthenticationSystem,AutotaskBngPaymentSystem,AutotaskBngPaymentSystem,AutotaskBngPaymentSystem,AutotaskBngPaymentSystem,AutotaskBngPaymentSystem,AutotaskBngPaymentSystem,AutotaskBngPaymentSystem,AutotaskBngPaymentSystem,AutotaskBngPaymentSystem,AutotaskBngPaymentSystem,AutotaskBngPaymentSystem,AutotaskBngPaymentSystem,AutotaskBngPaymentSystem,AutotaskBngPaymentSystem,AutotaskMvcBoardsSystem,AutotaskMvcBoardsSystem,AutotaskMvcBoardsSystem,AutotaskMvcBoardsSystem,AutotaskMvcBoardsSystem,AutotaskMvcBoardsSystem,AutotaskMvcBoardsSystem,AutotaskMvcBoardsSystem,AutotaskMvcBoardsSystem,AutotaskMvcBoardsSystem,AutotaskMvcBoardsSystem,AutotaskMvcBoardsSystem,AutotaskButtonEventsSystem,AutotaskButtonEventsSystem,AutotaskButtonEventsSystem,AutotaskButtons,AutotaskButtons,AutotaskButtons,AutotaskButtons,AutotaskButtons,AutotaskButtons,AutotaskButtons,Autotask,Autotask,Autotask,Autotask,Autotask,Autotask,Autotask,Autotask,Autotask,Autotask,Autotask,Autotask,Autotask,Autotask,Autotask,Autotask,Autotask,AutotaskChecklistSystem,AutotaskChecklistSystem,AutotaskChecklistSystem,AutotaskChecklistSystem,AutotaskChecklistSystem,AutotaskChecklistSystem,AutotaskChecklistSystem,AutotaskChecklistSystem,AutotaskChecklistSystem,AutotaskIntegrations,AutotaskLocalizationSystem,AutotaskSessionExpirationSystem,AutotaskOverlaySystem,AutotaskPerformanceInstrumentationSystem,AutotaskPerformanceInstrumentationSystem,AutotaskPerformanceInstrumentationSystem,Autotask,Autotask,AutotaskDashboardNavigationSystem,AutotaskDashboardNavigationSystem,AutotaskDashboardNavigationSystem,AutotaskDashboardSystem,AutotaskDialogSystem,AutotaskDialogSystem,AutotaskDialogSystem,AutotaskDialogSystem,AutotaskDialogSystem,AutotaskDialogSystem,AutotaskDialogSystem,AutotaskDirtyStateSystem,AutotaskDirtyStateSystem,AutotaskDirtyStateSystem,AutotaskDirtyStateSystem,AutotaskDocumentationManagerPages,AutotaskDocumentationManagerPages,AutotaskDocumentationManagerPages,AutotaskDocumentationManagerPages,AutotaskDocumentationManagerPages,AutotaskDocumentationManagerPages,AutotaskDocumentationManagerPages,AutotaskDocumentationManagerPages,Autotask,Autotask,Autotask,Autotask,Autotask,Autotask,Autotask,Autotask,Autotask,Autotask,Autotask,Autotask,Autotask,Autotask,Autotask,Autotask,Autotask,Autotask,Autotask,Autotask,Autotask,Autotask,Autotask,Autotask,Autotask,Autotask,Autotask,Autotask,Autotask,Autotask,Autotask,Autotask,Autotask,Autotask,Autotask,Autotask,Autotask,Autotask,AutotaskColorSelector,AutotaskColorSelector,AutotaskEntityPages,AutotaskEntityPages,AutotaskEntityPages,AutotaskEntityPages,AutotaskEntityDetailPage,AutotaskEntityDetailPage,AutotaskEntityEditPage,AutotaskEntityEditPage,AutotaskEntityEditPage,AutotaskEntityEditPage,AutotaskFileUploadSystem,AutotaskFileUploadSystem,AutotaskFrameEventSystem,AutotaskFrameEventSystem,AutotaskGuideSystem,AutotaskGuideSystem,AutotaskHomepageSystem,AutotaskHomepageSystem,AutotaskHomepageSystem,AutotaskImageViewerSystem,AutotaskImageViewerSystem,AutotaskImageViewerSystem,AutotaskImageViewerSystem,AutotaskImageViewerSystem,AutotaskImageViewerSystem,AutotaskImageViewerSystem,AutotaskImageViewerSystem,AutotaskMvcImmutableDataSystem,AutotaskMvcImmutableDataSystem,AutotaskMvcImmutableDataSystem,AutotaskMvcImmutableDataSystem,AutotaskMvcImmutableDataSystem,AutotaskMvcImmutableDataSystem,AutotaskMvcImmutableDataSystem,AutotaskInsightSystem,AutotaskInsightSystem,AutotaskInsightSystem,AutotaskInsightSystem,AutotaskInsightSystem,AutotaskIntegrations,AutotaskLoginNotificationSystem,AutotaskLoginNotificationSystem,AutotaskMessageBarSystem,AutotaskNavigationButtonBarEventRegistrationSystem,AutotaskNavigationButtonBarEventRegistrationSystem,AutotaskOverlays,AutotaskOverlays,AutotaskOverlays,AutotaskOverlays,AutotaskPageDirectorySystem,AutotaskPages,AutotaskPages,AutotaskPages,AutotaskPages,AutotaskPages,AutotaskPages,AutotaskPages,AutotaskPages,AutotaskPages,AutotaskPages,AutotaskPerformanceInstrumentationSystem,AutotaskPerformanceInstrumentationSystem,AutotaskPerformanceInstrumentationSystem,AutotaskPerformanceInstrumentationSystem,AutotaskPerformanceInstrumentationSystem,AutotaskQuickEditSystem,AutotaskQuickEditSystem,AutotaskReadOnlyDataSystem,AutotaskReadOnlyDataSystem,AutotaskReadOnlyDataSystem,AutotaskReadOnlyDataSystem,AutotaskReadOnlyDataSystem,AutotaskReadOnlyDataSystem,AutotaskRealTimeDataSystem,AutotaskRealTimeDataSystem,AutotaskRealTimeDataSystem,AutotaskReplaceableColumnSystem,Autotask,Autotask,AutotaskSaveCoordinatorSystem,AutotaskSaveCoordinatorSystem,AutotaskSaveCoordinatorSystem,AutotaskSaveCoordinatorSystem,AutotaskSaveCoordinatorSystem,AutotaskSaveCoordinatorSystem,AutotaskSaveCoordinatorSystem,AutotaskSaveCoordinatorSystem,AutotaskSaveCoordinatorSystem,AutotaskScheduleCalendarSystem,AutotaskScheduleCalendarSystem,AutotaskSearchMenuSystem,AutotaskSearchMenuSystem,Autotask,Autotask,Autotask,Autotask,Autotask,Autotask,AutotaskSecuritySystem,AutotaskSecuritySystem,AutotaskSecuritySystem,AutotaskSessionExpirationSystem,AutotaskSessionExpirationSystem,AutotaskSessionExpirationSystem,AutotaskSessionExpirationSystem,AutotaskSessionExpirationSystem,AutotaskSessionExpirationSystem,AutotaskSessionExpirationSystem,AutotaskShellContent,AutotaskShellContent,AutotaskShellContent,AutotaskSiteNavigationSystem,AutotaskSiteNavigationSystem,AutotaskSiteNavigationSystem,AutotaskSiteNavigationSystem,AutotaskSiteNavigationSystem,AutotaskSiteNavigationSystem,AutotaskSiteNavigationSystem,AutotaskSiteNavigationSystem,AutotaskSlideOutSystem,AutotaskSlideOutSystem,AutotaskSlideOutSystem,AutotaskSummaryPages,AutotaskSummaryPages,AutotaskSummaryPages,AutotaskSummaryPages,AutotaskSummaryPages,AutotaskSummaryPages,AutotaskSummaryPages,AutotaskThemeSystem,AutotaskTimeEntryTimelineSystem,AutotaskTimeEntryTimelineSystem,AutotaskTimeEntryTimelineSystem,AutotaskTimeEntryTimelineSystem,AutotaskTimeEntryTimelineSystem,AutotaskTimeEntryTimelineSystem,AutotaskTimeEntryTimelineSystem,AutotaskTimeEntryTimelineSystem,AutotaskTimeEntryTimelineSystem,AutotaskToolBarSystem,AutotaskWorkListBadgeSystem,AutotaskWorkListBadgeSystem,AutotaskWorkListBadgeSystem,AutotaskWorkspaceSystem,AutotaskWorkspaceSystem;!function(t){var e=function(t){function e(e){var n=t.call(this,e,!0)||this;return n._defaultStyleCoordinator=new AutotaskOverlaySystem.DefaultStyleCoordinator(n._overlayElementStyleApplicator),n}return __extends(e,t),e.prototype.show=function(t){this._show(t)},Object.defineProperty(e.prototype,"_delayBeforeHiding",{get:function(){return 300},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_delayBeforeShowing",{get:function(){return 0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_styleCoordinator",{get:function(){return this._defaultStyleCoordinator},enumerable:!1,configurable:!0}),e.prototype._createPositionCoordinator=function(t){var e=new AutotaskOverlaySystem.PositionCoordinator,n=new AutotaskPositionSystem.BottomAlignedRight(0,-1),i=new AutotaskPositionApplicatorSystem.Default(this._defaultStyleCoordinator,t,null,null);return e.addPositionAndApplicator(n,i),e},e}(AutotaskOverlaySystem.ContextOverlay);t.AccessoryTabButtonBarContextMenu=e}(AutotaskAccessoryTabSystem||(AutotaskAccessoryTabSystem={})),function(t){var e=function(t){function e(e,n,i){var o=t.call(this,e)||this;return o._contextMenuId=i,o._contextMenuButton=AutotaskDomSystem.Document.getElementById(n),o._contextMenuInteractionEventsCoordinator=new AutotaskOverlaySystem.InteractionEventsCoordinator(o._contextMenuButton,(function(){o._showContextMenu()}),(function(){o._hideContextMenu()})),o._contextMenuShowingHandler=null,o._contextMenuHidingHandler=null,o._contextMenu=null,o}return __extends(e,t),e.prototype.setContextMenuHidingHandler=function(t){this._contextMenuHidingHandler=t},e.prototype.setContextMenuShowingHandler=function(t){this._contextMenuShowingHandler=t},e.prototype.__dispose=function(){this._contextMenuInteractionEventsCoordinator.__dispose()},e.prototype.__initialize=function(){var t=this;this._contextMenu=autotask.find(this._contextMenuId),this._contextMenu.addHideCompletedHandler((function(){t._onHideComplete()}))},e.prototype._hideContextMenu=function(){null!==this._contextMenu&&(this._contextMenu.hide(),null!==this._contextMenuHidingHandler&&this._contextMenuHidingHandler())},e.prototype._showContextMenu=function(){null!==this._contextMenu&&(null!==this._contextMenuShowingHandler&&this._contextMenuShowingHandler(),this._contextMenuButton.classList.add("Hover"),this._contextMenu.show(this._contextMenuButton))},e.prototype._onHideComplete=function(){this._contextMenuButton.classList.remove("Hover")},e}(Autotask.LifecycleObject);t.AccessoryTabButtonBarContextMenuCoordinator=e}(AutotaskAccessoryTabSystem||(AutotaskAccessoryTabSystem={})),function(t){var e=function(t){function e(e,n,i,o){var a=t.call(this,e)||this;a._buttonIds=n;var r=new AccessoryTabManagementCreator;a._accessoryTabManagement=r.createAccessoryTabManagement(n,i,o),a._accessoryTabManagement.__set_tabChangedPointer((function(){a._accessoryTabChanged()}));var s=AutotaskDomSystem.Document.getElementById(e);return a._tabbingSystem=new AutotaskTabbingSystem.TabbingSystem(s,(function(t){a._tabbingAwayHandler(t)})),a._tabbingAwayHandlers=[],a}return __extends(e,t),Object.defineProperty(e.prototype,"isEnabled",{get:function(){return!0},enumerable:!1,configurable:!0}),e.prototype.addTabbingAwayHandler=function(t){this._tabbingAwayHandlers.push(t),this._tabbingSystem.isEnabled||(this._tabbingSystem.reset(),this._tabbingSystem.isEnabled=!0)},e.prototype.focus=function(){this._tabbingSystem.focusFirstParticipant()},e.prototype.focusEnd=function(){this._tabbingSystem.focusLastParticipant()},e.prototype.focusStart=function(){this.focus()},e.prototype.__initialize=function(){for(var t=this,e=0,n=this._buttonIds;e<n.length;e++){var i=n[e];autotask.find(i).setClickHandler((function(e,n){t._buttonClickHandler(e,n)}))}},e.prototype._buttonClickHandler=function(t,e){null!==e?this._accessoryTabManagement.__selectAccessoryTab(t,e):this._accessoryTabManagement.__selectActivityTab(t)},e.prototype._tabbingAwayHandler=function(t){if(this._tabbingAwayHandlers.length>0)for(var e=new AutotaskTabbingSystem.TabbingAwayEventArgs(this.id,t,(function(){})),n=0,i=this._tabbingAwayHandlers;n<i.length;n++){(0,i[n])(e)}},e}(Autotask.LifecycleObject);t.AccessoryTabCoordinator=e}(AutotaskAccessoryTabSystem||(AutotaskAccessoryTabSystem={})),function(t){var e=function(t){function e(e,n){var i=t.call(this,e)||this;return i._accessoryTabShellId=n,i._accessoryTabShell=null,i}return __extends(e,t),e.prototype.refreshCurrentTab=function(t){this._accessoryTabShell.__refreshCurrentTab(t)},e.prototype.__initialize=function(){this._accessoryTabShell=autotask.find(this._accessoryTabShellId)},e}(Autotask.LifecycleObject);t.AccessoryTabShellFacade=e}(AutotaskAccessoryTabSystem||(AutotaskAccessoryTabSystem={})),function(t){var e=function(t){function e(e,n){var i=t.call(this,e)||this;return i._activityTabShellId=n,i._activityTabShell=null,i}return __extends(e,t),e.prototype.refresh=function(){this._activityTabShell.__refreshConversation()},e.prototype.__initialize=function(){this._activityTabShell=autotask.find(this._activityTabShellId)},e}(Autotask.LifecycleObject);t.ActivityTabShellFacade=e}(AutotaskAccessoryTabSystem||(AutotaskAccessoryTabSystem={})),function(t){var e=function(t){function e(e){var n=t.call(this,e)||this;return n._activityTabCoordinator=null,n}return __extends(e,t),Object.defineProperty(e.prototype,"activityTabCoordinator",{get:function(){return this._activityTabCoordinator},enumerable:!1,configurable:!0}),e.prototype.addQuickReply=function(t){this.activityTabCoordinator.addQuickReply(t)},e.prototype.activateConversationViewInReplyTo=function(t,e){this.activityTabCoordinator.activateConversationViewInReplyTo(t,e)},e.prototype.attemptQuickNoteActivation=function(t){this.activityTabCoordinator.attemptQuickNoteActivation(t)},e.prototype.clearGuestNoteHandlers=function(){this.activityTabCoordinator.clearGuestNoteHandlers()},e.prototype.configureGuestNoteHandlers=function(t,e){this.activityTabCoordinator.configureGuestNoteHandlers(t,e)},e.prototype.copyImageLink=function(){this.activityTabCoordinator.copyImageLink()},e.prototype.deactivateConversationView=function(){this.activityTabCoordinator.deactivateConversationView()},e.prototype.downloadImage=function(){this.activityTabCoordinator.downloadImage()},e.prototype.expandReplies=function(t){this.activityTabCoordinator.expandReplies(t)},e.prototype.guestNoteSubmittingComplete=function(t){this.activityTabCoordinator.guestNoteSubmittingComplete(t)},e.prototype.openImage=function(){this.activityTabCoordinator.openImage()},e.prototype.openLinkAttachmentDialog=function(t){window.autotask.ajax.postRequest(t,null,null).dialog()},e.prototype.registerActivityTabCoordinator=function(t){this._activityTabCoordinator=t},e.prototype.registerImageAttachment=function(t,e,n,i,o){this.activityTabCoordinator.registerImageAttachment(t,e,n,i,o)},e.prototype.registerQuickNote=function(t,e,n){this.activityTabCoordinator.registerQuickNote(t,e,n)},e.prototype.retrieveExtendedInformation=function(t,e){this.activityTabCoordinator.retrieveExtendedInformation(t,e)},e.prototype.scrollToConversationViewReply=function(t){this.activityTabCoordinator.scrollToConversationViewReply(t)},e.prototype.searchNewContent=function(t){this.activityTabCoordinator.searchNewContent(t)},e.prototype.showImage=function(t){this.activityTabCoordinator.showImage(t)},e.prototype.showUnabbreviatedInformationDialog=function(t,e){this.activityTabCoordinator.showUnabbreviatedInformationDialog(t,e)},e.prototype.unregisterQuickNote=function(t){this.activityTabCoordinator.unregisterQuickNote(t)},e}(Autotask.LifecycleObject);t.ConversationItemCoordinator=e}(AutotaskAccessoryTabSystem||(AutotaskAccessoryTabSystem={})),function(t){var e=function(t){function e(e,n,i,o){return t.call(this,e,n,i,o)||this}return __extends(e,t),e.prototype._accessoryTabChanged=function(){autotask.findPage().get_saveCoordinator().__clearAccessoryTabHandlers()},e}(t.AccessoryTabCoordinator);t.PageAccessoryTabCoordinator=e}(AutotaskAccessoryTabSystem||(AutotaskAccessoryTabSystem={})),function(t){var e=function(t){function e(e,n){var i=t.call(this,e)||this;return i._activityTabShellId=n,i._activityTabRefreshCompleteDelegate=null,i._activityTabShellInstance=null,i._imageRegistrar=null,i._imageViewerActivator=null,i._pageInstance=null,i._isActivityLoading=!1,i}return __extends(e,t),Object.defineProperty(e.prototype,"_activityTabShell",{get:function(){return this._activityTabShellInstance},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_imageViewer",{get:function(){return this._pageInstance.__get_imageViewer()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_saveCoordinator",{get:function(){return this._pageInstance.get_saveCoordinator()},enumerable:!1,configurable:!0}),e.prototype.activateConversationViewInReplyTo=function(t,e){this._activityTabShell.__activateConversationViewInReplyTo(t,e)},e.prototype.addQuickReply=function(t){this._activityTabShell.__addQuickReply(t)},e.prototype.applyFilters=function(t){this._activityTabShell.__applyFilters(t)},e.prototype.attemptQuickNoteActivation=function(t){this._activityTabShell.__attemptQuickNoteActivation(t)},e.prototype.clearFilters=function(){this._activityTabShell.__clearFilters()},e.prototype.clearGuestNoteHandlers=function(){this._saveCoordinator.__clearGuestActivityNoteHandlers()},e.prototype.configureGuestNoteHandlers=function(t,e){this._saveCoordinator.__configureGuestActivityNoteHandlers(t,e)},e.prototype.copyImageLink=function(){this._imageViewer.copyLinkToClipboard()},e.prototype.deactivateConversationView=function(){this._activityTabShell.__deactivateConversationView()},e.prototype.downloadImage=function(){this._imageViewer.downloadImage()},e.prototype.expandReplies=function(t){this._activityTabShell.__expandReplies(t)},e.prototype.guestNoteSubmittingComplete=function(t){this._saveCoordinator.completeStep(t)},e.prototype.openImage=function(){this._imageViewer.openImage()},e.prototype.registerImageAttachment=function(t,e,n,i,o){null===this._imageRegistrar?autotask.throwException("Registration is not valid."):this._imageRegistrar.registerImage(t,e,n,i,o)},e.prototype.registerQuickNote=function(t,e,n){this._activityTabShell.__registerQuickNote(t,e,n)},e.prototype.retrieveExtendedInformation=function(t,e){this._activityTabShell.__retrieveExtendedInformation(t,e)},e.prototype.scrollToConversationViewReply=function(t){this._activityTabShell.__scrollToConversationViewReply(t)},e.prototype.searchNewContent=function(t){this._activityTabShell.__searchNewContent(t)},e.prototype.showImage=function(t){var e=this;this._isActivityLoading?(autotask.overlayManagement.__showLoadingIndicator(),this._activityTabRefreshCompleteDelegate=function(){autotask.overlayManagement.__hideLoadingIndicator(),e._showImageViewer(t)}):this._showImageViewer(t)},e.prototype.showUnabbreviatedInformationDialog=function(t,e){this._activityTabShell.__showUnabbreviatedInformationDialog(t,e)},e.prototype.unregisterQuickNote=function(t){this._activityTabShell.__unregisterQuickNote(t)},e.prototype.__initialize=function(){var t=this;this._activityTabShellInstance=autotask.find(this._activityTabShellId),this._activityTabShellInstance.__addConversationItemAddedHandler((function(e){t._activityTabShellConversationItemAddHandler(e)})),this._activityTabShellInstance.__addRefreshStartingHandler((function(){t._activityTabShellRefreshStartingHandler()})),this._activityTabShellInstance.__addRefreshCompleteHandler((function(){t._activityTabShellRefreshCompleteHandler()})),this._pageInstance=autotask.findPage(),this._pageInstance.get_saveCoordinator().__configureActivityNoteHandlers((function(){return t._saveCoordinatorActivityNoteValidatingHandler()}),(function(e){t._saveCoordinatorActivityNoteSubmittingHandler(e)}))},e.prototype._activityTabShellConversationItemAddHandler=function(t){t.registerActivityTabCoordinator(this)},e.prototype._activityTabShellRefreshCompleteHandler=function(){this._isActivityLoading=!1,null===this._imageRegistrar?autotask.throwException("The image registrar does not exist."):this._imageViewerActivator=this._imageRegistrar.createActivator(),null!==this._activityTabRefreshCompleteDelegate&&(this._activityTabRefreshCompleteDelegate(),this._activityTabRefreshCompleteDelegate=null)},e.prototype._activityTabShellRefreshStartingHandler=function(){this._imageViewerActivator=null,this._imageRegistrar=new AutotaskImageViewerSystem.ActivityImageRegistrar,this._isActivityLoading=!0},e.prototype._saveCoordinatorActivityNoteSubmittingHandler=function(t){var e=this;this._activityTabShell.__submitQuickNotes(t,(function(t){e._saveCoordinator.completeStep(t)}))},e.prototype._saveCoordinatorActivityNoteValidatingHandler=function(){return this._activityTabShell.__validateQuickNotes()},e.prototype._showImageViewer=function(t){null===this._imageViewerActivator?autotask.throwException("The activator does not exist."):this._imageViewer.show(this._imageViewerActivator,t)},e}(Autotask.LifecycleObject);t.PageActivityTabCoordinator=e}(AutotaskAccessoryTabSystem||(AutotaskAccessoryTabSystem={})),function(t){var e=function(t){function e(e,n,i,o,a){var r=t.call(this,e,i,o,a)||this;return r._shellContentId=n,r}return __extends(e,t),e.prototype._accessoryTabChanged=function(){autotask.find(this._shellContentId).saveCoordinator.__clearAccessoryTabHandlers()},e}(t.AccessoryTabCoordinator);t.ShellContentAccessoryTabCoordinator=e}(AutotaskAccessoryTabSystem||(AutotaskAccessoryTabSystem={})),function(t){var e=function(t){function e(e,n,i){var o=t.call(this,e)||this;return o._shellContentId=n,o._activityTabShellId=i,o._activityTabRefreshCompleteDelegate=null,o._activityTabShellInstance=null,o._imageRegistrar=null,o._imageViewerActivator=null,o._imageViewerInstance=null,o._shellContentInstance=null,o._isActivityLoading=!1,o}return __extends(e,t),Object.defineProperty(e.prototype,"_activityTabShell",{get:function(){return this._activityTabShellInstance},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_imageViewer",{get:function(){return this._imageViewerInstance},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_shellContent",{get:function(){return this._shellContentInstance},enumerable:!1,configurable:!0}),e.prototype.activateConversationViewInReplyTo=function(t,e){this._activityTabShell.__activateConversationViewInReplyTo(t,e)},e.prototype.addQuickReply=function(t){this._activityTabShell.__addQuickReply(t)},e.prototype.applyFilters=function(t){this._activityTabShell.__applyFilters(t)},e.prototype.attemptQuickNoteActivation=function(t){this._activityTabShell.__attemptQuickNoteActivation(t)},e.prototype.clearFilters=function(){this._activityTabShell.__clearFilters()},e.prototype.clearGuestNoteHandlers=function(){this._shellContent.saveCoordinator.__clearGuestActivityNoteHandlers()},e.prototype.configureGuestNoteHandlers=function(t,e){this._shellContent.saveCoordinator.__configureGuestActivityNoteHandlers(t,e)},e.prototype.copyImageLink=function(){this._imageViewer.copyLinkToClipboard()},e.prototype.deactivateConversationView=function(){this._activityTabShellInstance.__deactivateConversationView()},e.prototype.downloadImage=function(){this._imageViewer.downloadImage()},e.prototype.expandReplies=function(t){this._activityTabShellInstance.__expandReplies(t)},e.prototype.guestNoteSubmittingComplete=function(t){this._shellContent.saveCoordinator.completeStep(t)},e.prototype.openImage=function(){this._imageViewer.openImage()},e.prototype.registerImageAttachment=function(t,e,n,i,o){null===this._imageRegistrar?autotask.throwException("Registration is not valid."):this._imageRegistrar.registerImage(t,e,n,i,o)},e.prototype.registerQuickNote=function(t,e,n){this._activityTabShellInstance.__registerQuickNote(t,e,n)},e.prototype.retrieveExtendedInformation=function(t,e){this._activityTabShellInstance.__retrieveExtendedInformation(t,e)},e.prototype.searchNewContent=function(t){this._activityTabShellInstance.__searchNewContent(t)},e.prototype.showImage=function(t){var e=this;this._isActivityLoading?(autotask.overlayManagement.__showLoadingIndicator(),this._activityTabRefreshCompleteDelegate=function(){autotask.overlayManagement.__hideLoadingIndicator(),e._showImageViewer(t)}):this._showImageViewer(t)},e.prototype.scrollToConversationViewReply=function(t){this._activityTabShellInstance.__scrollToConversationViewReply(t)},e.prototype.showUnabbreviatedInformationDialog=function(t,e){this._activityTabShellInstance.__showUnabbreviatedInformationDialog(t,e)},e.prototype.unregisterQuickNote=function(t){this._activityTabShellInstance.__unregisterQuickNote(t)},e.prototype.__initialize=function(){var t=this;this._activityTabShellInstance=autotask.find(this._activityTabShellId),this._activityTabShellInstance.__addConversationItemAddedHandler((function(e){t._activityTabShellConversationItemAddHandler(e)})),this._activityTabShellInstance.__addRefreshStartingHandler((function(){t._activityTabShellRefreshStartingHandler()})),this._activityTabShellInstance.__addRefreshCompleteHandler((function(){t._activityTabShellRefreshCompleteHandler()})),this._shellContentInstance=autotask.find(this._shellContentId),this._shellContentInstance.saveCoordinator.__configureActivityNoteHandlers((function(){return t._saveCoordinatorActivityNoteValidatingHandler()}),(function(e){t._saveCoordinatorActivityNoteSubmittingHandler(e)}));var e=autotask.findPage();this._imageViewerInstance=e.__get_imageViewer()},e.prototype._activityTabShellConversationItemAddHandler=function(t){t.registerActivityTabCoordinator(this)},e.prototype._activityTabShellRefreshCompleteHandler=function(){this._isActivityLoading=!1,null===this._imageRegistrar?autotask.throwException("The image registrar does not exist."):this._imageViewerActivator=this._imageRegistrar.createActivator(),null!==this._activityTabRefreshCompleteDelegate&&(this._activityTabRefreshCompleteDelegate(),this._activityTabRefreshCompleteDelegate=null)},e.prototype._activityTabShellRefreshStartingHandler=function(){this._imageViewerActivator=null,this._imageRegistrar=new AutotaskImageViewerSystem.ActivityImageRegistrar,this._isActivityLoading=!0},e.prototype._saveCoordinatorActivityNoteSubmittingHandler=function(t){var e=this;this._activityTabShell.__submitQuickNotes(t,(function(t){e._shellContent.saveCoordinator.completeStep(t)}))},e.prototype._saveCoordinatorActivityNoteValidatingHandler=function(){return this._activityTabShell.__validateQuickNotes()},e.prototype._showImageViewer=function(t){null===this._imageViewerActivator?autotask.throwException("The activator does not exist."):this._imageViewer.show(this._imageViewerActivator,t)},e}(Autotask.LifecycleObject);t.ShellContentActivityTabCoordinator=e}(AutotaskAccessoryTabSystem||(AutotaskAccessoryTabSystem={})),function(t){var e=function(){function t(){this._idleHandlers=[],this._idleInterval=null,this._idleTimeInSeconds=0,this._isIdle=!1,this._resumeEventTimestamp=0,this._resumeHandlers=[]}return t.prototype._incrementIdleTimer=function(){this._idleTimeInSeconds++,59===this._idleTimeInSeconds&&this._onIdle()},t.prototype._onIdle=function(){this._isIdle=!0,this._idleHandlers.length>0&&window.autotask.eventManagement.__executeHandlers(null,this._idleHandlers,null)},t.prototype._onMouseMove=function(t){this._resumeActivity(t.timeStamp)},t.prototype._onResume=function(){this._isIdle&&(this._resumeHandlers.length>0&&window.autotask.eventManagement.__executeHandlers(null,this._resumeHandlers,null),this._isIdle=!1)},t.prototype._onTouchMove=function(t){this._resumeActivity(t.timeStamp)},t.prototype.resumeActivityForWorkListPopup=function(t){this._resumeActivity(t)},t.prototype.resumeActivityActionFromLegacy=function(t){this._resumeActivity(t)},t.prototype.addIdleHandler=function(t){this._idleHandlers.push(t)},t.prototype.addResumeHandler=function(t){this._resumeHandlers.push(t)},t.prototype.initialize=function(){this.resumeActivityMonitoring(),this._registerHandlers()},t.prototype.resumeActivityMonitoring=function(){var t=this;null===this._idleInterval&&(this._idleInterval=window.setInterval((function(){t._incrementIdleTimer()}),1e3))},t.prototype.suspendActivityMonitoring=function(){null!==this._idleInterval&&(window.clearInterval(this._idleInterval),this._idleInterval=null,this._onIdle())},t.prototype._registerHandlers=function(){document.body.addEventListener("touchmove",this._onTouchMove.bind(this),{passive:!0}),document.body.addEventListener("mousemove",this._onMouseMove.bind(this))},t.prototype._resumeActivity=function(t){null!==this._idleInterval&&t-this._resumeEventTimestamp>1e3&&(this._onResume(),this._idleTimeInSeconds=0,this._resumeEventTimestamp=t)},t}();t.ActivityManagement=e}(AutotaskActivitySystem||(AutotaskActivitySystem={})),function(t){var e=function(){function t(t){this._activityManagement=t}return t.prototype.addIdleHandler=function(t){this._activityManagement.addIdleHandler(t)},t.prototype.addResumeHandler=function(t){this._activityManagement.addResumeHandler(t)},t.prototype.initialize=function(){this._activityManagement.initialize()},t.prototype.resumeActivityMonitoring=function(){this._activityManagement.resumeActivityMonitoring()},t.prototype.suspendActivityMonitoring=function(){this._activityManagement.suspendActivityMonitoring()},t}();t.InternalPageFacade=e}(AutotaskActivitySystem||(AutotaskActivitySystem={})),function(t){var e=function(){function t(t){this._activityManagement=t}return t.prototype.resumeActivityForWorkListPopup=function(t){this._activityManagement.resumeActivityForWorkListPopup(t)},t.prototype.resumeActivityActionFromLegacy=function(t){this._activityManagement.resumeActivityActionFromLegacy(t)},t}();t.PageFacade=e}(AutotaskActivitySystem||(AutotaskActivitySystem={})),function(t){var e=function(t){function e(e,n,i,o,a){var r=this,s=AutotaskDomSystem.Document.getElementById(e);return(r=t.call(this,e,s,null,i,n,!1,o)||this)._primaryElement=s.parentElement,r._primaryElement.addEventListener("click",(function(){r._primaryElementClickListener()})),r._primaryElement.addEventListener("mouseleave",(function(){r._primaryElementMouseLeaveListener()})),r._contextOverlayId=a,r._contextOverlay=null,r._activeCssClass="Active",r._disabledCssClass="Disabled",r._isActive=!1,r._activatedHandlers=[],r}return __extends(e,t),Object.defineProperty(e.prototype,"isActive",{set:function(t){this._isActive=t,t?this._primaryElement.classList.add(this._activeCssClass):this._primaryElement.classList.remove(this._activeCssClass)},enumerable:!1,configurable:!0}),e.prototype.addActivatedHandler=function(t){this._activatedHandlers.push(t)},e.prototype.__initialize=function(){this._contextOverlay=autotask.find(this._contextOverlayId)},e.prototype._convertNumberToDisplayString=function(t){var e=null;return null!==t&&(e=window.autotask.convert.integerToStringWithoutGroupSeparator(t)),e},e.prototype._convertNumberToSerializedString=function(t){return this._convertNumberToString(t)},e.prototype._convertDisplayStringToNumber=function(t){return window.autotask.convert.stringToInteger(t)},e.prototype._isANumber=function(e){return t.prototype._isANumber.call(this,e)&&e>=0&&e<=1439},e.prototype._raiseBlurEvent=function(){t.prototype._raiseBlurEvent.call(this),this._contextOverlay.hide()},e.prototype._raiseChangeEvent=function(){},e.prototype._raiseFocusEvent=function(){t.prototype._raiseFocusEvent.call(this),this._showOverlay()},e.prototype._raiseImmediateChangeEvent=function(t,e){},e.prototype._setIsEnabled=function(e){e?(this.isActive=!0,this._primaryElement.classList.remove(this._disabledCssClass)):this._primaryElement.classList.add(this._disabledCssClass),t.prototype._setIsEnabled.call(this,e)},e.prototype._contextOverlaySelectionHandler=function(t){this.value=t,this._contextOverlay.hideWithoutDelay()},e.prototype._convertNumberToString=function(t){var e=null;return null!==t&&(e=window.autotask.convert.integerToString(t)),e},e.prototype._primaryElementClickListener=function(){this.isEnabled&&(this._isActive||this._raiseActivatedEvent(),this.focus(),this._showOverlay())},e.prototype._primaryElementMouseLeaveListener=function(){this._contextOverlay.hide()},e.prototype._raiseActivatedEvent=function(){for(var t=0,e=this._activatedHandlers;t<e.length;t++){(0,e[t])()}},e.prototype._showOverlay=function(){var t=this;this._contextOverlay.show(this._primaryElement,(function(e){t._contextOverlaySelectionHandler(e)}))},e}(AutotaskEditorSystem.NumberBox);t.QuickTimeEntryMinutesBox=e}(AutotaskQuickTimeEntryMinutesBox||(AutotaskQuickTimeEntryMinutesBox={})),function(t){var e=function(t){function e(e,n,i){var o=t.call(this,e)||this;return o._invalidNumberMessage=n,o._rangeValidator=i,o}return __extends(e,t),Object.defineProperty(e.prototype,"_isRequired",{get:function(){return!1},enumerable:!1,configurable:!0}),e.prototype.resetValidationResult=function(t){this._updateValidationResult(new AutotaskEditorSystem.ValidResult,!1,t,!0)},e.prototype.validate=function(t,e,n,i){var o=new AutotaskEditorSystem.ValidResult;return e?o.isValid&&(o=this._rangeValidator.validate(t)):o=new AutotaskEditorSystem.InvalidResult(this._invalidNumberMessage,null),this._updateValidationResult(o,n,i,!0),o.isValid},e}(AutotaskEditorSystem.EditorValidation);t.QuickTimeEntryMinutesBoxValidation=e}(AutotaskQuickTimeEntryMinutesBox||(AutotaskQuickTimeEntryMinutesBox={})),function(t){var e=function(){function t(){this._data=new AutotaskRequestDataSystem.RequestData}return Object.defineProperty(t.prototype,"requestData",{get:function(){return this._data},enumerable:!1,configurable:!0}),t.prototype.addRequestData=function(t){this._data=t},t}();t.SubmittingEventArgs=e}(AutotaskAjaxSystem||(AutotaskAjaxSystem={})),function(t){var e=function(){function t(){this._activeCssClass="Active",this._announcementElement=null,this._engagementReportElement=null,this._siteNavigationElement=null}return t.prototype.registerAnnouncementsElement=function(t){this._announcementElement=t},t.prototype.registerEngagementReportElement=function(t){this._engagementReportElement=t},t.prototype.registerSiteNavigationElement=function(t){this._siteNavigationElement=t},t.prototype.updateAnnouncementsIndicator=function(t){if(null!==this._announcementElement){var e=this._announcementElement.classList.contains(this._activeCssClass);t&&!e?(this._announcementElement.classList.add(this._activeCssClass),this._increment()):!t&&e&&(this._announcementElement.classList.remove(this._activeCssClass),this._decrement())}},t.prototype.updateEngagementReportIndicator=function(t){if(null!==this._engagementReportElement){var e=this._engagementReportElement.classList.contains(this._activeCssClass);t&&!e?(this._engagementReportElement.classList.add(this._activeCssClass),this._increment()):!t&&e&&(this._engagementReportElement.classList.remove(this._activeCssClass),this._decrement())}},t.prototype._decrement=function(){if(null!==this._siteNavigationElement){var t=this._siteNavigationElement.textContent;if(null!==t){var e=parseInt(t,10);0===--e&&this._siteNavigationElement.classList.remove(this._activeCssClass),this._siteNavigationElement.textContent=e.toString()}}},t.prototype._increment=function(){if(null!==this._siteNavigationElement){var t=this._siteNavigationElement.textContent;if(null!==t){var e=parseInt(t,10);1===++e&&this._siteNavigationElement.classList.add(this._activeCssClass),this._siteNavigationElement.textContent=e.toString()}}},t}();t.AnnouncementsIndicatorManagement=e}(AutotaskAnnouncementsIndicatorSystem||(AutotaskAnnouncementsIndicatorSystem={})),function(t){var e=function(){function t(t){this._announcementsIndicatorManagement=t}return t.prototype.registerAnnouncementsElement=function(t){this._announcementsIndicatorManagement.registerAnnouncementsElement(t)},t.prototype.registerEngagementReportElement=function(t){this._announcementsIndicatorManagement.registerEngagementReportElement(t)},t.prototype.registerSiteNavigationElement=function(t){this._announcementsIndicatorManagement.registerSiteNavigationElement(t)},t}();t.InternalPageFacade=e}(AutotaskAnnouncementsIndicatorSystem||(AutotaskAnnouncementsIndicatorSystem={})),function(t){var e=function(){function t(t){this._announcementsIndicatorManagement=t}return t.prototype.updateAnnouncementsIndicator=function(t){this._announcementsIndicatorManagement.updateAnnouncementsIndicator(t)},t.prototype.updateEngagementReportIndicator=function(t){this._announcementsIndicatorManagement.updateEngagementReportIndicator(t)},t}();t.PageFacade=e}(AutotaskAnnouncementsIndicatorSystem||(AutotaskAnnouncementsIndicatorSystem={})),function(t){var e=function(t){function e(e){var n=t.call(this,e)||this;return n._textBoxElement=AutotaskDomSystem.Document.getElementById(e),n}return __extends(e,t),e.prototype.get_value=function(){return this._textBoxElement.value},e.prototype.set_value=function(t){this._textBoxElement.value=t},e}(Autotask.LifecycleObject);t.AuthenticationHiddenTextBox=e}(AutotaskAuthenticationSystem||(AutotaskAuthenticationSystem={})),function(t){var e=function(t){function e(e,n){var i=t.call(this,e)||this;autotask.registerPage(i);var o=AutotaskDomSystem.Document.getElementByClassName("PrimaryContentContainer");i._transitionContainer=AutotaskDomSystem.Document.getChildElementByClassName(o,"TransitionContainer"),i._transitionContainerInitialHeight=i._transitionContainer.clientHeight,i._columnContainerElements=i._createContainerElementList(),i._loadingIndicatorMap=i._createLoadingIndicatorMap(),i._visibleColumnContainer=i._findContainerElement(n);var a=new AutotaskButtonEventsSystem.ButtonEventsManagement;return i._buttonEvents=new AutotaskButtonEventsSystem.InternalPageFacade(a),i._sessionExpirationKeys=new AutotaskSessionExpirationSystem.LocalStorageKeys,i._isAnimationAvailable=void 0!==i._visibleColumnContainer.animate,i._animationDuration=500,i._customValidationSummary=null,i._validationSummary=null,i}return __extends(e,t),Object.defineProperty(e.prototype,"__buttonEvents",{get:function(){return this._buttonEvents},enumerable:!1,configurable:!0}),e.prototype.get_customValidationSummary=function(){return this._customValidationSummary},e.prototype.hideLoadingIndicator=function(t){this._findLoadingIndicatorElements(t).backgroundOverlayElement.classList.remove("Active")},e.prototype.postJsonRequest=function(t,e,n){return new AuthenticationRoute(t).json(e,n)},e.prototype.showLoadingIndicator=function(t){this._findLoadingIndicatorElements(t).backgroundOverlayElement.classList.add("Active")},e.prototype.slideColumnFromLeft=function(t,e){if(t===this._visibleColumnContainer.id)return autotask.throwException("AuthenticationPage.slideColumnFromRight: the column is already visible.");var n=this._visibleColumnContainer,i=this._findContainerElement(t);if(this._isAnimationAvailable){n.classList.contains("Active")||(this._transitionContainer.style.height=this._transitionContainerInitialHeight.toString()+"px",n.classList.add("Active")),i.classList.add("StagedLeft"),i.classList.remove("Inactive");var o=i.animate([{left:"-370px"},{left:"0"}],{duration:this._animationDuration,easing:"ease-in-out"});o.pause(),o.onfinish=function(){i.classList.remove("StagedLeft"),i.classList.add("Active"),void 0!==e&&e()},o.play();var a=n.animate([{left:"0"},{left:"370px"}],{duration:this._animationDuration,easing:"ease-in-out"});a.pause(),a.onfinish=function(){n.classList.remove("Active"),n.classList.add("Inactive")},a.play(),this._playOpacityAnimation(n),this._playHeightAnimation(i.clientHeight)}else{n.classList.remove("Active"),n.classList.add("Inactive"),i.classList.remove("Inactive"),i.classList.add("StagedLeft");var r=i.clientHeight;this._transitionContainer.style.height=r.toString()+"px",i.classList.remove("StagedLeft"),i.classList.add("Active"),void 0!==e&&e()}this._visibleColumnContainer=i},e.prototype.slideColumnFromRight=function(t,e){if(t===this._visibleColumnContainer.id)return autotask.throwException("AuthenticationPage.slideColumnFromRight: the column is already visible.");var n=this._visibleColumnContainer,i=this._findContainerElement(t);if(this._isAnimationAvailable){n.classList.contains("Active")||(this._transitionContainer.style.height=this._transitionContainerInitialHeight.toString()+"px",n.classList.add("Active")),i.classList.remove("Inactive"),i.classList.add("StagedRight");var o=i.animate([{right:"-370px"},{right:"0"}],{duration:this._animationDuration,easing:"ease-in-out"});o.pause(),o.onfinish=function(){i.classList.remove("StagedRight"),i.classList.add("Active"),void 0!==e&&e()},o.play();var a=n.animate([{left:"0"},{left:"-370px"}],{duration:this._animationDuration,easing:"ease-in-out"});a.pause(),a.onfinish=function(){n.classList.remove("Active"),n.classList.add("Inactive")},a.play(),this._playOpacityAnimation(n),this._playHeightAnimation(i.clientHeight)}else{n.classList.remove("Active"),n.classList.add("Inactive"),i.classList.remove("Inactive"),i.classList.add("StagedRight");var r=i.clientHeight;this._transitionContainer.style.height=r.toString()+"px",i.classList.remove("StagedRight"),i.classList.add("Active"),void 0!==e&&e()}this._visibleColumnContainer=i},e.prototype.__initialize=function(){var t=this,e=document.getElementsByTagName("body")[0];this._validationSummary=autotask.validationSummaryManagement.__findValidationSummaryUsingElement(e),this._customValidationSummary=this._validationSummary.__get_customValidationSummary(),this._cleanLocalStorage(),autotask.localStorageManagement.__addStorageChangedHandler((function(e,n){t._isInitializedChanged(e,n)}))},e.prototype._cleanLocalStorage=function(){autotask.localStorageManagement.__removeItem(this._sessionExpirationKeys.isInitializedKey),autotask.localStorageManagement.__setItem(this._sessionExpirationKeys.isLoggedOutKey,"1"),window.localStorage.removeItem("WalkMeIsDisabled"),window.localStorage.removeItem("CooperBotIsDisabled")},e.prototype._createContainerElementList=function(){for(var t=[],e=0;e<this._transitionContainer.children.length;e++){var n=this._transitionContainer.children[e];t.push(n)}return t},e.prototype._createLoadingIndicatorMap=function(){for(var t=[],e=0,n=this._columnContainerElements;e<n.length;e++){var i=n[e],o=i.id,a=AutotaskDomSystem.Document.getChildElementByClassName(i,"BackgroundOverlay"),r=AutotaskDomSystem.Document.getChildElementByClassName(i,"LoadingIndicator");t.push({columnId:o,loadingIndicatorElement:r,backgroundOverlayElement:a})}return t},e.prototype._findContainerElement=function(t){for(var e=null,n=0,i=this._columnContainerElements;n<i.length;n++){var o=i[n];if(t===o.id){e=o;break}}return null===e?autotask.throwException("AuthenticationPage._findContainerElement: could not find id "+t):e},e.prototype._findLoadingIndicatorElements=function(t){for(var e=null,n=0,i=this._loadingIndicatorMap;n<i.length;n++){var o=i[n];if(t===o.columnId){e={loadingIndicatorElement:o.loadingIndicatorElement,backgroundOverlayElement:o.backgroundOverlayElement};break}}return null===e?autotask.throwException("AuthenticationPage._findLoadingIndicatorElements: could not find id "+t):e},e.prototype._isInitializedChanged=function(t,e){t===this._sessionExpirationKeys.isInitializedKey&&null!==e&&window.location.reload()},e.prototype._playHeightAnimation=function(t){var e=this,n=this._transitionContainer.clientHeight;if(t!==n){var i=this._transitionContainer.animate([{height:n.toString()+"px"},{height:t.toString()+"px"}],{duration:this._animationDuration,easing:"ease-in-out"});i.pause(),i.onfinish=function(){e._transitionContainer.style.height=t.toString()+"px"},i.play()}},e.prototype._playOpacityAnimation=function(t){t.animate([{opacity:"1.0"},{opacity:"0"}],this._animationDuration)},e}(Autotask.LifecycleObject);t.AuthenticationPage=e}(AutotaskAuthenticationSystem||(AutotaskAuthenticationSystem={})),function(t){var e=function(t){function e(e,n,i,o){var a=t.call(this,e)||this;return a._backingEditorId=n,a._backingPasswordBoxEditor=void 0,a._changeHandler=i,a._enterKeyUpHandler=o,a}return __extends(e,t),e.prototype.get_enabled=function(){return this._backingEditor.isEnabled},e.prototype.set_enabled=function(t){this._backingEditor.isEnabled=t},e.prototype.get_value=function(){return this._backingEditor.value},e.prototype.set_value=function(t){this._backingEditor.value=t},Object.defineProperty(e.prototype,"_backingEditor",{get:function(){return void 0===this._backingPasswordBoxEditor?autotask.throwException("_backingPasswordBoxEditor is undefined."):this._backingPasswordBoxEditor},enumerable:!1,configurable:!0}),e.prototype.focus=function(){this._backingEditor.focus()},e.prototype.__initialize=function(){var t=this;this._backingPasswordBoxEditor=autotask.find(this._backingEditorId),null!==this._changeHandler&&this._backingEditor.addChangeHandler((function(){t._change()})),null!==this._broadcastKeyUpHandler&&this._backingEditor.addBroadcastKeyUpHandler((function(e){t._broadcastKeyUpHandler(e)}))},e.prototype._broadcastKeyUpHandler=function(t){t.isEnter&&this._raisEnterKeyUpEvent()},e.prototype._change=function(){this._raiseChangeEvent()},e.prototype._raiseChangeEvent=function(){if(null!==this._changeHandler){var t=new Autotask.EditorChangeEventArgs;t.clientInstance=this,this._changeHandler(t)}},e.prototype._raisEnterKeyUpEvent=function(){null!==this._enterKeyUpHandler&&this._enterKeyUpHandler()},e}(Autotask.LifecycleObject);t.AuthenticationPasswordBox=e}(AutotaskAuthenticationSystem||(AutotaskAuthenticationSystem={})),function(t){var e=function(t){function e(e,n,i,o){var a=t.call(this,e)||this;return a._backingEditorId=n,a._backingTextBoxEditor=void 0,a._changeHandler=i,a._enterKeyUpHandler=o,a}return __extends(e,t),e.prototype.get_enabled=function(){return this._backingEditor.isEnabled},e.prototype.set_enabled=function(t){this._backingEditor.isEnabled=t},e.prototype.get_value=function(){return this._backingEditor.value},e.prototype.set_value=function(t){this._backingEditor.value=t},Object.defineProperty(e.prototype,"_backingEditor",{get:function(){return void 0===this._backingTextBoxEditor?autotask.throwException("_backingTextBoxEditor is undefined."):this._backingTextBoxEditor},enumerable:!1,configurable:!0}),e.prototype.focus=function(){this._backingEditor.focus()},e.prototype.__initialize=function(){var t=this;this._backingTextBoxEditor=autotask.find(this._backingEditorId),null!==this._changeHandler&&this._backingEditor.addChangeHandler((function(){t._change()})),null!==this._broadcastKeyUpHandler&&this._backingEditor.addBroadcastKeyUpHandler((function(e){t._broadcastKeyUpHandler(e)}))},e.prototype._broadcastKeyUpHandler=function(t){t.isEnter&&this._raisEnterKeyUpEvent()},e.prototype._change=function(){this._raiseChangeEvent()},e.prototype._raiseChangeEvent=function(){if(null!==this._changeHandler){var t=new Autotask.EditorChangeEventArgs;t.clientInstance=this,this._changeHandler(t)}},e.prototype._raisEnterKeyUpEvent=function(){null!==this._enterKeyUpHandler&&this._enterKeyUpHandler()},e}(Autotask.LifecycleObject);t.AuthenticationTextBox=e}(AutotaskAuthenticationSystem||(AutotaskAuthenticationSystem={})),function(t){var e=function(t){function e(e,n){var i=t.call(this,e)||this;return i._route=n,i}return __extends(e,t),e.prototype.replaceContent=function(t,e,n){var i=this;this._route.__makeRequest(t,e,(function(t,e){i._replaceContentSuccessHandler(t,e,n)}))},e.prototype._replaceContentSuccessHandler=function(t,e,n){autotask.instanceTrackerManagement.__findInstanceTracker(this.id).__loadHtmlAndJavaScript(t,e),null!==n&&n()},e}(Autotask.LifecycleObject);t.ReplaceableParagraphContainer=e}(AutotaskAuthenticationSystem||(AutotaskAuthenticationSystem={})),function(t){var e=function(e){function n(n,i,o,a,r,s,l,u,c){var d=e.call(this,n)||this;d._configurationCompleteDelegate=l,d._processingCompleteDelegate=u,d._errorDelegate=c;var h=[];return h.push(a),h.push(r),h.push(s),d._collectJsCoordinator=new t.CollectJsCoordinator(i,h,o,(function(){d._configurationCompleteHandler()}),(function(t){d._configurationErrorHandler(t)}),(function(t,e){d._validationStateChangeHandler(t,e)}),(function(t){d._paymentRequestCompleteHandler(t)}),(function(t){d._paymentRequestErrorHandler(t)}),(function(t){d._paymentRequestTimeoutHandler(t)})),d._accountOwnerNameFieldHostId=a.hostElementId,d._accountOwnerNameIframeHost=null,d._accountNumberFieldHostId=r.hostElementId,d._accountNumberIframeHost=null,d._routingNumberFieldHostId=s.hostElementId,d._routingNumberIframeHost=null,d}return __extends(n,e),n.prototype.processPaymentData=function(){this._collectJsCoordinator.startPaymentRequest()},n.prototype.resetPaymentFields=function(){this._collectJsCoordinator.configure()},n.prototype.validate=function(){var t=null!==this._accountOwnerNameIframeHost&&this._accountOwnerNameIframeHost.validate(),e=null!==this._accountNumberIframeHost&&this._accountNumberIframeHost.validate(),n=null!==this._routingNumberIframeHost&&this._routingNumberIframeHost.validate();return t&&e&&n},n.prototype.__dispose=function(){var t,e,n;this._collectJsCoordinator.dispose(),null===(t=this._accountNumberIframeHost)||void 0===t||t.dispose(),null===(e=this._accountOwnerNameIframeHost)||void 0===e||e.dispose(),null===(n=this._routingNumberIframeHost)||void 0===n||n.dispose()},n.prototype.__initialize=function(){this._accountOwnerNameIframeHost=autotask.find(this._accountOwnerNameFieldHostId),this._accountNumberIframeHost=autotask.find(this._accountNumberFieldHostId),this._routingNumberIframeHost=autotask.find(this._routingNumberFieldHostId),autotask.overlayManagement.__showLoadingIndicator(),this._collectJsCoordinator.configure()},n.prototype._configurationCompleteHandler=function(){var t,e,n;autotask.overlayManagement.__hideLoadingIndicator(),null===(t=this._accountOwnerNameIframeHost)||void 0===t||t.configure(),null===(e=this._accountNumberIframeHost)||void 0===e||e.configure(),null===(n=this._routingNumberIframeHost)||void 0===n||n.configure(),this._configurationCompleteDelegate()},n.prototype._configurationErrorHandler=function(e){this._raiseErrorEvent(t.PaymentSystemErrorType.CollectJsConfigurationError,e)},n.prototype._paymentRequestCompleteHandler=function(t){null===t.bankAccountData?autotask.throwException("BankAccountInformationCollectionComponent._paymentRequestCompleteHandler did not received the expected response data."):this._processingCompleteDelegate(t)},n.prototype._paymentRequestErrorHandler=function(e){this._raiseErrorEvent(t.PaymentSystemErrorType.CollectJsPaymentRequestError,e)},n.prototype._paymentRequestTimeoutHandler=function(e){this._raiseErrorEvent(t.PaymentSystemErrorType.CollectJsPaymentRequestTimeoutError,"Configured timeout duration: "+e.toString())},n.prototype._raiseErrorEvent=function(e,n){this._errorDelegate(new t.PaymentErrorEventArgs(e,n))},n.prototype._validationStateChangeHandler=function(e,n){var i,o,a;switch(e){case t.CollectJsFieldType.BankAccountOwnerName:null===(i=this._accountOwnerNameIframeHost)||void 0===i||i.updateValidateState(n);break;case t.CollectJsFieldType.BankAccountNumber:null===(o=this._accountNumberIframeHost)||void 0===o||o.updateValidateState(n);break;case t.CollectJsFieldType.BankAccountRoutingNumber:null===(a=this._routingNumberIframeHost)||void 0===a||a.updateValidateState(n);break;default:this._raiseErrorEvent(t.PaymentSystemErrorType.UnexpectedError,"Unexpected CollectJS field type: "+e.toString())}},n}(Autotask.LifecycleObject);t.BankAccountInformationCollectionComponent=e}(AutotaskBngPaymentSystem||(AutotaskBngPaymentSystem={})),function(t){var e=function(t,e,n){this.accountOwnerName=t,this.accountNumber=e,this.routingNumber=n};t.BankAccountProcessingResponseData=e}(AutotaskBngPaymentSystem||(AutotaskBngPaymentSystem={})),function(t){var e=function(){function e(t,e,n,i,o,a,r,s,l){this._tokenizationKey=t,this._fieldDefinitions=e,this._timeoutDuration=n,this._configurationCompleteDelegate=i,this._configurationErrorDelegate=o,this._validationStateChangeDelegate=a,this._paymentRequestCompleteDelegate=r,this._paymentRequestErrorDelegate=s,this._paymentRequestTimeoutDelegate=l,this._collectJsUrl="https://secure.bngpaymentgateway.com/token/Collect.js",this._isDisposed=!1}return e.prototype.configure=function(){var e=this,n={name:"tokenizationKey",value:this._tokenizationKey};t.ScriptElementCoordinator.addElement(this._collectJsUrl,n,(function(){var t=e._createSettings();try{CollectJS.configure(t)}catch(t){var n=t.name,i=t.message;e._configurationErrorDelegate(n+": "+i)}}))},e.prototype.dispose=function(){this._isDisposed=!0},e.prototype.startPaymentRequest=function(){try{CollectJS.startPaymentRequest()}catch(n){var t=n.name,e=n.message;this._paymentRequestErrorDelegate(t+": "+e)}},e.prototype._callback=function(e){if(!this._isDisposed){var n=null;null!==e.card.exp&&null!==e.card.number&&null!==e.card.type&&(n=new t.CreditCardProcessingResponseData(e.card.number,e.card.exp,e.card.type));var i=null;if(null!==e.check.account&&null!==e.check.name&&null!==e.check.aba&&(i=new t.BankAccountProcessingResponseData(e.check.name,e.check.account,e.check.aba)),null===n&&null===i)autotask.throwException("CollectJsCoordinator received neither bank account or credit card response data.");else{var o=new t.PaymentProcessingResponseData(e.token,n,i);this._paymentRequestCompleteDelegate(o)}}},e.prototype._createSettings=function(){var t=this,e={variant:"inline"};e.timeoutDuration=this._timeoutDuration,e.styleSniffer=!0,e.customCss='{ "background-color": "transparent", "border-width": "0" }',e.fieldsAvailableCallback=function(){t._fieldsAvalableCallback()},e.timeoutCallback=function(){t._timeoutCallback()},e.validationCallback=function(e,n,i){t._validationCallback(e,n,i)},e.callback=function(e){t._callback(e)},e.fields={};for(var n=0,i=this._fieldDefinitions;n<i.length;n++){var o=i[n];e.fields[o.fieldType]={},null!==o.placeholderText&&(e.fields[o.fieldType].placeholder=o.placeholderText),e.fields[o.fieldType].selector="#"+o.hostElementId}return e},e.prototype._fieldsAvalableCallback=function(){this._isDisposed||this._configurationCompleteDelegate()},e.prototype._processValidationMessage=function(e,n){var i=e?t.CollectJsValidationState.Valid:t.CollectJsValidationState.Invalid;return n.indexOf("empty")>=0&&(i=t.CollectJsValidationState.Empty),i},e.prototype._timeoutCallback=function(){this._isDisposed||this._paymentRequestTimeoutDelegate(this._timeoutDuration)},e.prototype._validationCallback=function(t,e,n){if(!this._isDisposed){var i=this._processValidationMessage(e,n);this._validationStateChangeDelegate(t,i)}},e}();t.CollectJsCoordinator=e}(AutotaskBngPaymentSystem||(AutotaskBngPaymentSystem={})),function(t){var e=function(t,e,n){this.fieldType=t,this.hostElementId=e,this.placeholderText=n};t.CollectJsFieldConfiguration=e}(AutotaskBngPaymentSystem||(AutotaskBngPaymentSystem={})),function(t){!function(t){t.BankAccountOwnerName="checkname",t.BankAccountNumber="checkaccount",t.BankAccountRoutingNumber="checkaba",t.CreditCardNumber="ccnumber",t.CreditCardExpiration="ccexp",t.CreditCardCvv="cvv"}(t.CollectJsFieldType||(t.CollectJsFieldType={}))}(AutotaskBngPaymentSystem||(AutotaskBngPaymentSystem={})),function(t){!function(t){t[t.Empty=0]="Empty",t[t.Invalid=1]="Invalid",t[t.Valid=2]="Valid"}(t.CollectJsValidationState||(t.CollectJsValidationState={}))}(AutotaskBngPaymentSystem||(AutotaskBngPaymentSystem={})),function(t){var e=function(e){function n(n,i){var o=e.call(this,n)||this;return o._validation=i,o._blurDelegate=function(){o._blurListener()},o._dirtyStateChangeHandlers=[],o._focusDelegate=function(){o._focusListener()},o._focusedCssClass="Focused",o._hostElement=AutotaskDomSystem.Document.getElementById(n),o._invalidCssClass="Invalid",o._iframeElement=null,o._isDirty=!1,o._isValidationFrequencyElevated=!1,o._isValidationOverdue=!0,o._isValidationOverlayDismissed=!1,o._originalValidationState=t.CollectJsValidationState.Empty,o._tabbingAwayHandlers=[],o._validationState=t.CollectJsValidationState.Empty,o._validation.addValidationCorrectedHandler((function(){o._validationCorrected()})),o._validation.addValidationFailedHandler((function(){o._validationFailed()})),o}return __extends(n,e),Object.defineProperty(n.prototype,"isDirty",{get:function(){return this._isDirty},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isEnabled",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"participantValidation",{get:function(){return this._validation},enumerable:!1,configurable:!0}),n.prototype.addDirtyStateChangeHandler=function(t){this._dirtyStateChangeHandlers.push(t)},n.prototype.addTabbingAwayHandler=function(t){this._tabbingAwayHandlers.push(t)},n.prototype.configure=function(){this._iframeElement=AutotaskDomSystem.Document.getChildElementByClassName(this._hostElement,"CollectJSInlineIframe"),this._iframeElement.addEventListener("blur",this._blurDelegate),this._iframeElement.addEventListener("focus",this._focusDelegate)},n.prototype.dispose=function(){null!==this._iframeElement&&(this._iframeElement.removeEventListener("blur",this._blurDelegate),this._iframeElement.removeEventListener("focus",this._focusDelegate))},n.prototype.focus=function(){this._iframeElement.focus()},n.prototype.focusEnd=function(){this.focus()},n.prototype.focusStart=function(){this.focus()},n.prototype.resetValidation=function(){this._isValidationOverdue=!0},n.prototype.validate=function(){return this._validate(!1)},n.prototype.updateValidateState=function(t){t!==this._validationState&&(this._validationState=t,this._manageDirtyState(this._validationState)&&this._raiseDirtyStateChangeEvent(this._isDirty),this._isValidationOverdue=!0,this._validate(!0))},n.prototype._blurListener=function(){this._hostElement.classList.remove(this._focusedCssClass)},n.prototype._focusListener=function(){this._hostElement.classList.add(this._focusedCssClass),this._isValidationOverlayDismissed||!this._isValidationFrequencyElevated||this._validation.validationResult.isValid||this._showValidationOverlay()},n.prototype._manageDirtyState=function(t){var e=!1;return this._isDirty&&t!==this._originalValidationState||(this._isDirty=!this._isDirty,e=!0),e},n.prototype._raiseDirtyStateChangeEvent=function(t){if(this._dirtyStateChangeHandlers.length>0)for(var e=new AutotaskDirtyStateSystem.DirtyStateChangeEventArgs(t),n=0,i=this._dirtyStateChangeHandlers;n<i.length;n++){(0,i[n])(e)}},n.prototype._showValidationOverlay=function(){var t=this;autotask.globalValidationOverlay.show(this._hostElement,this.id,this._validation.validationResult.message,!0,(function(){t._validationOverlayClosed()}),null)},n.prototype._validate=function(t){var e=this._validation.validationResult.isValid;return this._isValidationOverdue&&(e=this._validation.validate(this._validationState,t,this._hostElement),this._isValidationOverdue=!1),e?autotask.globalValidationOverlay.hide(this.id):this._showValidationOverlay(),e},n.prototype._validationCorrected=function(){this._hostElement.classList.remove(this._invalidCssClass)},n.prototype._validationFailed=function(){this._hostElement.classList.add(this._invalidCssClass),this._isValidationFrequencyElevated=!0},n.prototype._validationOverlayClosed=function(){this._isValidationOverlayDismissed=!0},n}(AutotaskEditorSystem.Editor);t.CollectJsIFrameHost=e}(AutotaskBngPaymentSystem||(AutotaskBngPaymentSystem={})),function(t){var e=function(e){function n(t,n,i){var o=e.call(this,t)||this;return o._requiredMessage=n,o._invalidInputMessage=i,o}return __extends(n,e),Object.defineProperty(n.prototype,"_isRequired",{get:function(){return!0},enumerable:!1,configurable:!0}),n.prototype.resetValidationResult=function(t){this._updateValidationResult(new AutotaskEditorSystem.ValidResult,!1,t,!1)},n.prototype.validate=function(e,n,i){var o=new AutotaskEditorSystem.ValidResult;return e===t.CollectJsValidationState.Empty?o=new AutotaskEditorSystem.InvalidResult(this._requiredMessage,null):e===t.CollectJsValidationState.Invalid&&(o=new AutotaskEditorSystem.InvalidResult(this._invalidInputMessage,null)),this._updateValidationResult(o,n,i,!1),o.isValid},n}(AutotaskEditorSystem.EditorValidation);t.CollectJsIframeHostValidation=e}(AutotaskBngPaymentSystem||(AutotaskBngPaymentSystem={})),function(t){var e=function(e){function n(n,i,o,a,r,s,l,u,c){var d=e.call(this,n)||this;d._configurationCompleteDelegate=l,d._processingCompleteDelegate=u,d._errorDelegate=c;var h=[];return h.push(a),h.push(r),h.push(s),d._collectJsCoordinator=new t.CollectJsCoordinator(i,h,o,(function(){d._configurationCompleteHandler()}),(function(t){d._configurationErrorHandler(t)}),(function(t,e){d._validationStateChangeHandler(t,e)}),(function(t){d._paymentRequestCompleteHandler(t)}),(function(t){d._paymentRequestErrorHandler(t)}),(function(t){d._paymentRequestTimeoutHandler(t)})),d._cvvFieldHostId=s.hostElementId,d._cvvIframeHost=null,d._expirationFieldHostId=r.hostElementId,d._expirationIframeHost=null,d._numberFieldHostId=a.hostElementId,d._numberIframeHost=null,d}return __extends(n,e),n.prototype.processPaymentData=function(){this._collectJsCoordinator.startPaymentRequest()},n.prototype.resetPaymentFields=function(){this._collectJsCoordinator.configure()},n.prototype.validate=function(){var t=null!==this._cvvIframeHost&&this._cvvIframeHost.validate(),e=null!==this._expirationIframeHost&&this._expirationIframeHost.validate(),n=null!==this._numberIframeHost&&this._numberIframeHost.validate();return t&&e&&n},n.prototype.__dispose=function(){var t,e,n;this._collectJsCoordinator.dispose(),null===(t=this._numberIframeHost)||void 0===t||t.dispose(),null===(e=this._expirationIframeHost)||void 0===e||e.dispose(),null===(n=this._cvvIframeHost)||void 0===n||n.dispose()},n.prototype.__initialize=function(){this._cvvIframeHost=autotask.find(this._cvvFieldHostId),this._expirationIframeHost=autotask.find(this._expirationFieldHostId),this._numberIframeHost=autotask.find(this._numberFieldHostId),autotask.overlayManagement.__showLoadingIndicator(),this._collectJsCoordinator.configure()},n.prototype._configurationCompleteHandler=function(){var t,e,n;autotask.overlayManagement.__hideLoadingIndicator(),null===(t=this._cvvIframeHost)||void 0===t||t.configure(),null===(e=this._expirationIframeHost)||void 0===e||e.configure(),null===(n=this._numberIframeHost)||void 0===n||n.configure(),this._configurationCompleteDelegate()},n.prototype._configurationErrorHandler=function(e){this._raiseErrorEvent(t.PaymentSystemErrorType.CollectJsConfigurationError,e)},n.prototype._paymentRequestCompleteHandler=function(t){null===t.creditCardData?autotask.throwException("CreditCardInformationCollectionComponent._paymentRequestCompleteHandler did not received the expected response data."):this._processingCompleteDelegate(t)},n.prototype._paymentRequestErrorHandler=function(e){this._raiseErrorEvent(t.PaymentSystemErrorType.CollectJsPaymentRequestError,e)},n.prototype._paymentRequestTimeoutHandler=function(e){this._raiseErrorEvent(t.PaymentSystemErrorType.CollectJsPaymentRequestTimeoutError,"Configured timeout duration: "+e.toString())},n.prototype._raiseErrorEvent=function(e,n){this._errorDelegate(new t.PaymentErrorEventArgs(e,n))},n.prototype._validationStateChangeHandler=function(e,n){var i,o,a;switch(e){case t.CollectJsFieldType.CreditCardCvv:null===(i=this._cvvIframeHost)||void 0===i||i.updateValidateState(n);break;case t.CollectJsFieldType.CreditCardExpiration:null===(o=this._expirationIframeHost)||void 0===o||o.updateValidateState(n);break;case t.CollectJsFieldType.CreditCardNumber:null===(a=this._numberIframeHost)||void 0===a||a.updateValidateState(n);break;default:this._raiseErrorEvent(t.PaymentSystemErrorType.UnexpectedError,"Unexpected CollectJS field type: "+e.toString())}},n}(Autotask.LifecycleObject);t.CreditCardInformationCollectionComponent=e}(AutotaskBngPaymentSystem||(AutotaskBngPaymentSystem={})),function(t){var e=function(t,e,n){this.number=t,this.expiration=e,this.type=n};t.CreditCardProcessingResponseData=e}(AutotaskBngPaymentSystem||(AutotaskBngPaymentSystem={})),function(t){var e=function(t,e){this.errorCode=t,this.errorMessage=e};t.PaymentErrorEventArgs=e}(AutotaskBngPaymentSystem||(AutotaskBngPaymentSystem={})),function(t){var e=function(t,e,n){this.paymentToken=t,this.creditCardData=e,this.bankAccountData=n};t.PaymentProcessingResponseData=e}(AutotaskBngPaymentSystem||(AutotaskBngPaymentSystem={})),function(t){!function(t){t[t.CollectJsConfigurationError=0]="CollectJsConfigurationError",t[t.CollectJsPaymentRequestError=1]="CollectJsPaymentRequestError",t[t.CollectJsPaymentRequestTimeoutError=2]="CollectJsPaymentRequestTimeoutError",t[t.UnexpectedError=3]="UnexpectedError"}(t.PaymentSystemErrorType||(t.PaymentSystemErrorType={}))}(AutotaskBngPaymentSystem||(AutotaskBngPaymentSystem={})),function(t){!function(t){t.addElement=function(t,e,n){if(o=t,!(function(){for(var t=[],e=document.getElementsByTagName("script"),n=0;n<e.length;n++)if(e[n].src.length>0){var i=new URL(e[n].src);t.push(i.pathname)}return t}().indexOf(o)>=0)){var i=document.createElement("script");null!==e&&(i.dataset[e.name]=e.value),i.async=!0,i.addEventListener("load",(function(){n()})),(i=document.body.appendChild(i)).src=t}var o}}(t.ScriptElementCoordinator||(t.ScriptElementCoordinator={}))}(AutotaskBngPaymentSystem||(AutotaskBngPaymentSystem={})),function(t){var e=function(t){function e(e,n){var i=t.call(this,e)||this;return i._backingBoardId=n,i._backingBoardInstance=void 0,i}return __extends(e,t),Object.defineProperty(e.prototype,"_backingBoard",{get:function(){return void 0===this._backingBoardInstance?autotask.throwException("_backingBoardInstance is undefined."):this._backingBoardInstance},enumerable:!1,configurable:!0}),e.prototype.clearSelections=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:return[4,this._backingBoard.clearSelections()];case 1:return t.sent(),[2]}}))}))},e.prototype.getAllKeys=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this._backingBoard.getAllKeys()]}))}))},e.prototype.getKeysNotInDataSet=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this._backingBoard.getKeysNotInDataSet()]}))}))},e.prototype.getSelectedKeys=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this._backingBoard.getSelectedKeys()]}))}))},e.prototype.selectAll=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:return[4,this._backingBoard.selectAll()];case 1:return t.sent(),[2]}}))}))},e.prototype.selectAllNotInDataSet=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:return[4,this._backingBoard.selectAllNotInDataSet()];case 1:return t.sent(),[2]}}))}))},e.prototype.__initialize=function(){var t=this;this._backingBoardInstance=autotask.find(this._backingBoardId),this._backingBoardInstance.addUserInteractionEventHandler((function(){t._backingBoardUserInteractionEventHandler()}))},e.prototype._backingBoardUserInteractionEventHandler=function(){autotask.contextOverlayManagement.__hideVisibleContextOverlays()},e}(Autotask.LifecycleObject);t.Board=e}(AutotaskMvcBoardsSystem||(AutotaskMvcBoardsSystem={})),function(t){var e=function(e){function n(t,n){var i=e.call(this,t)||this;return i._backingBoardShellId=n,i._boardRefreshingHandlers=[],i._onDeckSectionRefreshingHandlers=[],i._backingBoardShellInstance=void 0,i}return __extends(n,e),Object.defineProperty(n.prototype,"_backingBoardShell",{get:function(){return void 0===this._backingBoardShellInstance?autotask.throwException("_backingBoardShellInstance is undefined."):this._backingBoardShellInstance},enumerable:!1,configurable:!0}),n.prototype.addBoardRefreshingHandler=function(t){this._boardRefreshingHandlers.push(t)},n.prototype.addOnDeckSectionRefreshingHandler=function(t){this._onDeckSectionRefreshingHandlers.push(t)},n.prototype.refresh=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,this._backingBoardShell.refresh(t)];case 1:return e.sent(),[2]}}))}))},n.prototype.refreshOnDeckSection=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:return[4,this._backingBoardShell.refreshOnDeckSection()];case 1:return t.sent(),[2]}}))}))},n.prototype.__initialize=function(){var t=this;this._backingBoardShellInstance=autotask.find(this._backingBoardShellId),this._backingBoardShellInstance.addBoardRefreshingHandler((function(e){t._backingBoardShellBoardRefreshingHandler(e)})),this._backingBoardShellInstance.addOnDeckSectionRefreshingHandler((function(e){t._backingBoardShellOnDeckSectionRefreshingHandler(e)})),this._backingBoardShellInstance.addUserInteractionEventHandler((function(){t._backingBoardShellUserInteractionEventHandler()}))},n.prototype._backingBoardShellBoardRefreshingHandler=function(t){this._raiseBoardRefreshingEvent(t.requestData,t.isCompact)},n.prototype._backingBoardShellOnDeckSectionRefreshingHandler=function(t){this._raiseOnDeckSectionRefreshingEvent(t.requestData,t.isCompact)},n.prototype._backingBoardShellUserInteractionEventHandler=function(){autotask.contextOverlayManagement.__hideVisibleContextOverlays()},n.prototype._raiseBoardRefreshingEvent=function(e,n){if(this._boardRefreshingHandlers.length>0)for(var i=new t.BoardShellRefreshingEventArgs(e,n),o=0,a=this._boardRefreshingHandlers;o<a.length;o++){(0,a[o])(i)}},n.prototype._raiseOnDeckSectionRefreshingEvent=function(e,n){if(this._onDeckSectionRefreshingHandlers.length>0)for(var i=new t.BoardShellRefreshingEventArgs(e,n),o=0,a=this._onDeckSectionRefreshingHandlers;o<a.length;o++){(0,a[o])(i)}},n}(Autotask.LifecycleObject);t.BoardShell=e}(AutotaskMvcBoardsSystem||(AutotaskMvcBoardsSystem={})),function(t){var e=function(e){function n(t,n){var i=e.call(this,t)||this;return i._backingCardShellId=n,i._dropConfirmationHandlers=[],i._droppedHandlers=[],i._backingCardShellInstance=void 0,i}return __extends(n,e),Object.defineProperty(n.prototype,"_backingCardShell",{get:function(){return void 0===this._backingCardShellInstance?autotask.throwException("_backingCardShellInstance is undefined."):this._backingCardShellInstance},enumerable:!1,configurable:!0}),n.prototype.addDropConfirmationHandler=function(t){var e=this;this._dropConfirmationHandlers.push(t),1===this._dropConfirmationHandlers.length&&this._backingCardShell.addDropConfirmationHandler((function(t){e._backingCardShellDropConfirmationHandler(t)}))},n.prototype.addDroppedHandler=function(t){this._droppedHandlers.push(t)},n.prototype.refresh=function(t,e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){switch(n.label){case 0:return[4,this._backingCardShell.refresh(t,e)];case 1:return n.sent(),[2]}}))}))},n.prototype.__initialize=function(){var t=this;this._backingCardShellInstance=autotask.find(this._backingCardShellId),this._backingCardShellInstance.addDroppedHandler(this.id,(function(e){t._backingCardShellDroppedHandler(e)}))},n.prototype._backingCardShellDropConfirmationHandler=function(t){this._raiseDropConfirmationEvent(t.columnKey,t.rowKey,t.targetColumnKey,t.targetRowKey,(function(){t.confirm()}),(function(){t.reject()}))},n.prototype._backingCardShellDroppedHandler=function(t){this._raiseDroppedEvent(t.requestData,t.cardKey,t.columnKey,t.rowKey)},n.prototype._raiseDropConfirmationEvent=function(e,n,i,o,a,r){if(this._dropConfirmationHandlers.length>0)for(var s=new t.CardShellDropConfirmationEventArgs(e,n,i,o,a,r),l=0,u=this._dropConfirmationHandlers;l<u.length;l++){(0,u[l])(s)}},n.prototype._raiseDroppedEvent=function(e,n,i,o){if(this._droppedHandlers.length>0)for(var a=new t.CardShellDroppedEventArgs(e,n,i,o),r=0,s=this._droppedHandlers;r<s.length;r++){(0,s[r])(a)}},n}(Autotask.LifecycleObject);t.CardShell=e}(AutotaskMvcBoardsSystem||(AutotaskMvcBoardsSystem={})),function(t){var e=function(e){function n(t,n){var i=e.call(this,t)||this;return i._backingOnDeckSectionId=n,i._backingOnDeckSectionInstance=void 0,i._replacingCardShellEventHandlers=[],i}return __extends(n,e),Object.defineProperty(n.prototype,"_backingOnDeckSection",{get:function(){return void 0===this._backingOnDeckSectionInstance?autotask.throwException("_backingOnDeckSectionInstance is undefined."):this._backingOnDeckSectionInstance},enumerable:!1,configurable:!0}),n.prototype.addReplacingCardShellHandler=function(t){this._replacingCardShellEventHandlers.push(t)},n.prototype.clearSelections=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:return[4,this._backingOnDeckSection.clearSelections()];case 1:return t.sent(),[2]}}))}))},n.prototype.getSelectedKeys=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this._backingOnDeckSection.getSelectedKeys()]}))}))},n.prototype.selectAll=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:return[4,this._backingOnDeckSection.selectAll()];case 1:return t.sent(),[2]}}))}))},n.prototype.__initialize=function(){var t=this;this._backingOnDeckSectionInstance=autotask.find(this._backingOnDeckSectionId),this._backingOnDeckSectionInstance.addReplacingCardShellHandler((function(e){t._backingOnDeckSectionReplacingCardShellHandler(e)})),this._backingOnDeckSectionInstance.addUserInteractionEventHandler((function(){t._backingOnDeckSectionUserInteractionEventHandler()}))},n.prototype._backingOnDeckSectionReplacingCardShellHandler=function(t){this._raiseReplacingCardShellEvent(t.requestData)},n.prototype._backingOnDeckSectionUserInteractionEventHandler=function(){autotask.contextOverlayManagement.__hideVisibleContextOverlays()},n.prototype._raiseReplacingCardShellEvent=function(e){if(this._replacingCardShellEventHandlers.length>0)for(var n=new t.ReplacingCardShellEventArgs(e),i=0,o=this._replacingCardShellEventHandlers;i<o.length;i++){(0,o[i])(n)}},n}(Autotask.LifecycleObject);t.OnDeckSection=e}(AutotaskMvcBoardsSystem||(AutotaskMvcBoardsSystem={})),function(t){var e=function(t,e){this.requestData=t,this.isCompact=e};t.BoardShellRefreshingEventArgs=e}(AutotaskMvcBoardsSystem||(AutotaskMvcBoardsSystem={})),function(t){var e=function(){function t(t,e,n,i,o,a){this.columnKey=t,this.rowKey=e,this.targetColumnKey=n,this.targetRowKey=i,this._confirmHandler=o,this._rejectHandler=a}return t.prototype.confirm=function(){this._confirmHandler()},t.prototype.reject=function(){this._rejectHandler()},t}();t.CardShellDropConfirmationEventArgs=e}(AutotaskMvcBoardsSystem||(AutotaskMvcBoardsSystem={})),function(t){var e=function(t,e,n,i){this.requestData=t,this.cardKey=e,this.columnKey=n,this.rowKey=i};t.CardShellDroppedEventArgs=e}(AutotaskMvcBoardsSystem||(AutotaskMvcBoardsSystem={})),function(t){var e=function(t){this.requestData=t};t.ReplacingCardShellEventArgs=e}(AutotaskMvcBoardsSystem||(AutotaskMvcBoardsSystem={})),function(t){var e=function(t){this.htmlJavaScriptPair=t};t.RefreshBoardRouteResponseData=e}(AutotaskMvcBoardsSystem||(AutotaskMvcBoardsSystem={})),function(t){var e=function(t,e,n,i){this.isRemoved=t,this.htmlJavaScriptPair=i,this.columnKey=e,this.rowKey=n};t.RefreshCardRouteResponseData=e}(AutotaskMvcBoardsSystem||(AutotaskMvcBoardsSystem={})),function(t){var e=function(t){this.htmlJavaScriptPair=t};t.RefreshOnDeckSectionRouteResponseData=e}(AutotaskMvcBoardsSystem||(AutotaskMvcBoardsSystem={})),function(t){var e=function(t,e,n){this.replaceCardShellTrackingKey=t,this.htmlJavaScriptPair=e,this.isEmpty=n};t.ReplaceCardShellRouteResponseData=e}(AutotaskMvcBoardsSystem||(AutotaskMvcBoardsSystem={})),function(t){var e=function(){this.__ctrlKey=null,this.__currentTarget=null,this.__isMouseEvent=null};t.ButtonActionEventArgs=e}(AutotaskButtonEventsSystem||(AutotaskButtonEventsSystem={})),function(t){var e=function(){function e(){this._isMouseDown=!1,this._isPointerDown=!1,this._isPointerEvent=!1,this._isTouchEvent=!1,this._mousePointerType="mouse"}return e.prototype._onClick=function(t){if(this._isTouchEvent){var e=this._retrieveButtonInstance(t),n=this._createButtonActionEventArgs(t,!1);this._performAlternateActionStart(e,n)}this._isTouchEvent=!1},e.prototype._onMouseDown=function(t){var e=!0;t instanceof MouseEvent&&0!==t.button&&(e=!1),this._isTouchEvent||this._isPointerEvent||!e||(this._isMouseDown=!0)},e.prototype._onMouseEnter=function(t){if(!this._isTouchEvent&&!this._isPointerEvent){var e=this._retrieveButtonInstance(t),n=this._createButtonActionEventArgs(t,!0);this._performAlternateActionStart(e,n)}},e.prototype._onMouseLeave=function(t){if(!this._isTouchEvent&&!this._isPointerEvent){var e=this._retrieveButtonInstance(t),n=this._createButtonActionEventArgs(t,!0);this._performAlternateActionEnd(e,n)}this._isPointerEvent=!1,this._isMouseDown=!1},e.prototype._onMouseUp=function(t){if(!this._isTouchEvent&&!this._isPointerEvent&&this._isMouseDown){var e=this._retrieveButtonInstance(t),n=this._createButtonActionEventArgs(t,!0);this._performPrimaryAction(e,n)}this._isMouseDown=!1},e.prototype._onPointerDown=function(){this._isPointerEvent&&(this._isPointerDown=!0)},e.prototype._onPointerOut=function(){this._isPointerDown=!1},e.prototype._onPointerOver=function(t){this._beginPointerEvent(t)},e.prototype._onPointerUp=function(t){if(this._isPointerEvent&&this._isPointerDown){var e=this._retrieveButtonInstance(t),n=this._createButtonActionEventArgs(t,!1);this._performAlternateActionStart(e,n)}this._isPointerDown=!1},e.prototype._onTouchStart=function(){this._beginTouchEvent()},e.prototype.initialize=function(){},e.prototype.registerButton=function(t){t.addEventListener("click",this._onClick.bind(this)),t.addEventListener("mousedown",this._onMouseDown.bind(this)),t.addEventListener("mouseenter",this._onMouseEnter.bind(this)),t.addEventListener("mouseleave",this._onMouseLeave.bind(this)),t.addEventListener("mouseup",this._onMouseUp.bind(this)),window.autotask.browserDetection.isInternetExplorer()?window.autotask.browserDetection.isInternetExplorer()&&(t.addEventListener("pointerdown",this._onPointerDown.bind(this)),t.addEventListener("pointerout",this._onPointerOut.bind(this)),t.addEventListener("pointerover",this._onPointerOver.bind(this)),t.addEventListener("pointerup",this._onPointerUp.bind(this))):t.addEventListener("touchstart",this._onTouchStart.bind(this),{passive:!0})},e.prototype.registerContainer=function(t,e){this._addFilteredEventListener(t,"click",e,this._onClick.bind(this),null),this._addFilteredEventListener(t,"mousedown",e,this._onMouseDown.bind(this),null),this._addFilteredEventListener(t,"mouseenter",e,this._onMouseEnter.bind(this),null),this._addFilteredEventListener(t,"mouseleave",e,this._onMouseLeave.bind(this),null),this._addFilteredEventListener(t,"mouseup",e,this._onMouseUp.bind(this),{}),window.autotask.browserDetection.isInternetExplorer()?window.autotask.browserDetection.isInternetExplorer()&&(this._addFilteredEventListener(t,"pointerdown",e,this._onPointerDown.bind(this),null),this._addFilteredEventListener(t,"pointerout",e,this._onPointerOut.bind(this),null),this._addFilteredEventListener(t,"pointerover",e,this._onPointerOver.bind(this),null),this._addFilteredEventListener(t,"pointerup",e,this._onPointerUp.bind(this),null)):this._addFilteredEventListener(t,"touchstart",e,this._onTouchStart.bind(this),{passive:!0})},e.prototype._addFilteredEventListener=function(t,e,n,i,o){for(var a=t.querySelectorAll(n),r=0;r<a.length;r++)null===o?a[r].addEventListener(e,i):a[r].addEventListener(e,i,o)},e.prototype._beginPointerEvent=function(t){t.pointerType!==this._mousePointerType&&(this._isPointerEvent=!0),this._isTouchEvent=!1},e.prototype._beginTouchEvent=function(){this._isMouseDown=!1,this._isPointerDown=!1,this._isPointerEvent=!1,this._isTouchEvent=!0},e.prototype._createButtonActionEventArgs=function(e,n){var i=new t.ButtonActionEventArgs;return i.__isMouseEvent=n,null!==e.ctrlKey&&(i.__ctrlKey=e.ctrlKey),null!==e.currentTarget&&(i.__currentTarget=e.currentTarget),i},e.prototype._performAlternateActionEnd=function(t,e){t.__onMouseLeave&&t.__onMouseLeave(e)},e.prototype._performAlternateActionStart=function(t,e){t.__onMouseEnter&&t.__onMouseEnter(e)},e.prototype._performPrimaryAction=function(t,e){t.__onClick&&t.__onClick(e)},e.prototype._retrieveButtonInstance=function(t){var e=t.currentTarget;if(null!==e){var n=e.getAttribute("id");if(null!==n)return autotask.find(n)}throw new Error("Event has no current target")},e}();t.ButtonEventsManagement=e}(AutotaskButtonEventsSystem||(AutotaskButtonEventsSystem={})),function(t){var e=function(){function t(t){this._buttonEventsManagement=t}return t.prototype.initialize=function(){this._buttonEventsManagement.initialize()},t.prototype.registerButton=function(t){this._buttonEventsManagement.registerButton(t)},t.prototype.registerContainer=function(t,e){this._buttonEventsManagement.registerContainer(t,e)},t}();t.InternalPageFacade=e}(AutotaskButtonEventsSystem||(AutotaskButtonEventsSystem={})),function(t){var e=function(t){function e(e,n,i){var o=t.call(this,e)||this;return o._text=n,o._defaultIconCssClass=i,o._buttonElement=AutotaskDomSystem.Document.getElementById(e),o._iconElement=AutotaskDomSystem.Document.getFirstElementChild(o._buttonElement),o._clipboardManager=null,o._copySuccessfulIconCssClass="CopySuccessful",o._successfulCssClass="Successful",o._isClickHandlingEnabled=!0,o}return __extends(e,t),Object.defineProperty(e.prototype,"clipboardManager",{get:function(){return null===this._clipboardManager&&(this._clipboardManager=new Autotask.ClipboardManagement),this._clipboardManager},enumerable:!1,configurable:!0}),e.prototype.__initialize=function(){var t=this;this._buttonElement.addEventListener("click",(function(){t._onClick()}))},e.prototype._onClick=function(){this._isClickHandlingEnabled&&(this._isClickHandlingEnabled=!1,this.clipboardManager.copyText(this._text)?(this._setButtonToSuccessState(),this._startTimer()):this._isClickHandlingEnabled=!0)},e.prototype._onTimeout=function(){this._setButtonToDefaultState(),this._isClickHandlingEnabled=!0},e.prototype._setButtonToDefaultState=function(){this._buttonElement.classList.remove(this._successfulCssClass),this._iconElement.classList.add(this._defaultIconCssClass),this._iconElement.classList.remove(this._copySuccessfulIconCssClass)},e.prototype._setButtonToSuccessState=function(){this._buttonElement.classList.add(this._successfulCssClass),this._iconElement.classList.remove(this._defaultIconCssClass),this._iconElement.classList.add(this._copySuccessfulIconCssClass)},e.prototype._startTimer=function(){var t=this;window.setTimeout((function(){t._onTimeout()}),3e3)},e}(Autotask.LifecycleObject);t.CopyTextButton=e}(AutotaskButtons||(AutotaskButtons={})),function(t){var e=function(t){function e(e,n){var i=t.call(this,e)||this;return i._defaultIconCssClass=n,i._butonElement=AutotaskDomSystem.Document.getElementById(e),i._iconElement=AutotaskDomSystem.Document.getChildElementByClassName(i._butonElement,"Icon"),i._clipboardManager=null,i._copySuccessfulIconCssClass="CopySuccessful",i._successfulCssClass="Successful",i._isClickHandlingEnabled=!0,i._text=i._getTextToCopy(i._butonElement),i}return __extends(e,t),Object.defineProperty(e.prototype,"clipboardManager",{get:function(){return null===this._clipboardManager&&(this._clipboardManager=new Autotask.ClipboardManagement),this._clipboardManager},enumerable:!1,configurable:!0}),e.prototype.__initialize=function(){var t=this;this._butonElement.addEventListener("click",(function(){t._onClick()}))},e.prototype._getTextToCopy=function(t){var e=AutotaskDomSystem.Document.getChildElementByClassName(t,"ChipText");return null===e.textContent?autotask.throwException("Could not find copy text."):e.textContent},e.prototype._onClick=function(){this._isClickHandlingEnabled&&(this._isClickHandlingEnabled=!1,this.clipboardManager.copyText(this._text)?(this._setButtonToSuccessState(),this._startTimer()):this._isClickHandlingEnabled=!0)},e.prototype._onTimeout=function(){this._setButtonToDefaultState(),this._isClickHandlingEnabled=!0},e.prototype._setButtonToDefaultState=function(){this._butonElement.classList.remove(this._successfulCssClass),this._iconElement.classList.add(this._defaultIconCssClass),this._iconElement.classList.remove(this._copySuccessfulIconCssClass)},e.prototype._setButtonToSuccessState=function(){this._butonElement.classList.add(this._successfulCssClass),this._iconElement.classList.remove(this._defaultIconCssClass),this._iconElement.classList.add(this._copySuccessfulIconCssClass)},e.prototype._startTimer=function(){var t=this;window.setTimeout((function(){t._onTimeout()}),3e3)},e}(Autotask.LifecycleObject);t.CopyTextChipButton=e}(AutotaskButtons||(AutotaskButtons={})),function(t){var e=function(t){function e(e,n,i){var o=t.call(this,e)||this;(o._text=i,o._clipboardManager=null,n)&&AutotaskDomSystem.Document.getElementById(e).addEventListener("click",(function(){o._clickListener()}));return o}return __extends(e,t),Object.defineProperty(e.prototype,"clipboardManager",{get:function(){return null===this._clipboardManager&&(this._clipboardManager=new Autotask.ClipboardManagement),this._clipboardManager},enumerable:!1,configurable:!0}),e.prototype._clickListener=function(){null!==this._text?(this.clipboardManager.copyText(this._text),window.autotask.contextOverlayManagement.__hideVisibleContextOverlays()):autotask.throwException("CopyTextMenuButton: expected non-null text to copy to clipboard.")},e}(Autotask.LifecycleObject);t.CopyTextMenuButton=e}(AutotaskButtons||(AutotaskButtons={})),function(t){var e=function(t){function e(e,n){var i=t.call(this,e)||this;return i._buttonElement=AutotaskDomSystem.Document.getElementById(e),i._contextOverlayId=n,i._interactionEventsCoordinator=new AutotaskOverlaySystem.InteractionEventsCoordinator(i._buttonElement,(function(){i._showOverlay()}),(function(){i._hideOverlay()})),i._buttonElement.addEventListener("mouseenter",(function(){i._mouseEnterListener()})),i._buttonElement.addEventListener("mouseleave",(function(){i._mouseLeaveListener()})),i._hoverCssClass="HoverState",i._contextOverlay=null,i}return __extends(e,t),e.prototype.__dispose=function(){this._interactionEventsCoordinator.__dispose()},e.prototype.__initialize=function(){this._contextOverlay=autotask.find(this._contextOverlayId)},e.prototype._hideOverlay=function(){this._contextOverlay.hide()},e.prototype._mouseEnterListener=function(){this._buttonElement.classList.toggle(this._hoverCssClass)},e.prototype._mouseLeaveListener=function(){this._buttonElement.classList.toggle(this._hoverCssClass)},e.prototype._showOverlay=function(){this._contextOverlay.show(this._buttonElement)},e}(Autotask.LifecycleObject);t.InlineIconContextOverlayButton=e}(AutotaskButtons||(AutotaskButtons={})),function(t){var e=function(){function t(t,e){this._overlayId=e,this._buttonElement=AutotaskDomSystem.Document.getElementById(t),this._buttonElement.addEventListener("click",this._onButtonClick.bind(this))}return t.prototype.__initialize=function(){this._labelHelpContextOverlay=autotask.find(this._overlayId)},t.prototype._onButtonClick=function(){this._labelHelpContextOverlay.isOverlayShowing?this._labelHelpContextOverlay.hide():this._labelHelpContextOverlay.show(this._buttonElement)},t}();t.LabelHelpButton=e}(AutotaskButtons||(AutotaskButtons={})),function(t){var e=function(e){function n(t,n,i){var o=e.call(this,t)||this;return o._buttonElement=AutotaskDomSystem.Document.getElementById(t),o._buttonElement.addEventListener("click",(function(){o._clickListener()})),o._buttonElement.addEventListener("keydown",(function(t){o._keyDownListener(t)})),o._buttonElement.addEventListener("keyup",(function(t){o._keyUpListener(t)})),o._buttonElement.addEventListener("mousedown",(function(){o._mouseDownListener()})),o._buttonElement.addEventListener("mouseenter",(function(){o._mouseEnterListener()})),o._buttonElement.addEventListener("mouseleave",(function(){o._mouseLeaveListener()})),o._isEnabled=n,o._clickHandler=i,o._tabbingAwayHandlers=[],o._disabledCssClass="DisabledState",o._hoverCssClass="HoverState",o._searchText=null,o._searchTextDelegate=null,o._selectedCssClass="SelectedState",o._isSelected=!1,o}return __extends(n,e),Object.defineProperty(n.prototype,"isEnabled",{get:function(){return this._isEnabled},set:function(t){t!==this._isEnabled&&(this._isEnabled=t,this._isEnabled?this._buttonElement.classList.remove(this._disabledCssClass):(this._buttonElement.classList.add(this._disabledCssClass),this._buttonElement.classList.remove(this._hoverCssClass),this._isSelected=!1,this._buttonElement.classList.remove(this._selectedCssClass)))},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isSelected",{set:function(t){t!==this._isSelected&&this._isEnabled&&(this._isSelected=t,this._isSelected?this._buttonElement.classList.add(this._selectedCssClass):this._buttonElement.classList.remove(this._selectedCssClass))},enumerable:!1,configurable:!0}),n.prototype.addTabbingAwayHandler=function(t){this._tabbingAwayHandlers.push(t)},n.prototype.focus=function(){this._buttonElement.focus()},n.prototype.__configure=function(t){this._searchTextDelegate=t},n.prototype._clickListener=function(){this._isEnabled&&(this._raiseClickEvent(this._searchText),this._searchText=null)},n.prototype._keyDownListener=function(t){this._isEnabled&&(AutotaskDomSystem.KeyCode.isEnter(t.which)&&null!==this._searchTextDelegate?this._searchText=this._searchTextDelegate():AutotaskDomSystem.KeyCode.isTab(t.which)&&this._raiseTabbingAwayEvent(t.shiftKey,(function(){t.preventDefault()})))},n.prototype._keyUpListener=function(t){this._isEnabled&&AutotaskDomSystem.KeyCode.isEnter(t.which)&&(this._raiseClickEvent(this._searchText),this._searchText=null)},n.prototype._mouseDownListener=function(){this._isEnabled&&null!==this._searchTextDelegate&&(this._searchText=this._searchTextDelegate())},n.prototype._mouseEnterListener=function(){this._isEnabled&&this._buttonElement.classList.add(this._hoverCssClass)},n.prototype._mouseLeaveListener=function(){this._buttonElement.classList.remove(this._hoverCssClass)},n.prototype._raiseClickEvent=function(e){var n=new t.NewTagButtonClickEventArgs(e);this._clickHandler(n)},n.prototype._raiseTabbingAwayEvent=function(t,e){if(this._tabbingAwayHandlers.length>0)for(var n=0,i=this._tabbingAwayHandlers;n<i.length;n++){(0,i[n])(t,e)}},n}(Autotask.LifecycleObject);t.NewTagButton=e}(AutotaskButtons||(AutotaskButtons={})),function(t){var e=function(){function t(t){this._searchText=t}return Object.defineProperty(t.prototype,"searchText",{get:function(){return this._searchText},enumerable:!1,configurable:!0}),t}();t.NewTagButtonClickEventArgs=e}(AutotaskButtons||(AutotaskButtons={})),function(t){var e=function(t){function e(e,n,i){var o=t.call(this,e)||this;return o._backingButtonId=n,o._gridId=i,o._backingButtonInstance=void 0,o}return __extends(e,t),Object.defineProperty(e.prototype,"_backingButton",{get:function(){return void 0===this._backingButtonInstance?autotask.throwException("_backingButtonInstance is undefined."):this._backingButtonInstance},enumerable:!1,configurable:!0}),e.prototype.get_enabled=function(){return this._backingButton.isEnabled},e.prototype.set_enabled=function(t){this._backingButton.isEnabled=t},e.prototype.__initialize=function(){var t=this;this._backingButtonInstance=autotask.find(this._backingButtonId);var e=new AutotaskButtonSystem.ClickEventHandler((function(){t._backingButtonClickEventHandler()}));this._backingButtonInstance.addEventHandler(e)},e.prototype._backingButtonClickEventHandler=function(){autotask.find(this._gridId).__showAggregateValuesDialog()},e}(t.LifecycleObject);t.AggregateValuesDialogButton=e}(Autotask||(Autotask={})),function(t){var e=function(){function t(t){this._button=t}return Object.defineProperty(t.prototype,"clientInstance",{get:function(){return this._button},enumerable:!1,configurable:!0}),t}();t.ButtonClickEventArgs2=e}(Autotask||(Autotask={})),function(t){var e=function(e){function n(t,n,i){var o=e.call(this,t)||this;return o._backingButtonId=n,o._clickEventHandler=i,o._backingButtonInstance=void 0,o}return __extends(n,e),Object.defineProperty(n.prototype,"_backingButton",{get:function(){return void 0===this._backingButtonInstance?autotask.throwException("_backingButtonInstance is undefined."):this._backingButtonInstance},enumerable:!1,configurable:!0}),n.prototype.get_enabled=function(){return this._backingButton.isEnabled},n.prototype.set_enabled=function(t){this._backingButton.isEnabled=t},n.prototype.get_selected=function(){return this._backingButton.isSelected},n.prototype.set_selected=function(t){this._backingButton.isSelected=t},n.prototype.get_title=function(){return this._backingButton.title},n.prototype.set_title=function(t){this._backingButton.title=t},n.prototype.__initialize=function(){var t=this;this._backingButtonInstance=autotask.find(this._backingButtonId);var e=new AutotaskButtonSystem.ClickEventHandler((function(){t._backingButtonClickEventHandler()}));this._backingButtonInstance.addEventHandler(e)},n.prototype._backingButtonClickEventHandler=function(){this._raiseClickEvent()},n.prototype._raiseClickEvent=function(){var e=new t.CheckBoxButtonClickEventArgs2(this);this._clickEventHandler(e)},n}(t.LifecycleObject);t.CheckBoxButton2=e}(Autotask||(Autotask={})),function(t){var e=function(){function t(t){this._button=t}return Object.defineProperty(t.prototype,"clientInstance",{get:function(){return this._button},enumerable:!1,configurable:!0}),t}();t.CheckBoxButtonClickEventArgs2=e}(Autotask||(Autotask={})),function(t){var e=function(t){function e(e,n,i){var o=t.call(this,e)||this;return o._backingButtonId=n,o._gridId=i,o._backingButtonInstance=void 0,o}return __extends(e,t),Object.defineProperty(e.prototype,"_backingButton",{get:function(){return void 0===this._backingButtonInstance?autotask.throwException("_backingButtonInstance is undefined."):this._backingButtonInstance},enumerable:!1,configurable:!0}),e.prototype.get_enabled=function(){return this._backingButton.isEnabled},e.prototype.set_enabled=function(t){this._backingButton.isEnabled=t},e.prototype.__initialize=function(){var t=this;this._backingButtonInstance=autotask.find(this._backingButtonId);var e=new AutotaskButtonSystem.ClickEventHandler((function(){t._backingButtonClickEventHandler()}));this._backingButtonInstance.addEventHandler(e)},e.prototype._backingButtonClickEventHandler=function(){autotask.find(this._gridId).__showColumnArrangementDialog()},e}(t.LifecycleObject);t.ColumnConfigurationDialogButton=e}(Autotask||(Autotask={})),function(t){var e=function(t){function e(e,n){var i=t.call(this,e)||this;return i._backingButtonId=n,i._backingDropDownButton=void 0,i}return __extends(e,t),Object.defineProperty(e.prototype,"_backingButton",{get:function(){return void 0===this._backingDropDownButton?autotask.throwException("_backingButton is undefined."):this._backingDropDownButton},enumerable:!1,configurable:!0}),e.prototype.get_enabled=function(){return this._backingButton.isEnabled},e.prototype.set_enabled=function(t){this._backingButton.isEnabled=t},e.prototype.__initialize=function(){this._backingDropDownButton=autotask.find(this._backingButtonId)},e}(t.LifecycleObject);t.ContextMenuIconButton2=e}(Autotask||(Autotask={})),function(t){var e=function(e){function n(t,n,i,o){var a=e.call(this,t)||this;return a._buttonElement=AutotaskDomSystem.Document.getElementById(t),a._backingButtonId=n,a._clickEventHandler=i,a._tooltipContextOverlayRoute=o,a._backingButtonInstance=void 0,a._requestCanceler=null,a._tooltipContextOverlay=null,a}return __extends(n,e),Object.defineProperty(n.prototype,"_backingButton",{get:function(){return void 0===this._backingButtonInstance?autotask.throwException("_backingButtonInstance is undefined."):this._backingButtonInstance},enumerable:!1,configurable:!0}),n.prototype.get_enabled=function(){return this._backingButton.isEnabled},n.prototype.set_enabled=function(t){this._backingButton.isEnabled=t},n.prototype.__dispose=function(){this._cancelRequest()},n.prototype.__initialize=function(){var t=this;this._backingButtonInstance=autotask.find(this._backingButtonId);var e=new AutotaskButtonSystem.AdvancedTouchEventHandler((function(){t._backingButtonClickEventHandler()}),(function(){t._backingButtonTouchEventHandler()}),(function(){t._backingButtonMouseEnterHandler()}),(function(){t._backingButtonMouseLeaveHandler()}));this._backingButtonInstance.addEventHandler(e),this._tooltipContextOverlay=autotask.tooltipContextOverlayLocator.contextOverlay},n.prototype._backingButtonClickEventHandler=function(){this._raiseClickEvent()},n.prototype._backingButtonMouseEnterHandler=function(){this._showOverlay()},n.prototype._backingButtonMouseLeaveHandler=function(){this._hideOverlay()},n.prototype._backingButtonTouchEventHandler=function(){this._raiseClickEvent()},n.prototype._cancelRequest=function(){null!==this._requestCanceler&&(this._requestCanceler.__cancelRequest(),this._requestCanceler=null)},n.prototype._contextOverlayHideCompletedHandler=function(){this._cancelRequest()},n.prototype._contextOverlayRouteSuccessHandler=function(t,e){this._requestCanceler=null,this._tooltipContextOverlay.__loadHtmlAndJavaScript(t,e)},n.prototype._contextOverlayShowingHandler=function(){var t=this;this._cancelRequest(),this._requestCanceler=this._tooltipContextOverlayRoute.__makeRequest(null,(function(e,n){t._contextOverlayRouteSuccessHandler(e,n)}))},n.prototype._hideOverlay=function(){this._tooltipContextOverlay.clearHideCompletedHandlers(),this._tooltipContextOverlay.clearShowingHandlers(),this._tooltipContextOverlay.hide()},n.prototype._raiseClickEvent=function(){if(null!==this._clickEventHandler){var e=new t.ButtonClickEventArgs2(this);this._clickEventHandler(e)}else this._tooltipContextOverlay.isVisible?this._hideOverlay():this._showOverlay()},n.prototype._showOverlay=function(){var t=this;this._tooltipContextOverlay.addHideCompletedHandler((function(){t._contextOverlayHideCompletedHandler()})),this._tooltipContextOverlay.addShowingHandler((function(){t._contextOverlayShowingHandler()})),this._tooltipContextOverlay.show(this._buttonElement)},n}(t.LifecycleObject);t.ContextOverlayIconButton2=e}(Autotask||(Autotask={})),function(t){var e=function(e){function n(t,n,i,o){var a=e.call(this,t)||this;return a._buttonElement=AutotaskDomSystem.Document.getElementById(t),a._backingButtonId=n,a._clickEventHandler=i,a._tooltipContextOverlayRoute=o,a._backingButtonInstance=void 0,a._tooltipContextOverlay=null,a}return __extends(n,e),Object.defineProperty(n.prototype,"_backingButton",{get:function(){return void 0===this._backingButtonInstance?autotask.throwException("_backingButtonInstance is undefined."):this._backingButtonInstance},enumerable:!1,configurable:!0}),n.prototype.get_enabled=function(){return this._backingButton.isEnabled},n.prototype.set_enabled=function(t){this._backingButton.isEnabled=t},n.prototype.get_text=function(){return this._backingButton.text},n.prototype.set_text=function(t){this._backingButton.text=t},n.prototype.__initialize=function(){var t=this;this._backingButtonInstance=autotask.find(this._backingButtonId);var e=new AutotaskButtonSystem.AdvancedTouchEventHandler((function(){t._backingButtonClickEventHandler()}),(function(){t._backingButtonTouchEventHandler()}),(function(){t._backingButtonMouseEnterHandler()}),(function(){t._backingButtonMouseLeaveHandler()}));this._backingButtonInstance.addEventHandler(e),this._tooltipContextOverlay=autotask.tooltipContextOverlayLocator.contextOverlay},n.prototype._backingButtonClickEventHandler=function(){this._raiseClickEvent()},n.prototype._backingButtonMouseEnterHandler=function(){var t=this;this._tooltipContextOverlay.addShowingHandler((function(){t._contextOverlayShowingHandler()})),this._tooltipContextOverlay.show(this._buttonElement)},n.prototype._backingButtonMouseLeaveHandler=function(){this._tooltipContextOverlay.clearShowingHandlers(),this._tooltipContextOverlay.hide()},n.prototype._backingButtonTouchEventHandler=function(){this._raiseClickEvent()},n.prototype._contextOverlayRouteSuccessHandler=function(t,e){this._tooltipContextOverlay.__loadHtmlAndJavaScript(t,e)},n.prototype._contextOverlayShowingHandler=function(){var t=this;this._tooltipContextOverlayRoute.__makeRequest(null,(function(e,n){t._contextOverlayRouteSuccessHandler(e,n)}))},n.prototype._raiseClickEvent=function(){var e=new t.ButtonClickEventArgs2(this);this._clickEventHandler(e)},n}(t.LifecycleObject);t.ContextOverlayLinkButton2=e}(Autotask||(Autotask={})),function(t){var e=function(t){function e(e,n,i,o){var a=t.call(this,e)||this;return a._buttonElement=AutotaskDomSystem.Document.getElementById(e),a._backingButtonId=n,a._page=i,a._tooltipContextOverlayRoute=o,a._backingButtonInstance=void 0,a._tooltipContextOverlay=null,a}return __extends(e,t),Object.defineProperty(e.prototype,"_backingButton",{get:function(){return void 0===this._backingButtonInstance?autotask.throwException("_backingButtonInstance is undefined."):this._backingButtonInstance},enumerable:!1,configurable:!0}),e.prototype.get_enabled=function(){return this._backingButton.isEnabled},e.prototype.set_enabled=function(t){this._backingButton.isEnabled=t},e.prototype.get_text=function(){return this._backingButton.text},e.prototype.set_text=function(t){this._backingButton.text=t},e.prototype.__initialize=function(){var t=this;this._backingButtonInstance=autotask.find(this._backingButtonId);var e=new AutotaskButtonSystem.AdvancedTouchEventHandler((function(){t._backingButtonClickEventHandler()}),(function(){t._backingButtonTouchEventHandler()}),(function(){t._backingButtonMouseEnterHandler()}),(function(){t._backingButtonMouseLeaveHandler()}));this._backingButtonInstance.addEventHandler(e),this._tooltipContextOverlay=autotask.tooltipContextOverlayLocator.contextOverlay},e.prototype._backingButtonClickEventHandler=function(){this._openPage()},e.prototype._backingButtonMouseEnterHandler=function(){var t=this;this._tooltipContextOverlay.addShowingHandler((function(){t._contextOverlayShowingHandler()})),this._tooltipContextOverlay.show(this._buttonElement)},e.prototype._backingButtonMouseLeaveHandler=function(){this._tooltipContextOverlay.clearShowingHandlers(),this._tooltipContextOverlay.hide()},e.prototype._backingButtonTouchEventHandler=function(){this._openPage()},e.prototype._contextOverlayRouteSuccessHandler=function(t,e){this._tooltipContextOverlay.__loadHtmlAndJavaScript(t,e)},e.prototype._contextOverlayShowingHandler=function(){var t=this;this._tooltipContextOverlayRoute.__makeRequest(null,(function(e,n){t._contextOverlayRouteSuccessHandler(e,n)}))},e.prototype._openPage=function(){autotask.windowManagement.openPage(this._page,null,!1)},e}(t.LifecycleObject);t.ContextOverlayNavigationLinkButton2=e}(Autotask||(Autotask={})),function(t){var e=function(e){function n(t,n,i){var o=e.call(this,t)||this;return o._backingButtonId=n,o._clickEventHandler=i,o._backingButtonInstance=void 0,o}return __extends(n,e),Object.defineProperty(n.prototype,"_backingButton",{get:function(){return void 0===this._backingButtonInstance?autotask.throwException("_backingButtonInstance is undefined."):this._backingButtonInstance},enumerable:!1,configurable:!0}),n.prototype.get_enabled=function(){return this._backingButton.isEnabled},n.prototype.set_enabled=function(t){this._backingButton.isEnabled=t},n.prototype.get_text=function(){return this._backingButton.text},n.prototype.set_text=function(t){this._backingButton.text=t},n.prototype.get_title=function(){return this._backingButton.title},n.prototype.set_title=function(t){this._backingButton.title=t},n.prototype.__initialize=function(){var t=this;this._backingButtonInstance=autotask.find(this._backingButtonId);var e=new AutotaskButtonSystem.ClickEventHandler((function(){t._backingButtonClickEventHandler()}));this._backingButtonInstance.addEventHandler(e)},n.prototype._backingButtonClickEventHandler=function(){this._raiseClickEvent()},n.prototype._raiseClickEvent=function(){if(null!==this._clickEventHandler){var e=new t.ButtonClickEventArgs2(this);this._clickEventHandler(e)}},n}(t.LifecycleObject);t.DefaultButton2=e}(Autotask||(Autotask={})),function(t){var e=function(e){function n(t,n,i){var o=e.call(this,t)||this;return o._backingButtonId=n,o._clickEventHandler=i,o._backingDropDownButton=void 0,o}return __extends(n,e),Object.defineProperty(n.prototype,"_backingButton",{get:function(){return void 0===this._backingDropDownButton?autotask.throwException("_backingButton is undefined."):this._backingDropDownButton},enumerable:!1,configurable:!0}),n.prototype.get_enabled=function(){return this._backingButton.isEnabled},n.prototype.set_enabled=function(t){this._backingButton.isEnabled=t},n.prototype.hideContextOverlay=function(){this._backingButton.hideContextOverlay()},n.prototype.__initialize=function(){var t=this;if(this._backingDropDownButton=autotask.find(this._backingButtonId),null!==this._clickEventHandler){var e=new AutotaskButtonSystem.ClickEventHandler((function(){t._backingButtonLeftButtonClickEventHandler()}));this._backingDropDownButton.addLeftButtonEventHandler(e)}},n.prototype._backingButtonLeftButtonClickEventHandler=function(){this._raiseClickEvent()},n.prototype._raiseClickEvent=function(){if(null!==this._clickEventHandler){var e=new t.ButtonClickEventArgs2(this);this._clickEventHandler(e)}},n}(t.LifecycleObject);t.DropDownButton2=e}(Autotask||(Autotask={})),function(t){var e=function(e){function n(t,n,i){var o=e.call(this,t)||this;return o._backingButtonId=n,o._clickEventHandler=i,o._backingButtonInstance=void 0,o}return __extends(n,e),Object.defineProperty(n.prototype,"_backingButton",{get:function(){return void 0===this._backingButtonInstance?autotask.throwException("_backingButtonInstance is undefined."):this._backingButtonInstance},enumerable:!1,configurable:!0}),n.prototype.get_enabled=function(){return this._backingButton.isEnabled},n.prototype.set_enabled=function(t){this._backingButton.isEnabled=t},n.prototype.get_title=function(){return this._backingButton.title},n.prototype.set_title=function(t){this._backingButton.title=t},n.prototype.__initialize=function(){var t=this;this._backingButtonInstance=autotask.find(this._backingButtonId);var e=new AutotaskButtonSystem.ClickEventHandler((function(){t._backingButtonClickEventHandler()}));this._backingButtonInstance.addEventHandler(e)},n.prototype._backingButtonClickEventHandler=function(){this._raiseClickEvent()},n.prototype._raiseClickEvent=function(){if(null!==this._clickEventHandler){var e=new t.ButtonClickEventArgs2(this);this._clickEventHandler(e)}},n}(t.LifecycleObject);t.IconButton2=e}(Autotask||(Autotask={})),function(t){var e=function(e){function n(t,n,i){var o=e.call(this,t)||this;return o._backingButtonId=n,o._clickEventHandler=i,o._backingButtonInstance=void 0,o}return __extends(n,e),Object.defineProperty(n.prototype,"_backingButton",{get:function(){return void 0===this._backingButtonInstance?autotask.throwException("_backingButtonInstance is undefined."):this._backingButtonInstance},enumerable:!1,configurable:!0}),n.prototype.get_enabled=function(){return this._backingButton.isEnabled},n.prototype.set_enabled=function(t){this._backingButton.isEnabled=t},n.prototype.get_text=function(){return this._backingButton.text},n.prototype.set_text=function(t){this._backingButton.text=t},n.prototype.get_title=function(){return this._backingButton.title},n.prototype.set_title=function(t){this._backingButton.title=t},n.prototype.__initialize=function(){var t=this;this._backingButtonInstance=autotask.find(this._backingButtonId);var e=new AutotaskButtonSystem.ClickEventHandler((function(){t._backingButtonClickEventHandler()}));this._backingButtonInstance.addEventHandler(e)},n.prototype._backingButtonClickEventHandler=function(){this._raiseClickEvent()},n.prototype._raiseClickEvent=function(){var e=new t.ButtonClickEventArgs2(this);this._clickEventHandler(e)},n}(t.LifecycleObject);t.LinkButton2=e}(Autotask||(Autotask={})),function(t){var e=function(t){function e(e,n,i){var o=t.call(this,e)||this;return o._backingButtonId=n,o._page=i,o._backingButtonInstance=void 0,o}return __extends(e,t),Object.defineProperty(e.prototype,"_backingButton",{get:function(){return void 0===this._backingButtonInstance?autotask.throwException("_backingButtonInstance is undefined."):this._backingButtonInstance},enumerable:!1,configurable:!0}),e.prototype.get_enabled=function(){return this._backingButton.isEnabled},e.prototype.set_enabled=function(t){this._backingButton.isEnabled=t},e.prototype.get_title=function(){return this._backingButton.title},e.prototype.set_title=function(t){this._backingButton.title=t},e.prototype.get_text=function(){return this._backingButton.text},e.prototype.set_text=function(t){this._backingButton.text=t},e.prototype.__initialize=function(){var t=this;this._backingButtonInstance=autotask.find(this._backingButtonId);var e=new AutotaskButtonSystem.ClickEventHandler((function(){t._backingButtonClickEventHandler()}));this._backingButtonInstance.addEventHandler(e)},e.prototype._backingButtonClickEventHandler=function(){this._openPage()},e.prototype._openPage=function(){autotask.windowManagement.openPage(this._page,null,!1)},e}(t.LifecycleObject);t.NavigationDefaultButton2=e}(Autotask||(Autotask={})),function(t){var e=function(t){function e(e,n,i){var o=t.call(this,e)||this;return o._backingButtonId=n,o._page=i,o._backingButtonInstance=void 0,o}return __extends(e,t),Object.defineProperty(e.prototype,"_backingButton",{get:function(){return void 0===this._backingButtonInstance?autotask.throwException("_backingButtonInstance is undefined."):this._backingButtonInstance},enumerable:!1,configurable:!0}),e.prototype.get_enabled=function(){return this._backingButton.isEnabled},e.prototype.set_enabled=function(t){this._backingButton.isEnabled=t},e.prototype.get_title=function(){return this._backingButton.title},e.prototype.set_title=function(t){this._backingButton.title=t},e.prototype.__initialize=function(){var t=this;this._backingButtonInstance=autotask.find(this._backingButtonId);var e=new AutotaskButtonSystem.ClickEventHandler((function(){t._backingButtonClickEventHandler()}));this._backingButtonInstance.addEventHandler(e)},e.prototype._backingButtonClickEventHandler=function(){this._openPage()},e.prototype._openPage=function(){autotask.windowManagement.openPage(this._page,null,!1)},e}(t.LifecycleObject);t.NavigationIconButton2=e}(Autotask||(Autotask={})),function(t){var e=function(t){function e(e,n,i){var o=t.call(this,e)||this;return o._backingButtonId=n,o._page=i,o._backingButtonInstance=void 0,o}return __extends(e,t),Object.defineProperty(e.prototype,"_backingButton",{get:function(){return void 0===this._backingButtonInstance?autotask.throwException("_backingButtonInstance is undefined."):this._backingButtonInstance},enumerable:!1,configurable:!0}),e.prototype.get_enabled=function(){return this._backingButton.isEnabled},e.prototype.set_enabled=function(t){this._backingButton.isEnabled=t},e.prototype.get_text=function(){return this._backingButton.text},e.prototype.set_text=function(t){this._backingButton.text=t},e.prototype.get_title=function(){return this._backingButton.title},e.prototype.set_title=function(t){this._backingButton.title=t},e.prototype.__initialize=function(){var t=this;this._backingButtonInstance=autotask.find(this._backingButtonId);var e=new AutotaskButtonSystem.ClickEventHandler((function(){t._backingButtonClickEventHandler()}));this._backingButtonInstance.addEventHandler(e)},e.prototype._backingButtonClickEventHandler=function(){this._openPage()},e.prototype._openPage=function(){autotask.windowManagement.openPage(this._page,null,!1)},e}(t.LifecycleObject);t.NavigationLinkButton2=e}(Autotask||(Autotask={})),function(t){var e=function(t){function e(e,n,i,o){var a=t.call(this,e)||this;return a._buttonId=n,a._helpButtonId=i,a._page=o,a._buttonClickEventHandlers=[],a._helpButtonClickEventHandlers=[],a}return __extends(e,t),e.prototype.addButtonClickEventHandler=function(t){this._buttonClickEventHandlers.push(t)},e.prototype.addHelpButtonClickEventHandler=function(t){this._helpButtonClickEventHandlers.push(t)},e.prototype.__initialize=function(){var t=this,e=autotask.find(this._buttonId),n=new AutotaskButtonSystem.ClickEventHandler((function(){t._buttonClickEventHandler()}));e.addEventHandler(n),AutotaskDomSystem.Document.getElementById(this._helpButtonId).addEventListener("click",(function(){t._helpButtonClickListener()}))},e.prototype.showUpdateIndicator=function(){var t=AutotaskDomSystem.Document.getElementById(this.id);AutotaskDomSystem.Document.getChildElementByClassName(t,"UpdateIndicatorWrapper").classList.add("Active")},e.prototype._buttonClickEventHandler=function(){this._hideUpdateIndicator(),this._raiseButtonClickEvent(),autotask.windowManagement.openPage(this._page,null,!1)},e.prototype._helpButtonClickListener=function(){this._raiseHelpButtonClickEvent()},e.prototype._hideUpdateIndicator=function(){var t=AutotaskDomSystem.Document.getElementById(this.id);AutotaskDomSystem.Document.getChildElementByClassName(t,"UpdateIndicatorWrapper").classList.remove("Active")},e.prototype._raiseButtonClickEvent=function(){for(var t=0,e=this._buttonClickEventHandlers;t<e.length;t++){(0,e[t])()}},e.prototype._raiseHelpButtonClickEvent=function(){for(var t=0,e=this._helpButtonClickEventHandlers;t<e.length;t++){(0,e[t])()}},e}(t.LifecycleObject);t.WhatsNewMenuButton=e}(Autotask||(Autotask={})),function(t){var e=function(e){function n(t,n,i,o,a,r,s){var l=e.call(this,t)||this;l._basicItemIds=n,l._childItemIds=i,l._parentItemIds=o,l._promptToAutomateCheckBoxId=a,l._promptToAutomateChangeDelegate=r,l._completedItemCount=s;var u=AutotaskDomSystem.Document.getElementById(t);return l._allItemsCompletedMessageElement=AutotaskDomSystem.Document.getChildElementByClassName(u,"AllItemsCompleted"),l._basicItems=null,l._childItems=null,l._completedItemCountChangeHandler=null,l._isAllItemsCompletedMessageVisible=!1,l._isHideCompletedItemsEnabled=!1,l._itemCount=l._basicItemIds.length+l._parentItemIds.length+l._childItemIds.length,l._parentItems=null,l}return __extends(n,e),Object.defineProperty(n.prototype,"completedItemCount",{get:function(){return this._completedItemCount},enumerable:!1,configurable:!0}),n.prototype.dispose=function(){this._basicItems=null,this._childItems=null,this._completedItemCountChangeHandler=null,this._parentItems=null},n.prototype.hideCompleletedItems=function(){var t,e,n;this._isHideCompletedItemsEnabled||(this._isHideCompletedItemsEnabled=!0,null===(t=this._basicItems)||void 0===t||t.forEach((function(t){t.isComplete&&t.hide()})),null===(e=this._parentItems)||void 0===e||e.forEach((function(t){t.isComplete&&!t.hasIncompleteChildItems&&t.hide()})),null===(n=this._childItems)||void 0===n||n.forEach((function(t){t.isComplete&&t.hide()})),this._completedItemCount===this._itemCount&&this._showAllItemsCompletedMessage())},n.prototype.setCompletedItemCountChangeHandler=function(t){this._completedItemCountChangeHandler=t},n.prototype.showCompleletedItems=function(){var t,e,n;this._isHideCompletedItemsEnabled&&(this._isHideCompletedItemsEnabled=!1,null===(t=this._basicItems)||void 0===t||t.forEach((function(t){t.isComplete&&t.show()})),null===(e=this._parentItems)||void 0===e||e.forEach((function(t){t.isComplete&&!t.hasIncompleteChildItems&&t.show()})),null===(n=this._childItems)||void 0===n||n.forEach((function(t){t.isComplete&&t.show()})),this._isAllItemsCompletedMessageVisible&&this._hideAllItemsCompletedMessage())},n.prototype.__initialize=function(){var t=this;(null!==this._basicItemIds&&(this._basicItems=[],this._basicItemIds.forEach((function(e){var n,i=autotask.find(e);i.setCompletedHandler((function(e){t._basicItemCompletedHandler(e)})),i.setRevertedHandler((function(e){t._basicItemRevertedHandler(e)})),null===(n=t._basicItems)||void 0===n||n.push(i)}))),null!==this._childItemIds&&(this._childItems=[],this._childItemIds.forEach((function(e){var n,i=autotask.find(e);i.setCompletedHandler((function(e){t._childItemCompletedHandler(e)})),i.setRevertedHandler((function(e){t._childItemRevertedHandler(e)})),null===(n=t._childItems)||void 0===n||n.push(i)}))),null!==this._parentItemIds&&(this._parentItems=[],this._parentItemIds.forEach((function(e){var n,i=autotask.find(e);i.setCompletedHandler((function(e){t._parentItemCompletedHandler(e)})),i.setRevertedHandler((function(e){t._parentItemRevertedHandler(e)})),null===(n=t._parentItems)||void 0===n||n.push(i)}))),null!==this._promptToAutomateCheckBoxId)&&autotask.find(this._promptToAutomateCheckBoxId).addChangeHandler((function(e){t._promptToAutomateChangeHandler(e)}))},n.prototype._basicItemCompletedHandler=function(t){this._completedItemCount++,this._isHideCompletedItemsEnabled&&t.hide(),this._raiseCompletedItemCountChangedEvent(),this._itemCompletedHandler()},n.prototype._basicItemRevertedHandler=function(t){this._completedItemCount--,this._isHideCompletedItemsEnabled&&t.show(),this._raiseCompletedItemCountChangedEvent()},n.prototype._childItemCompletedHandler=function(t){if(this._completedItemCount++,this._isHideCompletedItemsEnabled){t.hide();var e=t.parentItem;e.isComplete&&!e.hasIncompleteChildItems&&e.hide()}this._raiseCompletedItemCountChangedEvent(),this._itemCompletedHandler()},n.prototype._childItemRevertedHandler=function(t){this._completedItemCount--,this._isHideCompletedItemsEnabled&&t.show(),this._raiseCompletedItemCountChangedEvent()},n.prototype._hideAllItemsCompletedMessage=function(){this._allItemsCompletedMessageElement.classList.add("Hidden"),this._isAllItemsCompletedMessageVisible=!1},n.prototype._itemCompletedHandler=function(){this._isHideCompletedItemsEnabled&&(this._isAllItemsCompletedMessageVisible||this._completedItemCount!==this._itemCount||this._showAllItemsCompletedMessage())},n.prototype._parentItemCompletedHandler=function(t){this._completedItemCount++,this._isHideCompletedItemsEnabled&&!t.hasIncompleteChildItems&&t.hide(),this._raiseCompletedItemCountChangedEvent(),this._itemCompletedHandler()},n.prototype._parentItemRevertedHandler=function(t){this._completedItemCount--,this._isHideCompletedItemsEnabled&&t.show(),this._raiseCompletedItemCountChangedEvent()},n.prototype._promptToAutomateChangeHandler=function(e){null!==this._promptToAutomateChangeDelegate&&this._promptToAutomateChangeDelegate(new t.PromptToAutomateEventArgs(e.editorInstance.value))},n.prototype._raiseCompletedItemCountChangedEvent=function(){null!==this._completedItemCountChangeHandler&&this._completedItemCountChangeHandler()},n.prototype._showAllItemsCompletedMessage=function(){this._allItemsCompletedMessageElement.classList.remove("Hidden"),this._isAllItemsCompletedMessageVisible=!0},n}(Autotask.LifecycleObject);t.Checklist=e}(AutotaskChecklistSystem||(AutotaskChecklistSystem={})),function(t){var e=function(e){function n(t,n,i,o){var a=e.call(this,t)||this;return a.itemId=n,a._backingInstanceId=i,a._buttonClickHandler=o,a._backingInstance=null,a._completedHandler=null,a._revertedHandler=null,a}return __extends(n,e),Object.defineProperty(n.prototype,"isComplete",{get:function(){return this._backingInstance.isComplete},enumerable:!1,configurable:!0}),n.prototype.complete=function(t){var e,n;this.isComplete||(null===(e=this._backingInstance)||void 0===e||e.complete(),null===(n=this._backingInstance)||void 0===n||n.setCompletedByText(t),null!==this._completedHandler&&this._completedHandler(this))},n.prototype.dispose=function(){this._backingInstance=null,this._completedHandler=null,this._revertedHandler=null},n.prototype.hide=function(){var t;null===(t=this._backingInstance)||void 0===t||t.hide()},n.prototype.revert=function(){var t,e;this.isComplete&&(null===(t=this._backingInstance)||void 0===t||t.revert(),null===(e=this._backingInstance)||void 0===e||e.clearCompletedByText(),null!==this._revertedHandler&&this._revertedHandler(this))},n.prototype.setCompletedHandler=function(t){this._completedHandler=t},n.prototype.setRevertedHandler=function(t){this._revertedHandler=t},n.prototype.show=function(){var t;null===(t=this._backingInstance)||void 0===t||t.show()},n.prototype.__initialize=function(){var t=this;this._backingInstance=autotask.find(this._backingInstanceId),null!==this._buttonClickHandler&&this._backingInstance.setItemButonClickedHandler((function(){t._clickHandler()}))},n.prototype._clickHandler=function(){null!==this._buttonClickHandler&&this._buttonClickHandler(new t.ChecklistBasicItemClickedEventArgs(this))},n}(Autotask.LifecycleObject);t.ChecklistBasicItem=e}(AutotaskChecklistSystem||(AutotaskChecklistSystem={})),function(t){var e=function(t){this.item=t};t.ChecklistBasicItemClickedEventArgs=e}(AutotaskChecklistSystem||(AutotaskChecklistSystem={})),function(t){var e=function(e){function n(t,n,i,o,a){var r=e.call(this,t)||this;return r.itemId=n,r._backingInstanceId=i,r._parentItemId=o,r._buttonClickHandler=a,r._backingInstance=null,r._parentItem=null,r._completedHandler=null,r._revertedHandler=null,r}return __extends(n,e),Object.defineProperty(n.prototype,"isComplete",{get:function(){return this._backingInstance.isComplete},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"parentItem",{get:function(){return this._parentItem},enumerable:!1,configurable:!0}),n.prototype.complete=function(t){var e,n;this.isComplete||(null===(e=this._backingInstance)||void 0===e||e.complete(),null===(n=this._backingInstance)||void 0===n||n.setCompletedByText(t),null!==this._completedHandler&&this._completedHandler(this))},n.prototype.dispose=function(){this._backingInstance=null,this._completedHandler=null,this._parentItem=null,this._revertedHandler=null},n.prototype.hide=function(){var t;null===(t=this._backingInstance)||void 0===t||t.hide()},n.prototype.revert=function(){var t,e;this.isComplete&&(null===(t=this._backingInstance)||void 0===t||t.revert(),null===(e=this._backingInstance)||void 0===e||e.clearCompletedByText(),null!==this._revertedHandler&&this._revertedHandler(this))},n.prototype.setCompletedHandler=function(t){this._completedHandler=t},n.prototype.setRevertedHandler=function(t){this._revertedHandler=t},n.prototype.show=function(){var t;null===(t=this._backingInstance)||void 0===t||t.show()},n.prototype.__initialize=function(){var t=this;this._backingInstance=autotask.find(this._backingInstanceId),null!==this._buttonClickHandler&&this._backingInstance.setItemButonClickedHandler((function(){t._clickHandler()})),this._parentItem=autotask.find(this._parentItemId)},n.prototype._clickHandler=function(){null!==this._buttonClickHandler&&this._buttonClickHandler(new t.ChecklistChildItemClickedEventArgs(this))},n}(Autotask.LifecycleObject);t.ChecklistChildItem=e}(AutotaskChecklistSystem||(AutotaskChecklistSystem={})),function(t){var e=function(t){this.item=t};t.ChecklistChildItemClickedEventArgs=e}(AutotaskChecklistSystem||(AutotaskChecklistSystem={})),function(t){var e=function(t){function e(e,n,i){var o=t.call(this,e)||this;return o._buttonId=n,o._isComplete=i,o._button=null,o._descriptionElementField=null,o._isHidden=!1,o._itemElement=AutotaskDomSystem.Document.getElementById(e),o._itemButtonClickedHandler=null,o}return __extends(e,t),Object.defineProperty(e.prototype,"isComplete",{get:function(){return this._isComplete},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isHidden",{get:function(){return this._isHidden},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_descriptionElement",{get:function(){return null===this._descriptionElementField&&(this._descriptionElementField=AutotaskDomSystem.Document.getChildElementByClassName(this._itemElement,"Description")),this._descriptionElementField},enumerable:!1,configurable:!0}),e.prototype.clearCompletedByText=function(){AutotaskDomSystem.Document.getChildElementByClassName(this._descriptionElement,"CompletedBy").remove()},e.prototype.complete=function(){var t;this._isComplete||(this._itemElement.classList.add("Completed"),this._isComplete=!0,null===(t=this._button)||void 0===t||t.set_value(!0))},e.prototype.dispose=function(){this._button=null,this._itemButtonClickedHandler=null,this._descriptionElementField=null},e.prototype.hide=function(){this._isHidden||(this._itemElement.classList.add("Hidden"),this._isHidden=!0)},e.prototype.revert=function(){var t;this._isComplete&&(this._itemElement.classList.remove("Completed"),this._isComplete=!1,null===(t=this._button)||void 0===t||t.set_value(!1))},e.prototype.setItemButonClickedHandler=function(t){this._itemButtonClickedHandler=t},e.prototype.setCompletedByText=function(t){var e=document.createElement("span");e.textContent=t,e.className="CompletedBy",this._descriptionElement.appendChild(e)},e.prototype.show=function(){this._isHidden&&(this._itemElement.classList.remove("Hidden"),this._isHidden=!1)},e.prototype.__initialize=function(){var t=this;this._button=autotask.find(this._buttonId),this._button.setToggleStateOverrideAction((function(){t._clickHandler()}))},e.prototype._clickHandler=function(){this._itemButtonClickedHandler&&this._itemButtonClickedHandler()},e}(Autotask.LifecycleObject);t.ChecklistItem=e}(AutotaskChecklistSystem||(AutotaskChecklistSystem={})),function(t){var e=function(e){function n(t,n,i,o,a){var r=e.call(this,t)||this;return r.itemId=n,r._backingInstanceId=i,r._childItemIds=o,r._buttonClickHandler=a,r._backingInstance=null,r._childItems=null,r._completedHandler=null,r._revertedHandler=null,r}return __extends(n,e),Object.defineProperty(n.prototype,"childItemCount",{get:function(){return this._childItems.length},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"completedChildItemCount",{get:function(){return this._countCompletedChildItems()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"hasIncompleteChildItems",{get:function(){return this.completedChildItemCount<this.childItemCount},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isComplete",{get:function(){return this._backingInstance.isComplete},enumerable:!1,configurable:!0}),n.prototype.complete=function(t){var e,n;this.isComplete||(null===(e=this._backingInstance)||void 0===e||e.complete(),null===(n=this._backingInstance)||void 0===n||n.setCompletedByText(t),null!==this._completedHandler&&this._completedHandler(this))},n.prototype.completeChildren=function(t){var e;null===(e=this._childItems)||void 0===e||e.forEach((function(e){e.isComplete||e.complete(t)}))},n.prototype.dispose=function(){this._backingInstance=null,this._childItems=null,this._completedHandler=null,this._revertedHandler=null},n.prototype.hide=function(){var t;null===(t=this._backingInstance)||void 0===t||t.hide()},n.prototype.revert=function(){var t,e;this.isComplete&&(null===(t=this._backingInstance)||void 0===t||t.revert(),null===(e=this._backingInstance)||void 0===e||e.clearCompletedByText(),null!==this._revertedHandler&&this._revertedHandler(this))},n.prototype.revertChildren=function(){var t;null===(t=this._childItems)||void 0===t||t.forEach((function(t){t.isComplete&&t.revert()}))},n.prototype.setCompletedHandler=function(t){this._completedHandler=t},n.prototype.setRevertedHandler=function(t){this._revertedHandler=t},n.prototype.show=function(){var t;null===(t=this._backingInstance)||void 0===t||t.show()},n.prototype.__initialize=function(){var t=this;this._backingInstance=autotask.find(this._backingInstanceId),null!==this._buttonClickHandler&&this._backingInstance.setItemButonClickedHandler((function(){t._clickHandler()})),this._childItems=[],this._childItemIds.forEach((function(e){var n;null===(n=t._childItems)||void 0===n||n.push(autotask.find(e))}))},n.prototype._countCompletedChildItems=function(){var t=0;return this._childItems.forEach((function(e){e.isComplete&&t++})),t},n.prototype._clickHandler=function(){null!==this._buttonClickHandler&&this._buttonClickHandler(new t.ChecklistParentItemClickedEventArgs(this))},n}(Autotask.LifecycleObject);t.ChecklistParentItem=e}(AutotaskChecklistSystem||(AutotaskChecklistSystem={})),function(t){var e=function(t){this.item=t};t.ChecklistParentItemClickedEventArgs=e}(AutotaskChecklistSystem||(AutotaskChecklistSystem={})),function(t){var e=function(t){this.isChecked=t};t.PromptToAutomateEventArgs=e}(AutotaskChecklistSystem||(AutotaskChecklistSystem={})),function(t){!function(t){var e=function(){function t(){this._initializationHandler=null,this._isEnabled=!1}return Object.defineProperty(t.prototype,"isEnabled",{get:function(){var e=autotask.localStorageManagement.__getItem(t._localStorageIsDisabledKey);return this._isEnabled&&!e},enumerable:!1,configurable:!0}),t.prototype.disable=function(){autotask.localStorageManagement.__setItem(t._localStorageIsDisabledKey,"1")},t.prototype.initialize=function(t){this._isEnabled=t},t.prototype.registerInitializationHandler=function(t){this._initializationHandler=t},t.prototype.start=function(){null!==this._initializationHandler&&this._initializationHandler()},t._localStorageIsDisabledKey="CooperBotIsDisabled",t}();t.CooperBotIntegration=e}(t.CooperBot||(t.CooperBot={}))}(AutotaskIntegrations||(AutotaskIntegrations={})),function(t){var e=function(){function t(){this._addBookmarkTitle=null,this._alertDialogDefaultTitle=null,this._alertDialogInformationTitle=null,this._alertDialogSuccessTitle=null,this._confirmationDialogDefaultTitle=null,this._confirmationDialogConfirmationTitle=null,this._confirmationDialogWarningTitle=null,this._confirmButtonText=null,this._denyButtonText=null,this._elegantErrorText=null,this._gridDeleteConfirmationDescription=null,this._gridDeleteConfirmationHeading=null,this._okayButtonText=null,this._removeBookmarkTitle=null}return Object.defineProperty(t.prototype,"addBookmarkTitle",{get:function(){return null===this._addBookmarkTitle?autotask.throwException("AutotaskLocalizationSystem.LocalizedText.addBookmarTitle is null."):this._addBookmarkTitle},set:function(t){this._addBookmarkTitle=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"alertDialogDefaultTitle",{get:function(){return null===this._alertDialogDefaultTitle?autotask.throwException("AutotaskLocalizationSystem.LocalizedText.alertDialogDefaultTitle is null."):this._alertDialogDefaultTitle},set:function(t){this._alertDialogDefaultTitle=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"alertDialogInformationTitle",{get:function(){return null===this._alertDialogInformationTitle?autotask.throwException("AutotaskLocalizationSystem.LocalizedText.alertDialogInformationTitle is null."):this._alertDialogInformationTitle},set:function(t){this._alertDialogInformationTitle=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"alertDialogSuccessTitle",{get:function(){return null===this._alertDialogSuccessTitle?autotask.throwException("AutotaskLocalizationSystem.LocalizedText.alertDialogSuccessTitle is null."):this._alertDialogSuccessTitle},set:function(t){this._alertDialogSuccessTitle=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"confirmationDialogDefaultTitle",{get:function(){return null===this._confirmationDialogDefaultTitle?autotask.throwException("AutotaskLocalizationSystem.LocalizedText.confirmationDialogDefaultTitle is null."):this._confirmationDialogDefaultTitle},set:function(t){this._confirmationDialogDefaultTitle=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"confirmationDialogConfirmationTitle",{get:function(){return null===this._confirmationDialogConfirmationTitle?autotask.throwException("AutotaskLocalizationSystem.LocalizedText.confirmationDialogConfirmationTitle is null."):this._confirmationDialogConfirmationTitle},set:function(t){this._confirmationDialogConfirmationTitle=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"confirmationDialogWarningTitle",{get:function(){return null===this._confirmationDialogWarningTitle?autotask.throwException("AutotaskLocalizationSystem.LocalizedText.confirmationDialogWarningTitle is null."):this._confirmationDialogWarningTitle},set:function(t){this._confirmationDialogWarningTitle=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"confirmButtonText",{get:function(){return null===this._confirmButtonText?autotask.throwException("AutotaskLocalizationSystem.LocalizedText.confirmButtonText is null."):this._confirmButtonText},set:function(t){this._confirmButtonText=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"denyButtonText",{get:function(){return null===this._denyButtonText?autotask.throwException("AutotaskLocalizationSystem.LocalizedText.denyButtonText is null."):this._denyButtonText},set:function(t){this._denyButtonText=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"elegantErrorText",{get:function(){return null===this._elegantErrorText?autotask.throwException("AutotaskLocalizationSystem.LocalizedText.elegantErrorText is null."):this._elegantErrorText},set:function(t){this._elegantErrorText=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"gridDeleteConfirmationDescription",{get:function(){return null===this._gridDeleteConfirmationDescription?autotask.throwException("AutotaskLocalizationSystem.LocalizedText.gridDeleteConfirmationDescription is null."):this._gridDeleteConfirmationDescription},set:function(t){this._gridDeleteConfirmationDescription=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"gridDeleteConfirmationHeading",{get:function(){return null===this._gridDeleteConfirmationHeading?autotask.throwException("AutotaskLocalizationSystem.LocalizedText.gridDeleteConfirmationHeading is null."):this._gridDeleteConfirmationHeading},set:function(t){this._gridDeleteConfirmationHeading=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"okayButtonText",{get:function(){return null===this._okayButtonText?autotask.throwException("AutotaskLocalizationSystem.LocalizedText.okayButtonText is null."):this._okayButtonText},set:function(t){this._okayButtonText=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"removeBookmarkTitle",{get:function(){return null===this._removeBookmarkTitle?autotask.throwException("AutotaskLocalizationSystem.LocalizedText.removeBookmarkTitle is null."):this._removeBookmarkTitle},set:function(t){this._removeBookmarkTitle=t},enumerable:!1,configurable:!0}),t}();t.LocalizedText=e}(AutotaskLocalizationSystem||(AutotaskLocalizationSystem={})),function(t){var e=function(){function t(){this._keepAliveUrl=null,this._expireSessionClosePage=null,this._expireSessionRestorePage=null,this._sessionExpiredByInactivityPage=null,this._sessionExpiredByLogoutPage=null}return Object.defineProperty(t.prototype,"__keepAliveUrl",{get:function(){return null===this._keepAliveUrl?autotask.throwException("The keep alive url is not set."):this._keepAliveUrl},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"__expireSessionClosePage",{get:function(){return null===this._expireSessionClosePage?autotask.throwException("The expire session close page is not set."):this._expireSessionClosePage},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"__expireSessionRestorePage",{get:function(){return null===this._expireSessionRestorePage?autotask.throwException("The expire session restore page is not set."):this._expireSessionRestorePage},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"__sessionExpiredByInactivityPage",{get:function(){return null===this._sessionExpiredByInactivityPage?autotask.throwException("The session expired by inactivity page is not set."):this._sessionExpiredByInactivityPage},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"__sessionExpiredByLogoutPage",{get:function(){return null===this._sessionExpiredByLogoutPage?autotask.throwException("The session expired by logout page is not set."):this._sessionExpiredByLogoutPage},enumerable:!1,configurable:!0}),t.prototype.__set_keepAliveUrl=function(t){this._keepAliveUrl=t},t.prototype.__set_expireSessionClosePage=function(t){this._expireSessionClosePage=t},t.prototype.__set_expireSessionRestorePage=function(t){this._expireSessionRestorePage=t},t.prototype.__set_sessionExpiredByInactivityPage=function(t){this._sessionExpiredByInactivityPage=t},t.prototype.__set_sessionExpiredByLogoutPage=function(t){this._sessionExpiredByLogoutPage=t},t}();t.SessionExpirationNavigation=e}(AutotaskSessionExpirationSystem||(AutotaskSessionExpirationSystem={})),function(t){var e=function(){function t(){this._contextOverlay=null}return Object.defineProperty(t.prototype,"contextOverlay",{get:function(){return null===this._contextOverlay?autotask.throwException("TooltipContextOverlayLocator.contextOverlay is null."):this._contextOverlay},enumerable:!1,configurable:!0}),t.prototype.initialize=function(){this._contextOverlay=autotask.find("tooltipOverlayEC535B5FE4EF4122A1C75C3FDF2F26E0")},t}();t.TooltipContextOverlayLocator=e}(AutotaskOverlaySystem||(AutotaskOverlaySystem={})),function(t){var e=function(){function t(){this._cookieName="AutotaskMvcPerformanceTracking",this._workflowMaxAgeInSeconds=1200}return Object.defineProperty(t.prototype,"isWorkflowEnabled",{get:function(){return"true"===this.getCookieValue().trim()},enumerable:!1,configurable:!0}),t.prototype.startWorkflow=function(){this.isWorkflowEnabled||this.setCookie("true")},t.prototype.endWorkflow=function(){this.deleteCookie()},t.prototype.setCookie=function(t){document.cookie=this._cookieName+"="+t+";max-age="+this._workflowMaxAgeInSeconds.toString()+";path=/;"},t.prototype.deleteCookie=function(){document.cookie=this._cookieName+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;"},t.prototype.getCookieValue=function(){var t=this,e=decodeURIComponent(document.cookie).split(";"),n="";return e.forEach((function(e){var i=e.trimStart();0===i.indexOf(t._cookieName)&&(n=i.substring(t._cookieName.length+1,i.length))})),n},t}();t.PerformanceInstrumentationCookieManagement=e}(AutotaskPerformanceInstrumentationSystem||(AutotaskPerformanceInstrumentationSystem={})),function(t){var e=function(){function e(){var e=this;this._cookieManagement=new t.PerformanceInstrumentationCookieManagement,this._saveUrl=null,this._storage=new t.PerformanceInstrumentationStorage,this._isWorkflowRunning=this._cookieManagement.isWorkflowEnabled,this._isWorkflowRunning?(this._performanceObserver=new PerformanceObserver((function(t){return e._performanceObserverHandler(t)})),this._performanceObserver.observe({type:"navigation"}),this._performanceObserver.observe({type:"resource"}),this._intervalId=window.setInterval((function(){e._timerHandler()}),1e4)):(this._performanceObserver=null,this._intervalId=null)}return e.prototype.start=function(e){if(this._isWorkflowRunning)throw new Error("A performance workflow has already been started.");var n=new t.PerformanceWorkflow(e);n.__start(),this._storage.__saveWorkflow(n),this._isWorkflowRunning=!0,this._cookieManagement.startWorkflow(),console.log("Performance workflow starting."),window.location.reload()},e.prototype.stop=function(){if(!this._isWorkflowRunning)throw new Error("A performance workflow has not been started.");null!==this._performanceObserver&&this._performanceObserver.disconnect(),null!==this._intervalId&&window.clearInterval(this._intervalId);var e=this._storage.__getWorkflow(),n=this._storage.__getPagePerformanceLogs(),i=this._storage.__getAjaxPerformanceLogs(),o=this._storage.__getFrameworkLifeCyclePerformanceLogs();if(this._storage.__clear(),e.__stop(),this._isWorkflowRunning=!1,this._cookieManagement.endWorkflow(),null===this._saveUrl)throw new Error("The save URL is not set.");var a=new SavePerformanceWorkflowRoute(this._saveUrl),r=new t.PerformanceWorkflowPostedData(e,n,i,o);a.makeRequest(r.__createRequestData(),(function(){return console.log("Performance workflow completed.")}))},e.prototype.__addFrameworkLifeCycleLog=function(t){this._isWorkflowRunning&&this._storage.__saveFrameworkLifeCycleLog(t)},e.prototype.__set_saveUrl=function(t){this._saveUrl=t},e.prototype._performanceObserverHandler=function(e){for(var n=0,i=e.getEntries();n<i.length;n++){var o=i[n];if("navigation"===o.entryType){var a=o,r=t.PagePerformanceLog.__fromPerformanceEntry(a);this._storage.__savePagePerformanceLog(r)}else if("resource"===o.entryType){var s=o;if("xmlhttprequest"===s.initiatorType){var l=t.AjaxPerformanceLog.__fromPerformanceEntry(s);this._storage.__saveAjaxPerformanceLog(l)}}}},e.prototype._timerHandler=function(){this._cookieManagement.isWorkflowEnabled||(console.log("Performance workflow expired."),null!==this._performanceObserver&&this._performanceObserver.disconnect(),null!==this._intervalId&&window.clearInterval(this._intervalId),this._isWorkflowRunning=!1,this._storage.__clear())},e}();t.PerformanceInstrumentationManagement=e}(AutotaskPerformanceInstrumentationSystem||(AutotaskPerformanceInstrumentationSystem={})),function(t){var e=function(){function e(){}return e.prototype.__clear=function(){for(var t=[],n=0;n<window.localStorage.length;n++){var i=window.localStorage.key(n);null!==i&&(i.startsWith(e._ajaxLogPrefix)||i.startsWith(e._lifecycleLogPrefix)||i.startsWith(e._localStorageWorkflowKey)||i.startsWith(e._pageLogPrefix))&&t.push(i)}for(n=0;n<t.length;n++){var o=t[n];autotask.localStorageManagement.__removeItem(o)}},e.prototype.__getAjaxPerformanceLogs=function(){for(var n=[],i=0;i<window.localStorage.length;i++){var o=window.localStorage.key(i);if(null!==o&&o.startsWith(e._ajaxLogPrefix)){var a=localStorage.getItem(o);null!==a&&n.push(t.AjaxPerformanceLog.__fromJson(a))}}return n},e.prototype.__getFrameworkLifeCyclePerformanceLogs=function(){for(var n=[],i=0;i<window.localStorage.length;i++){var o=window.localStorage.key(i);if(null!==o&&o.startsWith(e._lifecycleLogPrefix)){var a=localStorage.getItem(o);null!==a&&n.push(t.FrameworkLifeCycleLog.__fromJson(a))}}return n},e.prototype.__getPagePerformanceLogs=function(){for(var n=[],i=0;i<window.localStorage.length;i++){var o=window.localStorage.key(i);if(null!==o&&o.startsWith(e._pageLogPrefix)){var a=localStorage.getItem(o);null!==a&&n.push(t.PagePerformanceLog.__fromJson(a))}}return n},e.prototype.__getWorkflow=function(){var n=autotask.localStorageManagement.__getItem(e._localStorageWorkflowKey);if(null===n)throw new Error("The performance workflow is not set.");return t.PerformanceWorkflow.__fromJson(n)},e.prototype.__saveAjaxPerformanceLog=function(t){var n=this._generateStorageKey(e._ajaxLogPrefix);autotask.localStorageManagement.__setItem(n,t.__toJson())},e.prototype.__saveFrameworkLifeCycleLog=function(t){var n=this._generateStorageKey(e._lifecycleLogPrefix);autotask.localStorageManagement.__setItem(n,t.__toJson())},e.prototype.__savePagePerformanceLog=function(t){var n=this._generateStorageKey(e._pageLogPrefix);autotask.localStorageManagement.__setItem(n,t.__toJson())},e.prototype.__saveWorkflow=function(t){autotask.localStorageManagement.__setItem(e._localStorageWorkflowKey,t.__toJson())},e.prototype._generateStorageKey=function(t){var e=Math.random().toString();return t.concat(e)},e._ajaxLogPrefix="perf-ajax",e._lifecycleLogPrefix="perf-lifecycle",e._localStorageWorkflowKey="perf-workflow",e._pageLogPrefix="perf-page",e}();t.PerformanceInstrumentationStorage=e}(AutotaskPerformanceInstrumentationSystem||(AutotaskPerformanceInstrumentationSystem={})),function(t){var e=function(t){function e(){var e=t.call(this)||this;return e.cooperBotIntegration=new AutotaskIntegrations.CooperBot.CooperBotIntegration,e.localizedText=new AutotaskLocalizationSystem.LocalizedText,e.sessionExpirationNavigation=new AutotaskSessionExpirationSystem.SessionExpirationNavigation,e.tooltipContextOverlayLocator=new AutotaskOverlaySystem.TooltipContextOverlayLocator,e.performanceInstrumentationManagement=new AutotaskPerformanceInstrumentationSystem.PerformanceInstrumentationManagement,e._page=null,e}return __extends(e,t),e.prototype.findPage=function(){return null===this._page?autotask.throwException("autotask.findPage() could not locate the page object."):this._page},e.prototype.registerPage=function(t){this._page=t},e}(t.AutotaskCore);t.AutotaskMvcCore=e}(Autotask||(Autotask={})),autotask=new Autotask.AutotaskMvcCore,function(t){var e=function(t){function e(){return t.call(this)||this}return __extends(e,t),e.prototype.__activateClickProtection=function(){for(var t=0,e=this._findInstances();t<e.length;t++){e[t].__activateClickProtection()}},e.prototype.__deactivateClickProtection=function(){for(var t=0,e=this._findInstances();t<e.length;t++){e[t].__deactivateClickProtection()}},e}(t.TypeSpecificInstanceManagement);t.DeprecatedButtonInstanceManagement=e}(Autotask||(Autotask={})),function(t){var e=function(){function t(){this._isEnabled=!1,this._transitionFadeDelayInMilliseconds=1e3}return t.prototype._onRefreshDashboardNavigationSuccess=function(t){this._dataId=t},t.prototype.enable=function(t){"boolean"==typeof t&&this._isEnabled!==t&&(this._dashboardNavigationButton.set_enabled(t),this._isEnabled=t)},t.prototype.initialize=function(t,e,n,i){this._containerId=t,this._dashboardNavigationButton=autotask.find(e),this._dataId=n,this._refreshUrl=i;var o=AutotaskDomSystem.Document.getElementById(t);this._transitionCoordinator=new Autotask.TransitionCoordinator(0,(function(){window.autotask.transitionManagement.__startFadeTransitionForContextOverlayContent(o)}),this._transitionFadeDelayInMilliseconds,(function(){window.autotask.transitionManagement.__stopFadeTransitionForContextOverlayContent(o)}),this._transitionReset.bind(this))},t.prototype._transitionReset=function(){},t.prototype.refreshDashboardNavigation=function(){var t=autotask.instanceTrackerManagement.__findInstanceTracker(this._containerId),e={dashboardDataId:this._dataId};window.autotask.navigation.ajax.__restrictedGetRequest(this._refreshUrl,e,this._onRefreshDashboardNavigationSuccess.bind(this)).__dashboardNavigationRefresh(t,this._transitionCoordinator)},t}();t.DashboardNavigationManagement=e}(AutotaskDashboardNavigationSystem||(AutotaskDashboardNavigationSystem={})),function(t){var e=function(){function t(t){this._dashboardNavigationManagement=t}return t.prototype.refreshDashboardNavigation=function(){this._dashboardNavigationManagement.refreshDashboardNavigation()},t}();t.InternalPageFacade=e}(AutotaskDashboardNavigationSystem||(AutotaskDashboardNavigationSystem={})),function(t){var e=function(){function t(t){this._dashboardNavigationManagement=t}return t.prototype.enable=function(t){this._dashboardNavigationManagement.enable(t)},t.prototype.initialize=function(t,e,n,i){this._dashboardNavigationManagement.initialize(t,e,n,i)},t}();t.PageFacade=e}(AutotaskDashboardNavigationSystem||(AutotaskDashboardNavigationSystem={})),function(t){var e=function(t){function e(e,n){var i=t.call(this,e)||this;return i._dashboardPanelElement=AutotaskDomSystem.Document.getElementById(e),i._dashboardShellId=n,i._dashboardShell=null,i._hidingHandlers=[],i._showingHandlers=[],i._userInteractionEventEndedHandlers=[],i._userInteractionEventStartedHandlers=[],i._activeCssClass="Active",i}return __extends(e,t),e.prototype.addHidingHandler=function(t){this._hidingHandlers.push(t)},e.prototype.addShowingHandler=function(t){this._showingHandlers.push(t)},e.prototype.hide=function(){this._raiseHidingEvent(),this._dashboardPanelElement.classList.remove(this._activeCssClass)},e.prototype.refresh=function(){this._dashboardShell.__refresh()},e.prototype.registerUserInteractionEventHandlers=function(t,e){this._userInteractionEventStartedHandlers.push(t),this._userInteractionEventEndedHandlers.push(e)},e.prototype.refreshWidgets=function(){this._dashboardShell.__refreshWidgets()},e.prototype.show=function(){this._dashboardPanelElement.classList.add(this._activeCssClass),window.dispatchEvent(new Event("resize")),this._raiseShowingEvent()},e.prototype.__initialize=function(){var t=this;this._dashboardShell=autotask.find(this._dashboardShellId),this._dashboardShell.__registerUserInteractionEventHandlers((function(){t._dashboardShellUserInteractionEventEndedHandler()}),(function(){t._dashboardShellUserInteractionEventStartedHandler()}))},e.prototype._dashboardShellUserInteractionEventEndedHandler=function(){this._raiseUserInteractionEventEndedEvent()},e.prototype._dashboardShellUserInteractionEventStartedHandler=function(){this._raiseUserInteractionEventStartedEvent()},e.prototype._raiseHidingEvent=function(){for(var t=0,e=this._hidingHandlers;t<e.length;t++){(0,e[t])()}},e.prototype._raiseShowingEvent=function(){for(var t=0,e=this._showingHandlers;t<e.length;t++){(0,e[t])()}},e.prototype._raiseUserInteractionEventEndedEvent=function(){for(var t=0,e=this._userInteractionEventEndedHandlers;t<e.length;t++){(0,e[t])()}},e.prototype._raiseUserInteractionEventStartedEvent=function(){for(var t=0,e=this._userInteractionEventStartedHandlers;t<e.length;t++){(0,e[t])()}},e}(Autotask.LifecycleObject);t.DashboardPanel=e}(AutotaskDashboardSystem||(AutotaskDashboardSystem={})),function(t){var e=function(){function t(){}return t.prototype.addMinimizedBar=function(t,e){autotask.dialogManagement.__addMinimizedBar(t,e)},t.prototype.removeMinimizedBar=function(t){autotask.dialogManagement.__removeMinimizedBar(t)},t}();t.DialogMinifyManager=e}(AutotaskDialogSystem||(AutotaskDialogSystem={})),function(t){var e=function(){function t(){}return t.prototype.hideVisibleContextOverlays=function(){autotask.contextOverlayManagement.__hideVisibleContextOverlays()},t.prototype.pullDialogOffStack=function(t){autotask.overlayManagement.__pullDialogOffStack(null,t)},t.prototype.pushDialogOnStack=function(t){autotask.overlayManagement.__pushDialogOnStack(null,t)},t}();t.DialogOverlayManager=e}(AutotaskDialogSystem||(AutotaskDialogSystem={})),function(t){var e=function(){function t(){this._data=new Autotask.DeprecatedRequestData}return Object.defineProperty(t.prototype,"data",{get:function(){return this._data},enumerable:!1,configurable:!0}),t}();t.PoppingOutEventArgs=e}(AutotaskDialogSystem||(AutotaskDialogSystem={})),function(t){var e=function(e){function n(t,n,i,o,a,r){var s=e.call(this,t)||this;s._backingDialogId=n;var l=AutotaskDomSystem.Document.getElementById(s._backingDialogId).firstElementChild.firstElementChild;return s._validationSummaryElement=l.children[1],s._popOutPageBehavior=i,s._bookmarkPageCode=o,s._bookmarkPrimaryKey=a,s._helpPageBehavior=r,s._poppingOutHandlers=[],s._backingDialogInstance=null,s._customValidationSummaryInstance=null,s._validationSummaryInstance=null,s}return __extends(n,e),Object.defineProperty(n.prototype,"customValidationSummary",{get:function(){return this._customValidationSummaryInstance},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"_backingDialog",{get:function(){return this._backingDialogInstance},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"_validationSummary",{get:function(){return this._validationSummaryInstance},enumerable:!1,configurable:!0}),n.prototype.addPoppingOutHandler=function(t){this._poppingOutHandlers.push(t)},n.prototype.hide=function(){this._backingDialogInstance.close()},n.prototype._initialize=function(){var t=this;this._backingDialogInstance=autotask.find(this._backingDialogId),this._backingDialog.set_bookmarkButtonClickedHandler((function(e,n){t._bookmarkButtonClickedHandler(e,n)})),this._backingDialog.set_helpButtonClickedHandler((function(){t._helpButtonClickedHandler()})),this._backingDialog.addPoppingOutHandler((function(){t._poppingOutHandler()})),this._validationSummaryInstance=autotask.find(this._validationSummaryElement.id),this._customValidationSummaryInstance=this._validationSummaryInstance.__get_customValidationSummary()},n.prototype._bookmarkButtonClickedHandler=function(t,e){null!==this._bookmarkPageCode&&(t?autotask.bookmarkManagement.__addBookmark(this._bookmarkPageCode,this._bookmarkPrimaryKey,e):autotask.bookmarkManagement.__removeBookmark(this._bookmarkPageCode,this._bookmarkPrimaryKey,e))},n.prototype._helpButtonClickedHandler=function(){null!==this._helpPageBehavior&&this._helpPageBehavior.open(null)},n.prototype._poppingOutHandler=function(){if(null!==this._popOutPageBehavior){var t=this._raisePoppingOutEvent();null!==t&&this._popOutPageBehavior.applyDynamicRequestData(t),this._popOutPageBehavior.open(null)}},n.prototype._raisePoppingOutEvent=function(){var e=null;if(this._poppingOutHandlers.length>0){for(var n=new t.PoppingOutEventArgs,i=0,o=this._poppingOutHandlers;i<o.length;i++){(0,o[i])(n)}e=n.data}return e},n}(Autotask.LifecycleObject);t.SimpleEntityDialogFacade=e}(AutotaskDialogSystem||(AutotaskDialogSystem={})),function(t){var e=function(t){function e(e,n,i,o,a,r,s){var l=t.call(this,e,n,i,o,a,r)||this;return l._shellContentId=s,l._shellContentInstance=null,l}return __extends(e,t),Object.defineProperty(e.prototype,"saveCoordinator",{get:function(){return this._shellContent.saveCoordinator},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_shellContent",{get:function(){return this._shellContentInstance},enumerable:!1,configurable:!0}),e.prototype.__initialize=function(){t.prototype._initialize.call(this),this._shellContentInstance=autotask.find(this._shellContentId)},e}(t.SimpleEntityDialogFacade);t.SimpleEntityDetailDialogFacade=e}(AutotaskDialogSystem||(AutotaskDialogSystem={})),function(t){var e=function(t){function e(e,n,i,o,a,r,s){var l=t.call(this,e,n,i,o,a,r)||this;return l._shellContentId=s,l._shellContentInstance=null,l}return __extends(e,t),Object.defineProperty(e.prototype,"saveCoordinator",{get:function(){return this._shellContent.saveCoordinator},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_shellContent",{get:function(){return this._shellContentInstance},enumerable:!1,configurable:!0}),e.prototype.generateFieldData=function(){return this._shellContent.generateFieldData()},e.prototype.validate=function(){return this._shellContent.validate(!1)},e.prototype.validateEditor=function(t){return this._shellContent.__validateEditor(t)},e.prototype.__finalize=function(){this._shellContent.prepareValidation(this._validationSummary)},e.prototype.__initialize=function(){var e=this;t.prototype._initialize.call(this),this._backingDialog._addResetValidationHandler((function(){e._resetValidationHandler()})),this._shellContentInstance=autotask.find(this._shellContentId)},e.prototype.__resetValidation=function(){this._shellContent.resetValidation(),this._validationSummary.__get_isActive()&&this._shellContent.validate(!0)},e.prototype._resetValidationHandler=function(){this.__resetValidation()},e}(t.SimpleEntityDialogFacade);t.SimpleEntityEditDialogFacade=e}(AutotaskDialogSystem||(AutotaskDialogSystem={})),function(t){var e=function(t){function e(e,n,i,o,a,r,s){var l=t.call(this,e,n,i,o,a,r)||this;return l._shellContentId=s,l._shellContentInstance=null,l}return __extends(e,t),Object.defineProperty(e.prototype,"saveCoordinator",{get:function(){return this._shellContent.saveCoordinator},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_shellContent",{get:function(){return this._shellContentInstance},enumerable:!1,configurable:!0}),e.prototype.generateFieldData=function(){return this._shellContent.generateFieldData()},e.prototype.validate=function(){return this._shellContent.validate(!1)},e.prototype.validateEditor=function(t){return this._shellContent.__validateEditor(t)},e.prototype.__finalize=function(){this._shellContent.prepareValidation(this._validationSummary)},e.prototype.__initialize=function(){var e=this;t.prototype._initialize.call(this),this._backingDialog._addResetValidationHandler((function(){e._resetValidationHandler()})),this._shellContentInstance=autotask.find(this._shellContentId)},e.prototype.__resetValidation=function(){this._shellContent.resetValidation(),this._validationSummary.__get_isActive()&&this._shellContent.validate(!0)},e.prototype._resetValidationHandler=function(){this.__resetValidation()},e}(t.SimpleEntityDialogFacade);t.SimpleEntityNewDialogFacade=e}(AutotaskDialogSystem||(AutotaskDialogSystem={})),function(t){var e=function(){function t(t,e,n){autotask.instanceManagement.__addRegistrationKey(this,t),this._groupTokenValue=e,this._participantId=n}return t.prototype.__initialize=function(){var t=this,e=autotask.find(this._participantId);e.addDisposingHandler((function(){t._disposingHandler()})),autotask.findPage().__dirtyState.addParticipant(this._groupTokenValue,e)},t.prototype._disposingHandler=function(){var t=autotask.findPage(),e=autotask.find(this._participantId);t.__dirtyState.removeParticipant(this._groupTokenValue,e)},t}();t.DirtyStateMapper=e}(AutotaskDirtyStateSystem||(AutotaskDirtyStateSystem={})),function(t){var e=function(){function t(t){this._dirtyStateManagement=t}return t.prototype.addParticipant=function(t,e){this._dirtyStateManagement.addParticipant(t,e)},t.prototype.addLegacyParticipant=function(t,e){this._dirtyStateManagement.addLegacyParticipant(t,e)},t.prototype.removeParticipant=function(t,e){this._dirtyStateManagement.removeParticipant(t,e)},t.prototype.removeLegacyParticipant=function(t,e){this._dirtyStateManagement.removeLegacyParticipant(t,e)},t}();t.InternalPageFacade=e}(AutotaskDirtyStateSystem||(AutotaskDirtyStateSystem={})),function(t){var e=function(){function t(t,e,n){autotask.instanceManagement.__addRegistrationKey(this,t),this._groupTokenValue=e,this._editorId=n}return t.prototype.__initialize=function(){var t=this,e=autotask.find(this._editorId);e.__addDisposing((function(){t._disposingHandler()})),autotask.findPage().__dirtyState.addLegacyParticipant(this._groupTokenValue,e)},t.prototype._disposingHandler=function(){var t=autotask.findPage(),e=autotask.find(this._editorId);t.__dirtyState.removeLegacyParticipant(this._groupTokenValue,e)},t}();t.LegacyDirtyStateMapper=e}(AutotaskDirtyStateSystem||(AutotaskDirtyStateSystem={})),function(t){var e=function(){function t(t){this._dirtyStateManagement=t}return t.prototype.addBecomeDirty=function(t,e){this._dirtyStateManagement.addBecomeDirty(t,e)},t.prototype.addBecomeClean=function(t,e){this._dirtyStateManagement.addBecomeClean(t,e)},t}();t.PageFacade=e}(AutotaskDirtyStateSystem||(AutotaskDirtyStateSystem={})),function(t){var e=function(t){function e(e,n){var i=t.call(this,e)||this;return i._itemIds=n,i._selectedHandler=null,i._selectedItemId=null,i._selectedKey=null,i}return __extends(e,t),Object.defineProperty(e.prototype,"selectedHandler",{set:function(t){this._selectedHandler=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"selectedKey",{get:function(){return this._selectedKey},enumerable:!1,configurable:!0}),e.prototype.deselect=function(){null!==this._selectedItemId&&(autotask.find(this._selectedItemId).deselect(),this._selectedItemId=null,this._selectedKey=null)},e.prototype.select=function(t){var e;this.deselect();for(var n=0,i=this._itemIds;n<i.length;n++){var o=i[n];if((e=autotask.find(o)).key===t){e.select();break}}},e.prototype.__initialize=function(){for(var t=this,e=0,n=this._itemIds;e<n.length;e++){var i=n[e];autotask.find(i).selectedHandler=function(e,n){t._itemSelectedHandler(e,n)}}},e.prototype._itemSelectedHandler=function(t,e){this.deselect(),this._selectedItemId=t,this._selectedKey=e,this._raiseSelectedEvent()},e.prototype._raiseSelectedEvent=function(){null!==this._selectedHandler&&this._selectedHandler()},e}(Autotask.LifecycleObject);t.Chooser=e}(AutotaskDocumentationManagerPages||(AutotaskDocumentationManagerPages={})),function(t){var e=function(t){function e(e,n,i){var o=t.call(this,e)||this;o._itemElement=AutotaskDomSystem.Document.getElementById(e),o._key=n,o._selectBehavior=i;for(var a=0;a<o._itemElement.childNodes.length;a++)o._itemElement.childNodes[a].addEventListener("click",(function(){o._childClickListener()}));return o._selectedCssClass="Selected",o._selectedHandler=null,o}return __extends(e,t),Object.defineProperty(e.prototype,"key",{get:function(){return this._key},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"selectedHandler",{set:function(t){this._selectedHandler=t},enumerable:!1,configurable:!0}),e.prototype.deselect=function(){this._itemElement.classList.remove(this._selectedCssClass)},e.prototype.select=function(){this._itemElement.classList.add(this._selectedCssClass),this._raiseSelectedEvent()},e.prototype._isSelected=function(){return this._itemElement.classList.contains(this._selectedCssClass)},e.prototype._childClickListener=function(){this._isSelected()||(null!==this._selectBehavior&&this._selectBehavior(),this.select())},e.prototype._raiseSelectedEvent=function(){null!==this._selectedHandler&&this._selectedHandler(this.id,this._key)},e}(Autotask.LifecycleObject);t.ChooserItem=e}(AutotaskDocumentationManagerPages||(AutotaskDocumentationManagerPages={})),function(t){var e=function(t){function e(e,n){var i=t.call(this,e)||this;return i._gridId=n,i._windowResizeHandler=function(){i._windowResize()},window.addEventListener("resize",i._windowResizeHandler),i._grid=null,i}return __extends(e,t),e.prototype.__dispose=function(){window.removeEventListener("resize",this._windowResizeHandler)},e.prototype.__initialize=function(){this._grid=autotask.find(this._gridId)},e.prototype._windowResize=function(){this._grid.__refreshLayout()},e}(Autotask.LifecycleObject);t.GridBody=e}(AutotaskDocumentationManagerPages||(AutotaskDocumentationManagerPages={})),function(t){var e=function(t){function e(e,n,i,o,a,r){var s=t.call(this,e)||this;return s._overviewNavigatorId=n,s._expirationsNavigatorId=i,s._chooserId=o,s._documentsNavigatorId=a,s._nestedChooserId=r,s._isDocumentsNavigatorSelected=!1,s._isExpirationsNavigatorSelected=!1,s._isOverviewNavigatorSelected=!0,s._chooser=null,s._documentsNavigator=null,s._expirationsNavigator=null,s._nestedChooser=null,s._overviewNavigator=null,s._selectedChooserKey=null,s._selectedNestedChooserKey=null,s}return __extends(e,t),Object.defineProperty(e.prototype,"expandedNestedChooserKeys",{get:function(){return this._nestedChooser.expandedKeys},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isDocumentsNavigatorSelected",{get:function(){return this._isDocumentsNavigatorSelected},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isExpirationsNavigatorSelected",{get:function(){return this._isExpirationsNavigatorSelected},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isOverviewNavigatorSelected",{get:function(){return this._isOverviewNavigatorSelected},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"selectedChooserKey",{get:function(){return this._selectedChooserKey},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"selectedNestedChooserKey",{get:function(){return this._selectedNestedChooserKey},enumerable:!1,configurable:!0}),e.prototype.expandNestedChooser=function(t){this._nestedChooser.expand(t)},e.prototype.selectChooser=function(t){this._chooser.select(t)},e.prototype.selectDocumentsNavigator=function(){this._documentsNavigator.select()},e.prototype.selectExpirationsNavigator=function(){this._expirationsNavigator.select()},e.prototype.selectNestedChooser=function(t){this._nestedChooser.select(t)},e.prototype.selectOverviewNavigator=function(){this._overviewNavigator.select()},e.prototype.__initialize=function(){var t=this;this._overviewNavigator=autotask.find(this._overviewNavigatorId),this._overviewNavigator.selectedHandler=function(){t._navigationSelectedHandler(!0,!1,!1,!1,!1)},this._expirationsNavigator=autotask.find(this._expirationsNavigatorId),this._expirationsNavigator.selectedHandler=function(){t._navigationSelectedHandler(!1,!0,!1,!1,!1)},this._chooser=autotask.find(this._chooserId),this._chooser.selectedHandler=function(){t._navigationSelectedHandler(!1,!1,!0,!1,!1)},null!==this._documentsNavigatorId&&(this._documentsNavigator=autotask.find(this._documentsNavigatorId),this._documentsNavigator.selectedHandler=function(){t._navigationSelectedHandler(!1,!1,!1,!0,!1)}),this._nestedChooser=autotask.find(this._nestedChooserId),this._nestedChooser.selectedHandler=function(){t._navigationSelectedHandler(!1,!1,!1,!1,!0)}},e.prototype._navigationSelectedHandler=function(t,e,n,i,o){t||this._overviewNavigator.deselect(),e||this._expirationsNavigator.deselect(),n||this._chooser.deselect(),i||null===this._documentsNavigator||this._documentsNavigator.deselect(),o||this._nestedChooser.deselect(),this._isOverviewNavigatorSelected=t,this._isExpirationsNavigatorSelected=e,this._selectedChooserKey=this._chooser.selectedKey,this._isDocumentsNavigatorSelected=i,this._selectedNestedChooserKey=this._nestedChooser.selectedKey},e}(Autotask.LifecycleObject);t.NavigationContent=e}(AutotaskDocumentationManagerPages||(AutotaskDocumentationManagerPages={})),function(t){var e=function(t){function e(e,n,i){var o=t.call(this,e)||this;return o._section=AutotaskDomSystem.Document.getElementById(e),o._collapsibleStateManager=n,o._isCollapsed=i,o._section.firstChild.addEventListener("click",(function(){o._titleClickHandler()})),o._collapsedCssClass="Collapsed",o}return __extends(e,t),e.prototype._titleClickHandler=function(){this._toggleCollapsed()},e.prototype._toggleCollapsed=function(){this._isCollapsed?this._section.classList.remove(this._collapsedCssClass):this._section.classList.add(this._collapsedCssClass),this._isCollapsed=!this._isCollapsed,this._collapsibleStateManager.__saveState(this._isCollapsed)},e}(Autotask.LifecycleObject);t.NavigationSection=e}(AutotaskDocumentationManagerPages||(AutotaskDocumentationManagerPages={})),function(t){var e=function(t){function e(e,n,i,o,a){var r=t.call(this,e)||this;r._selectBehavior=n,r._itemIds=i,r._expandAllText=o,r._collapseAllText=a;var s=AutotaskDomSystem.Document.getElementById(e);return r._collapseAllTextElement=AutotaskDomSystem.Document.firstElementChild(AutotaskDomSystem.Document.firstElementChild(s)),r._collapseAllTextElement.addEventListener("click",(function(){r._collapseAllClickListener()})),r._defaultItemElement=AutotaskDomSystem.Document.getChildElementByClassName(s,"Text"),AutotaskDomSystem.Document.getChildElementByClassName(r._defaultItemElement,"PrimaryText").addEventListener("click",(function(){r._textClickListener()})),AutotaskDomSystem.Document.getChildElementByClassName(r._defaultItemElement,"SecondaryText").addEventListener("click",(function(){r._textClickListener()})),r._defaultKey="NestedChooserDefault",r._isExpanded=!1,r._selectedCssClass="Selected",r._selectedHandler=null,r._selectedItemId=null,r._selectedKey=null,r}return __extends(e,t),Object.defineProperty(e.prototype,"expandedKeys",{get:function(){for(var t=[],e=0,n=this._itemIds;e<n.length;e++)for(var i=n[e],o=0,a=autotask.find(i).expandedKeys;o<a.length;o++){var r=a[o];t.push(r)}return t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"selectedHandler",{set:function(t){this._selectedHandler=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"selectedKey",{get:function(){return this._selectedKey},enumerable:!1,configurable:!0}),e.prototype.deselect=function(){null!==this._selectedItemId&&this._selectedItemId!==this.id?autotask.find(this._selectedItemId).deselect():this._selectedItemId===this.id&&this._defaultItemElement.classList.remove(this._selectedCssClass),this._selectedItemId=null,this._selectedKey=null},e.prototype.expand=function(t){for(var e=0,n=this._itemIds;e<n.length;e++){var i=n[e];autotask.find(i).expand(t)}},e.prototype.select=function(t){if(t===this._defaultKey)this.deselect(),this._defaultItemElement.classList.add(this._selectedCssClass),this._selectedItemId=this.id,this._selectedKey=this._defaultKey,this._raiseSelectedEvent();else for(var e=0,n=this._itemIds;e<n.length;e++){var i=n[e];if(autotask.find(i).trySelectKey(t))break}},e.prototype.__initialize=function(){for(var t=this,e=0,n=this._itemIds;e<n.length;e++){var i=n[e];autotask.find(i).selectedHandler=function(e,n){return t._itemSelectedHandler(e,n)}}},e.prototype._collapseAll=function(){for(var t=0,e=this._itemIds;t<e.length;t++){var n=e[t];autotask.find(n).collapseAll()}},e.prototype._collapseAllClickListener=function(){this._isExpanded?(this._collapseAll(),this._collapseAllTextElement.textContent=this._expandAllText):(this._expandAll(),this._collapseAllTextElement.textContent=this._collapseAllText),this._isExpanded=!this._isExpanded},e.prototype._expandAll=function(){for(var t=0,e=this._itemIds;t<e.length;t++){var n=e[t];autotask.find(n).expandAll()}},e.prototype._itemSelectedHandler=function(t,e){this.deselect(),this._selectedItemId=t,this._selectedKey=e,this._raiseSelectedEvent()},e.prototype._textClickListener=function(){this._selectedItemId!==this.id&&(this.deselect(),this._defaultItemElement.classList.add(this._selectedCssClass),this._selectedItemId=this.id,this._selectedKey=this._defaultKey,null!==this._selectBehavior&&this._selectBehavior(),this._raiseSelectedEvent())},e.prototype._raiseSelectedEvent=function(){null!==this._selectedHandler&&this._selectedHandler()},e}(Autotask.LifecycleObject);t.NestedChooser=e}(AutotaskDocumentationManagerPages||(AutotaskDocumentationManagerPages={})),function(t){var e=function(t){function e(e,n,i,o){var a=t.call(this,e)||this;a._key=n,a._selectBehavior=i,a._childItemIds=o;var r=AutotaskDomSystem.Document.getElementById(e);return a._itemElement=AutotaskDomSystem.Document.firstElementChild(r),a._arrowElement=AutotaskDomSystem.Document.getChildElementByClassName(a._itemElement,"ArrowSpace"),a._arrowElement.addEventListener("click",(function(){a._arrowClickListener()})),AutotaskDomSystem.Document.getChildElementByClassName(a._itemElement,"Text").addEventListener("click",(function(){a._textClickListener()})),a._childContainerElement=AutotaskDomSystem.Document.getLastElementChild(r),a._arrowDownCssClass="ArrowDown",a._arrowUpCssClass="ArrowUp",a._collapsedCssClass="Collapsed",a._selectedCssClass="Selected",a._selectedHandler=null,a}return __extends(e,t),Object.defineProperty(e.prototype,"expandedKeys",{get:function(){var t=[];this._arrowElement.classList.contains(this._arrowUpCssClass)&&t.push(this._key);for(var e=0,n=this._childItemIds;e<n.length;e++)for(var i=n[e],o=0,a=autotask.find(i).expandedKeys;o<a.length;o++){var r=a[o];t.push(r)}return t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"selectedHandler",{set:function(t){this._selectedHandler=t;for(var e=0,n=this._childItemIds;e<n.length;e++){var i=n[e];autotask.find(i).selectedHandler=t}},enumerable:!1,configurable:!0}),e.prototype.collapseAll=function(){this._childContainerElement.classList.add(this._collapsedCssClass),this._arrowElement.classList.add(this._arrowDownCssClass),this._arrowElement.classList.remove(this._arrowUpCssClass);for(var t=0,e=this._childItemIds;t<e.length;t++){var n=e[t];autotask.find(n).collapseAll()}},e.prototype.deselect=function(){this._itemElement.classList.remove(this._selectedCssClass)},e.prototype.expand=function(t){var e=t.indexOf(this._key);e>=0&&(t.splice(e,1),this._expand());for(var n=0,i=this._childItemIds;n<i.length;n++){var o=i[n];autotask.find(o).expand(t)}},e.prototype.expandAll=function(){this._expand();for(var t=0,e=this._childItemIds;t<e.length;t++){var n=e[t];autotask.find(n).expandAll()}},e.prototype.select=function(){this._itemElement.classList.add(this._selectedCssClass),this._raiseSelectedEvent()},e.prototype.toggleCollapse=function(){this._childContainerElement.classList.toggle(this._collapsedCssClass),this._arrowElement.classList.toggle(this._arrowDownCssClass),this._arrowElement.classList.toggle(this._arrowUpCssClass)},e.prototype.trySelectKey=function(t){var e=!1;if(this._key===t)this.select(),e=!0;else for(var n=0,i=this._childItemIds;n<i.length;n++){var o=i[n];if(autotask.find(o).trySelectKey(t)){e=!0;break}}return e},e.prototype._arrowClickListener=function(){this.toggleCollapse()},e.prototype._expand=function(){this._childContainerElement.classList.remove(this._collapsedCssClass),this._arrowElement.classList.remove(this._arrowDownCssClass),this._arrowElement.classList.add(this._arrowUpCssClass)},e.prototype._isSelected=function(){return this._itemElement.classList.contains(this._selectedCssClass)},e.prototype._raiseSelectedEvent=function(){null!==this._selectedHandler&&this._selectedHandler(this.id,this._key)},e.prototype._textClickListener=function(){this._isSelected()||(null!==this._selectBehavior&&this._selectBehavior(),this.select())},e}(Autotask.LifecycleObject);t.NestedChooserItem=e}(AutotaskDocumentationManagerPages||(AutotaskDocumentationManagerPages={})),function(t){var e=function(t){function e(e,n){var i=t.call(this,e)||this;return i._navigatorElement=AutotaskDomSystem.Document.getElementById(e),i._selectBehavior=n,AutotaskDomSystem.Document.firstElementChild(i._navigatorElement).addEventListener("click",(function(){i._clickListener()})),i._selectedCssClass="Selected",i._selectedHandler=null,i}return __extends(e,t),Object.defineProperty(e.prototype,"selectedHandler",{set:function(t){this._selectedHandler=t},enumerable:!1,configurable:!0}),e.prototype.deselect=function(){this._navigatorElement.classList.remove(this._selectedCssClass)},e.prototype.select=function(){this._select()},e.prototype._clickListener=function(){this._isSelected()||this._select()},e.prototype._isSelected=function(){return this._navigatorElement.classList.contains(this._selectedCssClass)},e.prototype._raiseSelectedEvent=function(){null!==this._selectedHandler&&this._selectedHandler()},e.prototype._select=function(){this._navigatorElement.classList.add(this._selectedCssClass),null!==this._selectBehavior&&this._selectBehavior(),this._raiseSelectedEvent()},e}(Autotask.LifecycleObject);t.OverviewNavigator=e}(AutotaskDocumentationManagerPages||(AutotaskDocumentationManagerPages={})),function(t){var e=function(e){function n(t,n,i){var o=e.call(this,t)||this;return o._backingEditorId=n,o._backingAdjustingTextBoxEditor=void 0,o._changeHandlers=[],null!==i&&o.addChange(i),o}return __extends(n,e),n.prototype.get_enabled=function(){return this._backingEditor.isEnabled},n.prototype.set_enabled=function(t){this._backingEditor.isEnabled=t},n.prototype.get_isDirty=function(){return this._backingEditor.isDirty},n.prototype.get_value=function(){return this._backingEditor.value},n.prototype.set_value=function(t){this._backingEditor.value=t},Object.defineProperty(n.prototype,"_backingEditor",{get:function(){return void 0===this._backingAdjustingTextBoxEditor?autotask.throwException("_backingAdjustingTextBoxEditor is undefined."):this._backingAdjustingTextBoxEditor},enumerable:!1,configurable:!0}),n.prototype.addChange=function(t){null!==t&&this._changeHandlers.push(t)},n.prototype.focus=function(){this._backingEditor.focus()},n.prototype.validate=function(){return this._backingEditor.validate()},n.prototype.__initialize=function(){var t=this;this._backingAdjustingTextBoxEditor=autotask.find(this._backingEditorId),this._backingEditor.addChangeHandler((function(){t._change()}))},n.prototype._change=function(){this._raiseChangeEvent()},n.prototype._raiseChangeEvent=function(){if(this._changeHandlers.length>0){var e=new t.EditorChangeEventArgs;e.clientInstance=this;for(var n=0,i=this._changeHandlers;n<i.length;n++){(0,i[n])(e)}}},n}(t.LifecycleObject);t.AdjustingTextBox=e}(Autotask||(Autotask={})),function(t){var e=function(e){function n(t,n,i){var o=e.call(this,t)||this;return o._backingEditorId=n,o._backingCheckboxEditor=void 0,o._changeHandlers=[],o.addChange(i),o}return __extends(n,e),n.prototype.get_enabled=function(){return this._backingEditor.isEnabled},n.prototype.set_enabled=function(t){this._backingEditor.isEnabled=t},n.prototype.get_isDirty=function(){return this._backingEditor.isDirty},n.prototype.get_value=function(){return this._backingEditor.value},n.prototype.set_value=function(t){this._backingEditor.value=t},n.prototype.addChange=function(t){null!==t&&this._changeHandlers.push(t)},n.prototype.focus=function(){this._backingEditor.focus()},n.prototype.__initialize=function(){var t=this;this._backingCheckboxEditor=autotask.find(this._backingEditorId),this._backingEditor.addChangeHandler((function(){t._raiseChangeEvent()}))},Object.defineProperty(n.prototype,"_backingEditor",{get:function(){return void 0===this._backingCheckboxEditor?autotask.throwException("_backingCheckBoxEditor is undefined."):this._backingCheckboxEditor},enumerable:!1,configurable:!0}),n.prototype._raiseChangeEvent=function(){if(this._changeHandlers.length>0){var e=new t.EditorChangeEventArgs;e.clientInstance=this;for(var n=0,i=this._changeHandlers;n<i.length;n++){(0,i[n])(e)}}},n}(t.LifecycleObject);t.Checkbox=e}(Autotask||(Autotask={})),function(t){var e=function(e){function n(t,n,i,o){var a=e.call(this,t)||this;return a._backingEditorId=n,a._numberOfDecimalPlaces=i,a._backingCurrencyBoxEditor=void 0,a._changeHandlers=[],null!==o&&a.addChange(o),a}return __extends(n,e),n.prototype.get_enabled=function(){return this._backingEditor.isEnabled},n.prototype.set_enabled=function(t){this._backingEditor.isEnabled=t},n.prototype.get_isDirty=function(){return this._backingEditor.isDirty},n.prototype.get_value=function(){return this._backingEditor.value},n.prototype.set_value=function(t){if("string"==typeof t){var e=window.autotask.convert.stringToDecimal(t,this._numberOfDecimalPlaces);isNaN(e)||(this._backingEditor.value=e)}else this._backingEditor.value=t},Object.defineProperty(n.prototype,"_backingEditor",{get:function(){return void 0===this._backingCurrencyBoxEditor?autotask.throwException("Autotask.CurrencyBox: expected non-null backing editor."):this._backingCurrencyBoxEditor},enumerable:!1,configurable:!0}),n.prototype.addChange=function(t){null!==t&&this._changeHandlers.push(t)},n.prototype.focus=function(){this._backingEditor.focus()},n.prototype.overrideDefaultTranslationSettings=function(t){this._backingEditor.overrideDefaultTranslationSettings(t)},n.prototype.setDefaultCurrencyIndicatorSettings=function(t,e,n){this._backingEditor.setDefaultCurrencyIndicatorSettings(t,e,n)},n.prototype.__initialize=function(){var t=this;this._backingCurrencyBoxEditor=autotask.find(this._backingEditorId),this._backingEditor.addChangeHandler((function(){t._change()}))},n.prototype._change=function(){this._raiseChangeEvent()},n.prototype._raiseChangeEvent=function(){if(this._changeHandlers.length>0){var e=new t.EditorChangeEventArgs;e.clientInstance=this;for(var n=0,i=this._changeHandlers;n<i.length;n++){(0,i[n])(e)}}},n}(t.LifecycleObject);t.CurrencyBox=e}(Autotask||(Autotask={})),function(t){var e=function(e){function n(t,n,i){var o=e.call(this,t)||this;return o._backingEditorId=n,o._backingDateBoxEditor=void 0,o._changeHandlers=[],null!==i&&o.addChange(i),o._immediateChangeHandlers=[],o}return __extends(n,e),n.prototype.get_defaultDate=function(){return this._backingEditor.defaultDate},n.prototype.set_defaultDate=function(t){this._backingEditor.defaultDate=t},n.prototype.get_enabled=function(){return this._backingEditor.isEnabled},n.prototype.set_enabled=function(t){this._backingEditor.isEnabled=t},n.prototype.get_isDirty=function(){return this._backingEditor.isDirty},n.prototype.get_value=function(){return this._backingEditor.value},n.prototype.set_value=function(t){if("string"==typeof t){var e=window.autotask.convert.stringToDate(t,null);this._backingEditor.value=e}else this._backingEditor.value=t},Object.defineProperty(n.prototype,"_backingEditor",{get:function(){return void 0===this._backingDateBoxEditor?autotask.throwException("_backingDateBoxEditor is undefined."):this._backingDateBoxEditor},enumerable:!1,configurable:!0}),n.prototype.addChange=function(t){null!==t&&this._changeHandlers.push(t)},n.prototype.addImmediateChange=function(t){null!==t&&this._immediateChangeHandlers.push(t)},n.prototype.focus=function(){this._backingEditor.focus()},n.prototype.getLabelText=function(){var t=null,e=document.querySelector("label[for="+this._backingEditorId+"]");return null!==e&&(t=e.innerText),t},n.prototype.validate=function(){return this._backingEditor.validate()},n.prototype.__initialize=function(){var t=this;this._backingDateBoxEditor=autotask.find(this._backingEditorId),this._backingEditor.addChangeHandler((function(){t._change()})),this._backingEditor.addImmediateChangeHandler((function(e){t._immediateChange(e)}))},n.prototype._change=function(){this._raiseChangeEvent()},n.prototype._immediateChange=function(t){this._raiseImmediateChangeEvent(t.previousValue,t.currentValue)},n.prototype._raiseChangeEvent=function(){if(this._changeHandlers.length>0){var e=new t.EditorChangeEventArgs;e.clientInstance=this;for(var n=0,i=this._changeHandlers;n<i.length;n++){(0,i[n])(e)}}},n.prototype._raiseImmediateChangeEvent=function(e,n){if(this._immediateChangeHandlers.length>0)for(var i=new t.ImmediateChangeEventArgs(this,e,n),o=0,a=this._immediateChangeHandlers;o<a.length;o++){(0,a[o])(i)}},n}(t.LifecycleObject);t.DateBox=e}(Autotask||(Autotask={})),function(t){var e=function(e){function n(t,n,i,o){var a=e.call(this,t)||this;return a._backingEditorId=n,a._numberOfDecimalPlaces=i,a._backingDecimalBoxEditor=void 0,a._changeHandlers=[],null!==o&&a.addChange(o),a}return __extends(n,e),n.prototype.get_enabled=function(){return this._backingEditor.isEnabled},n.prototype.set_enabled=function(t){this._backingEditor.isEnabled=t},n.prototype.get_isDirty=function(){return this._backingEditor.isDirty},n.prototype.get_value=function(){return this._backingEditor.value},n.prototype.set_value=function(t){if("string"==typeof t){var e=window.autotask.convert.stringToDecimal(t,this._numberOfDecimalPlaces);isNaN(e)||(this._backingEditor.value=e)}else this._backingEditor.value=t},Object.defineProperty(n.prototype,"_backingEditor",{get:function(){return void 0===this._backingDecimalBoxEditor?autotask.throwException("_backingDecimalBoxEditor is undefined."):this._backingDecimalBoxEditor},enumerable:!1,configurable:!0}),n.prototype.addChange=function(t){null!==t&&this._changeHandlers.push(t)},n.prototype.focus=function(){this._backingEditor.focus()},n.prototype.validate=function(){return this._backingEditor.validate()},n.prototype.__initialize=function(){var t=this;this._backingDecimalBoxEditor=autotask.find(this._backingEditorId),this._backingEditor.addChangeHandler((function(){t._change()}))},n.prototype._change=function(){this._raiseChangeEvent()},n.prototype._raiseChangeEvent=function(){if(this._changeHandlers.length>0){var e=new t.EditorChangeEventArgs;e.clientInstance=this;for(var n=0,i=this._changeHandlers;n<i.length;n++){(0,i[n])(e)}}},n}(t.LifecycleObject);t.DecimalBox=e}(Autotask||(Autotask={})),function(t){var e=function(e){function n(t,n,i){var o=e.call(this,t)||this;return o._backingEditorId=n,o._backingDropDownListEditor=void 0,o._changeHandlers=[],null!==i&&o.addChange(i),o}return __extends(n,e),n.prototype.get_count=function(){return this._backingEditor.count},n.prototype.get_enabled=function(){return this._backingEditor.isEnabled},n.prototype.set_enabled=function(t){this._backingEditor.isEnabled=t},n.prototype.get_isDirty=function(){return this._backingEditor.isDirty},n.prototype.get_selectedIndex=function(){return this._backingEditor.selectedIndex},n.prototype.set_selectedIndex=function(t){this._backingEditor.selectedIndex=t},n.prototype.get_text=function(){return this._backingEditor.text},n.prototype.get_value=function(){return this._backingEditor.value},n.prototype.set_value=function(t){this._backingEditor.value=t},Object.defineProperty(n.prototype,"_backingEditor",{get:function(){return void 0===this._backingDropDownListEditor?autotask.throwException("_backingDropDownListEditor is undefined."):this._backingDropDownListEditor},enumerable:!1,configurable:!0}),n.prototype.addChange=function(t){null!==t&&this._changeHandlers.push(t)},n.prototype.addOption=function(t,e,n){this._backingEditor.addOption(t,e,n)},n.prototype.contains=function(t){return this._backingEditor.contains(t)},n.prototype.focus=function(){this._backingEditor.focus()},n.prototype.modifyText=function(t,e){this._backingEditor.modifyText(t,e)},n.prototype.populate=function(t,e,n){new PopulateDropDownListRoute(t).populate(this._backingEditor,e,n)},n.prototype.removeAllOptions=function(){this._backingEditor.removeAllOptions()},n.prototype.removeOptionByValue=function(t){this._backingEditor.removeOptionByValue(t)},n.prototype.validate=function(){return this._backingEditor.validate()},n.prototype.__initialize=function(){var t=this;this._backingDropDownListEditor=autotask.find(this._backingEditorId),this._backingEditor.addChangeHandler((function(){t._change()}))},n.prototype._change=function(){this._raiseChangeEvent()},n.prototype._raiseChangeEvent=function(){if(this._changeHandlers.length>0){var e=new t.EditorChangeEventArgs;e.clientInstance=this;for(var n=0,i=this._changeHandlers;n<i.length;n++){(0,i[n])(e)}}},n}(t.LifecycleObject);t.DropDownList=e}(Autotask||(Autotask={})),function(t){var e=function(e){function n(t,n,i){var o=e.call(this,t)||this;return o._backingEditorId=n,o._changeHandler=i,o._backingSelectorEditor=void 0,o}return __extends(n,e),n.prototype.get_enabled=function(){return this._backingEditor.isEnabled},n.prototype.set_enabled=function(t){this._backingEditor.isEnabled=t},n.prototype.get_value=function(){return this._backingEditor.value},n.prototype.set_value=function(t){var e=null;null!==t&&("number"==typeof t?e=new AutotaskItemSelectionSystem.ItemValue(t.toString(),null):"string"==typeof t?e=new AutotaskItemSelectionSystem.ItemValue(t,null):t instanceof AutotaskItemSelectionSystem.ItemValue||autotask.throwException("EditorBarSingleItemSelector.set_value() received an unexpected set_value parameter type.")),this._backingEditor.value=e},Object.defineProperty(n.prototype,"_backingEditor",{get:function(){return void 0===this._backingSelectorEditor?autotask.throwException("_backingSelectorEditor is undefined."):this._backingSelectorEditor},enumerable:!1,configurable:!0}),n.prototype.populateSingleItemSelector=function(t,e,n){var i=new PopulateSingleItemSelectorRoute(t);this._backingEditor.populate(i,e,n)},n.prototype.__initialize=function(){var t=this;this._backingSelectorEditor=autotask.find(this._backingEditorId),this._backingEditor.addChangeHandler((function(){t._change()}))},n.prototype._change=function(){this._raiseChangeEvent()},n.prototype._raiseChangeEvent=function(){if(null!==this._changeHandler){var e=new t.EditorChangeEventArgs;e.clientInstance=this,this._changeHandler(e)}},n}(t.LifecycleObject);t.EditorBarSingleItemSelector=e}(Autotask||(Autotask={})),function(t){var e=function(){function t(){this._clientInstance=null,this._id=null}return Object.defineProperty(t.prototype,"clientInstance",{get:function(){return this._clientInstance},set:function(t){this._clientInstance=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"__id",{get:function(){return this._id},set:function(t){this._id=t},enumerable:!1,configurable:!0}),t}();t.EditorChangeEventArgs=e}(Autotask||(Autotask={})),function(t){var e=function(){function t(t,e){this._clientInstance=e,this._id=t}return Object.defineProperty(t.prototype,"clientInstance",{get:function(){return this._clientInstance},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"__id",{get:function(){return this._id},enumerable:!1,configurable:!0}),t}();t.EditorDoubleClickEventArgs=e}(Autotask||(Autotask={})),function(t){var e=function(e){function n(t,n,i){var o=e.call(this,t)||this;return o._backingEditorId=n,o._backingEmailAreaEditor=void 0,o._changeHandlers=[],o._immediateChangeHandlers=[],null!==i&&o.addChange(i),o}return __extends(n,e),n.prototype.get_enabled=function(){return this._backingEditor.isEnabled},n.prototype.set_enabled=function(t){this._backingEditor.isEnabled=t},n.prototype.get_isDirty=function(){return this._backingEditor.isDirty},n.prototype.get_value=function(){return this._backingEditor.value},Object.defineProperty(n.prototype,"_backingEditor",{get:function(){return void 0===this._backingEmailAreaEditor?autotask.throwException("_backingEmailAreaEditor is undefined."):this._backingEmailAreaEditor},enumerable:!1,configurable:!0}),n.prototype.add=function(t){return this._backingEditor.add(t)},n.prototype.addChange=function(t){null!==t&&this._changeHandlers.push(t)},n.prototype.addImmediateChange=function(t){null!==t&&this._immediateChangeHandlers.push(t)},n.prototype.clear=function(){this._backingEditor.clear()},n.prototype.focus=function(){this._backingEditor.focus()},n.prototype.validate=function(){return this._backingEditor.validate()},n.prototype.__initialize=function(){var t=this;this._backingEmailAreaEditor=autotask.find(this._backingEditorId),this._backingEditor.addChangeHandler((function(){t._change()})),this._backingEditor.addImmediateChangeHandler((function(e){t._immediateChange(e)}))},n.prototype._change=function(){this._raiseChangeEvent()},n.prototype._immediateChange=function(t){this._raiseImmediateChangeEvent(t.previousValue,t.currentValue)},n.prototype._raiseChangeEvent=function(){if(this._changeHandlers.length>0){var e=new t.EditorChangeEventArgs;e.clientInstance=this;for(var n=0,i=this._changeHandlers;n<i.length;n++){(0,i[n])(e)}}},n.prototype._raiseImmediateChangeEvent=function(e,n){if(this._immediateChangeHandlers.length>0)for(var i=new t.ImmediateChangeEventArgs(this,e,n),o=0,a=this._immediateChangeHandlers;o<a.length;o++){(0,a[o])(i)}},n}(t.LifecycleObject);t.EmailArea=e}(Autotask||(Autotask={})),function(t){var e=function(e){function n(t,n,i){var o=e.call(this,t)||this;return o._backingEditorId=n,o._backingEmailBoxEditor=void 0,o._changeHandlers=[],o._immediateChangeHandlers=[],null!==i&&o.addChange(i),o}return __extends(n,e),n.prototype.get_enabled=function(){return this._backingEditor.isEnabled},n.prototype.set_enabled=function(t){this._backingEditor.isEnabled=t},n.prototype.get_isDirty=function(){return this._backingEditor.isDirty},n.prototype.get_value=function(){return this._backingEditor.value},n.prototype.set_value=function(t){this._backingEditor.value=t},Object.defineProperty(n.prototype,"_backingEditor",{get:function(){return void 0===this._backingEmailBoxEditor?autotask.throwException("_backingEmailBoxEditor is undefined."):this._backingEmailBoxEditor},enumerable:!1,configurable:!0}),n.prototype.addChange=function(t){null!==t&&this._changeHandlers.push(t)},n.prototype.addImmediateChange=function(t){null!==t&&this._immediateChangeHandlers.push(t)},n.prototype.focus=function(){this._backingEditor.focus()},n.prototype.validate=function(){return this._backingEditor.validate()},n.prototype.__initialize=function(){var t=this;this._backingEmailBoxEditor=autotask.find(this._backingEditorId),this._backingEditor.addChangeHandler((function(){t._change()})),this._backingEditor.addImmediateChangeHandler((function(e){t._immediateChange(e)}))},n.prototype._change=function(){this._raiseChangeEvent()},n.prototype._immediateChange=function(t){this._raiseImmediateChangeEvent(t.previousValue,t.currentValue)},n.prototype._raiseChangeEvent=function(){if(this._changeHandlers.length>0){var e=new t.EditorChangeEventArgs;e.clientInstance=this;for(var n=0,i=this._changeHandlers;n<i.length;n++){(0,i[n])(e)}}},n.prototype._raiseImmediateChangeEvent=function(e,n){if(this._immediateChangeHandlers.length>0)for(var i=new t.ImmediateChangeEventArgs(this,e,n),o=0,a=this._immediateChangeHandlers;o<a.length;o++){(0,a[o])(i)}},n}(t.LifecycleObject);t.EmailBox=e}(Autotask||(Autotask={})),function(t){var e=function(e){function n(t,n,i,o){var a=e.call(this,t)||this;return a._backingEditorId=n,a._backingExternalFileBoxEditor=void 0,a._changeHandlers=[],a._labelContainerIds=o,a._labelContainers=[],a._immediateChangeHandlers=[],null!==i&&a.addChange(i),a}return __extends(n,e),n.prototype.get_enabled=function(){return this._backingEditor.isEnabled},n.prototype.set_enabled=function(t){this._backingEditor.isEnabled=t},n.prototype.get_externalFileType=function(){return this._backingEditor.externalFileType},n.prototype.get_isDirty=function(){return this._backingEditor.isDirty},n.prototype.get_value=function(){return this._backingEditor.value},Object.defineProperty(n.prototype,"_backingEditor",{get:function(){return void 0===this._backingExternalFileBoxEditor?autotask.throwException("_backingExternalFileBoxEditor is undefined."):this._backingExternalFileBoxEditor},enumerable:!1,configurable:!0}),n.prototype.addChange=function(t){null!==t&&this._changeHandlers.push(t)},n.prototype.addImmediateChange=function(t){null!==t&&this._immediateChangeHandlers.push(t)},n.prototype.clear=function(){this._backingEditor.clear()},n.prototype.focus=function(){this._backingEditor.focus()},n.prototype.setExternalFileType=function(t){this._backingEditor.externalFileType=t,this._updateLabelVisibility(t)},n.prototype.uploadFile=function(t){this._backingEditor.uploadFile(t)},n.prototype.validate=function(){return this._backingEditor.validate()},n.prototype.__initialize=function(){var t=this;this._backingExternalFileBoxEditor=autotask.find(this._backingEditorId),this._backingEditor.addChangeHandler((function(){t._change()})),this._backingEditor.addImmediateChangeHandler((function(e){t._immediateChange(e)}));for(var e=0,n=this._labelContainerIds;e<n.length;e++){var i=n[e],o=autotask.find(i);this._labelContainers.push(o)}},n.prototype._change=function(){this._raiseChangeEvent()},n.prototype._immediateChange=function(t){this._raiseImmediateChangeEvent(t.previousValue,t.currentValue)},n.prototype._raiseChangeEvent=function(){if(this._changeHandlers.length>0){var e=new t.EditorChangeEventArgs;e.clientInstance=this;for(var n=0,i=this._changeHandlers;n<i.length;n++){(0,i[n])(e)}}},n.prototype._raiseImmediateChangeEvent=function(e,n){if(this._immediateChangeHandlers.length>0)for(var i=new t.ImmediateChangeEventArgs(this,e,n),o=0,a=this._immediateChangeHandlers;o<a.length;o++){(0,a[o])(i)}},n.prototype._updateLabelVisibility=function(t){for(var e=0,n=this._labelContainers;e<n.length;e++){n[e].updateVisibility(t)}},n}(t.LifecycleObject);t.ExternalFileBox=e}(Autotask||(Autotask={})),function(t){var e=function(e){function n(t,n,i,o,a){var r=e.call(this,t)||this;return r._backingEditorId=n,r._tokenValue=o,r._applyRoute=a,r._backingItemSelectorEditor=void 0,r._changeHandlers=[],null!==i&&r._changeHandlers.push(i),r}return __extends(n,e),Object.defineProperty(n.prototype,"_backingEditor",{get:function(){return void 0===this._backingItemSelectorEditor?autotask.throwException("_backingItemSelectorEditor is undefined."):this._backingItemSelectorEditor},enumerable:!1,configurable:!0}),n.prototype.get_value=function(){var t=null,e=this._backingEditor.value;return null!==e&&(t=e.get_primaryValue()),t},n.prototype.set_value=function(t){this._backingEditor.value=null!==t?new AutotaskItemSelectionSystem.ItemValue(t,null):null},n.prototype.addChange=function(t){null!==t&&this._changeHandlers.push(t)},n.prototype.applySelectedFormTemplate=function(t,e,n){var i=this._backingEditor.value;if(null!==i){var o=i.get_primaryValue();autotask.formTemplateManagement.apply(o,this._tokenValue,this._applyRoute,t,e,n)}},n.prototype.__dispose=function(){autotask.formTemplateManagement.removeGroup(this._tokenValue),this._backingEditor.__dispose()},n.prototype.__initialize=function(){var t=this;autotask.formTemplateManagement.addGroup(this._tokenValue,this.id),this._backingItemSelectorEditor=autotask.find(this._backingEditorId),this._backingEditor.addChangeHandler((function(){t._changeHandler()}))},n.prototype.__openDialog=function(t){new FormTemplateDialogRoute(t).formTemplateDialog()},n.prototype.__setSelectionFromDialog=function(t){this._backingEditor.value=new AutotaskItemSelectionSystem.ItemValue(t,null),this._raiseChangeEvent()},n.prototype._changeHandler=function(){this._raiseChangeEvent()},n.prototype._raiseChangeEvent=function(){if(this._changeHandlers.length>0){var e=new t.EditorChangeEventArgs;e.clientInstance=this;for(var n=0,i=this._changeHandlers;n<i.length;n++){(0,i[n])(e)}}},n}(t.LifecycleObject);t.FormTemplateSelector=e}(Autotask||(Autotask={})),function(t){var e=function(e){function n(t,n,i){var o=e.call(this,t)||this;return o._backingEditorId=n,o._backingHexColorBoxEditor=void 0,o._changeHandlers=[],o._immediateChangeHandlers=[],null!==i&&o.addChange(i),o}return __extends(n,e),n.prototype.get_enabled=function(){return this._backingEditor.isEnabled},n.prototype.set_enabled=function(t){this._backingEditor.isEnabled=t},n.prototype.get_isDirty=function(){return this._backingEditor.isDirty},n.prototype.get_value=function(){return this._backingEditor.value},n.prototype.set_value=function(t){this._backingEditor.value=t},Object.defineProperty(n.prototype,"_backingEditor",{get:function(){return void 0===this._backingHexColorBoxEditor?autotask.throwException("_backingHexColorBoxEditor is undefined."):this._backingHexColorBoxEditor},enumerable:!1,configurable:!0}),n.prototype.addChange=function(t){null!==t&&this._changeHandlers.push(t)},n.prototype.addImmediateChange=function(t){null!==t&&this._immediateChangeHandlers.push(t)},n.prototype.focus=function(){this._backingEditor.focus()},n.prototype.validate=function(){return this._backingEditor.validate()},n.prototype.__initialize=function(){var t=this;this._backingHexColorBoxEditor=autotask.find(this._backingEditorId),this._backingEditor.addChangeHandler((function(){t._change()})),this._backingEditor.addImmediateChangeHandler((function(e){t._immediateChange(e)}))},n.prototype._change=function(){this._raiseChangeEvent()},n.prototype._immediateChange=function(t){this._raiseImmediateChangeEvent(t.previousValue,t.currentValue)},n.prototype._raiseChangeEvent=function(){if(this._changeHandlers.length>0){var e=new t.EditorChangeEventArgs;e.clientInstance=this;for(var n=0,i=this._changeHandlers;n<i.length;n++){(0,i[n])(e)}}},n.prototype._raiseImmediateChangeEvent=function(e,n){if(this._immediateChangeHandlers.length>0)for(var i=new t.ImmediateChangeEventArgs(this,e,n),o=0,a=this._immediateChangeHandlers;o<a.length;o++){(0,a[o])(i)}},n}(t.LifecycleObject);t.HexColorBox=e}(Autotask||(Autotask={})),function(t){var e=function(e){function n(t,n,i){var o=e.call(this,t)||this;return o._backingEditorId=n,o._backingImageRadioButtonGroupEditor=void 0,o._changeHandlers=[],null!==i&&o.addChange(i),o}return __extends(n,e),n.prototype.get_enabled=function(){return this._backingEditor.isEnabled},n.prototype.set_enabled=function(t){this._backingEditor.isEnabled=t},n.prototype.get_isDirty=function(){return this._backingEditor.isDirty},n.prototype.get_value=function(){return this._backingEditor.value},Object.defineProperty(n.prototype,"_backingEditor",{get:function(){return void 0===this._backingImageRadioButtonGroupEditor?autotask.throwException("_backingImageRadioButtonGroupEditor is undefined."):this._backingImageRadioButtonGroupEditor},enumerable:!1,configurable:!0}),n.prototype.addChange=function(t){null!==t&&this._changeHandlers.push(t)},n.prototype.__initialize=function(){var t=this;this._backingImageRadioButtonGroupEditor=autotask.find(this._backingEditorId),this._backingEditor.addChangeHandler((function(){t._change()}))},n.prototype._change=function(){this._raiseChangeEvent()},n.prototype._raiseChangeEvent=function(){if(this._changeHandlers.length>0){var e=new t.EditorChangeEventArgs;e.clientInstance=this;for(var n=0,i=this._changeHandlers;n<i.length;n++){(0,i[n])(e)}}},n}(t.LifecycleObject);t.ImageRadioButtonGroup=e}(Autotask||(Autotask={})),function(t){var e=function(){function t(t,e,n){this._clientInstance=t,this._previousValue=e,this._currentValue=n}return t.prototype.get_clientInstance=function(){return this._clientInstance},t.prototype.get_currentValue=function(){return this._currentValue},t.prototype.get_previousValue=function(){return this._previousValue},t}();t.ImmediateChangeEventArgs=e}(Autotask||(Autotask={})),function(t){var e=function(e){function n(t,n,i){var o=e.call(this,t)||this;return o._backingEditorId=n,o._backingIntegerBoxEditor=void 0,o._changeHandlers=[],null!==i&&o.addChange(i),o}return __extends(n,e),n.prototype.get_enabled=function(){return this._backingEditor.isEnabled},n.prototype.set_enabled=function(t){this._backingEditor.isEnabled=t},n.prototype.get_isDirty=function(){return this._backingEditor.isDirty},n.prototype.get_value=function(){return this._backingEditor.value},n.prototype.set_value=function(t){if("string"==typeof t){var e=window.autotask.convert.stringToInteger(t);isNaN(e)||(this._backingEditor.value=e)}else this._backingEditor.value=t},Object.defineProperty(n.prototype,"_backingEditor",{get:function(){return void 0===this._backingIntegerBoxEditor?autotask.throwException(""):this._backingIntegerBoxEditor},enumerable:!1,configurable:!0}),n.prototype.addChange=function(t){null!==t&&this._changeHandlers.push(t)},n.prototype.focus=function(){this._backingEditor.focus()},n.prototype.validate=function(){return this._backingEditor.validate()},n.prototype.__initialize=function(){var t=this;this._backingIntegerBoxEditor=autotask.find(this._backingEditorId),this._backingEditor.addChangeHandler((function(){t._change()}))},n.prototype._change=function(){this._raiseChangeEvent()},n.prototype._raiseChangeEvent=function(){if(this._changeHandlers.length>0){var e=new t.EditorChangeEventArgs;e.clientInstance=this;for(var n=0,i=this._changeHandlers;n<i.length;n++){(0,i[n])(e)}}},n}(t.LifecycleObject);t.IntegerBox=e}(Autotask||(Autotask={})),function(t){var e=function(t){function e(e,n){var i=t.call(this,e)||this;return i._backingEditorId=n,i._backingSelectorEditor=void 0,i}return __extends(e,t),Object.defineProperty(e.prototype,"isDirty",{get:function(){return this._backingEditor.isDirty},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isEnabled",{get:function(){return this._backingEditor.isEnabled},set:function(t){this._backingEditor.isEnabled=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isGroupSortingEnabled",{get:function(){return this._backingEditor.isGroupSortingEnabled},set:function(t){this._backingEditor.isGroupSortingEnabled=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"searchText",{get:function(){return this._backingEditor.searchText},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"selectionCount",{get:function(){return this._backingEditor.selectionCount},enumerable:!1,configurable:!0}),e.prototype.showSuggestedTagsDialog=function(){this._backingEditor.showSuggestedTagsDialog()},Object.defineProperty(e.prototype,"value",{get:function(){return this._backingEditor.value},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_backingEditor",{get:function(){return void 0===this._backingSelectorEditor?autotask.throwException("_backingSelectorEditor is undefined."):this._backingSelectorEditor},enumerable:!1,configurable:!0}),e.prototype.addApplyAutoCompleteFilters=function(t){this._backingEditor.addApplyAutoCompleteFilters(t)},e.prototype.addApplySelectionDialogFilters=function(t){this._backingEditor.addApplySelectionDialogFilters(t)},e.prototype.addDialogSelectionSavedHandler=function(t){this._backingEditor.addDialogSelectionSavedHandler(t)},e.prototype.addDirtyStateChangeHandler=function(t){this._backingEditor.addDirtyStateChangeHandler(t)},e.prototype.addNewTagRequestHandler=function(t){this._backingEditor.addNewTagRequestHandler(t)},e.prototype.addTagAddedHandler=function(t){this._backingEditor.addTagAddedHandler(t)},e.prototype.addTagClickedHandler=function(t){this._backingEditor.addTagClickedHandler(t)},e.prototype.addTagRemovedHandler=function(t){this._backingEditor.addTagRemovedHandler(t)},e.prototype.focus=function(){this._backingEditor.focus()},e.prototype.insertNewTag=function(t){this._backingEditor.insertNewTag(t)},e.prototype.__initialize=function(){this._backingSelectorEditor=autotask.find(this._backingEditorId)},e}(t.LifecycleObject);t.LargeMultipleTagSelector=e}(Autotask||(Autotask={})),function(t){var e=function(e){function n(t,n,i){var o=e.call(this,t)||this;return o._backingEditorId=n,o._backingListBoxEditor=void 0,o._changeHandlers=[],o._immediateChangeHandlers=[],o._doubleClickHandlers=[],null!==i&&o.addChange(i),o}return __extends(n,e),n.prototype.get_availableValues=function(){return this._backingEditor.availableValues},n.prototype.get_enabled=function(){return this._backingEditor.isEnabled},n.prototype.set_enabled=function(t){this._backingEditor.isEnabled=t},n.prototype.get_isDirty=function(){return this._backingEditor.isDirty},n.prototype.get_value=function(){return this._backingEditor.value},n.prototype.get_values=function(){return this._backingEditor.value},Object.defineProperty(n.prototype,"_backingEditor",{get:function(){return void 0===this._backingListBoxEditor?autotask.throwException("_backingListBoxEditor is undefined."):this._backingListBoxEditor},enumerable:!1,configurable:!0}),n.prototype.addOption=function(t,e,n){this._backingEditor.addOption(t,e,void 0!==n&&n)},n.prototype.addChange=function(t){null!==t&&this._changeHandlers.push(t)},n.prototype.addDoubleClick=function(t){null!==t&&this._doubleClickHandlers.push(t)},n.prototype.addImmediateChange=function(t){null!==t&&this._immediateChangeHandlers.push(t)},n.prototype.clear=function(){this._backingEditor.clearValue()},n.prototype.contains=function(t){return this._backingEditor.contains(t)},n.prototype.focus=function(){this._backingEditor.focus()},n.prototype.modifyText=function(t,e){this._backingEditor.modifyText(t,e)},n.prototype.populate=function(t,e,n,i){new PopulateListBoxRoute(t,void 0!==i&&i).populate(this._backingEditor,e,n)},n.prototype.removeAllOptions=function(){this._backingEditor.removeAllOptions()},n.prototype.removeOptionByValue=function(t){this._backingEditor.removeOption(t)},n.prototype.select=function(t){this._backingEditor.selectOption(t)},n.prototype.selectMany=function(t){this._backingEditor.selectOptions(t)},n.prototype.validate=function(){return this._backingEditor.validate()},n.prototype.__initialize=function(){var t=this;this._backingListBoxEditor=autotask.find(this._backingEditorId),this._backingEditor.addChangeHandler((function(){t._changeHandler()})),this._backingEditor.addDoubleClickHandler((function(){t._doubleClickHandler()})),this._backingEditor.addImmediateChangeHandler((function(e){t._immediateChangeHandler(e)}))},n.prototype._changeHandler=function(){this._raiseChangeEvent()},n.prototype._doubleClickHandler=function(){this._raiseDoubleClickEvent()},n.prototype._immediateChangeHandler=function(t){this._raiseImmediateChangeEvent(t.previousValue,t.currentValue)},n.prototype._raiseChangeEvent=function(){if(this._changeHandlers.length>0){var e=new t.EditorChangeEventArgs;e.clientInstance=this;for(var n=0,i=this._changeHandlers;n<i.length;n++){(0,i[n])(e)}}},n.prototype._raiseDoubleClickEvent=function(){if(this._doubleClickHandlers.length>0)for(var e=new t.EditorDoubleClickEventArgs(this.id,this),n=0,i=this._doubleClickHandlers;n<i.length;n++){(0,i[n])(e)}},n.prototype._raiseImmediateChangeEvent=function(e,n){if(this._immediateChangeHandlers.length>0)for(var i=new t.ImmediateChangeEventArgs(this,e,n),o=0,a=this._immediateChangeHandlers;o<a.length;o++){(0,a[o])(i)}},n}(t.LifecycleObject);t.ListBox=e}(Autotask||(Autotask={})),function(t){var e=function(e){function n(t,n,i){var o=e.call(this,t)||this;return o._backingEditorId=n,o._backingListMoverEditor=void 0,o._changeHandlers=[],o._immediateChangeHandlers=[],o._doubleClickHandlers=[],null!==i&&o.addChange(i),o}return __extends(n,e),n.prototype.get_enabled=function(){return this._backingEditor.isEnabled},n.prototype.set_enabled=function(t){this._backingEditor.isEnabled=t},n.prototype.get_isDirty=function(){return this._backingEditor.isDirty},n.prototype.get_textAndValues=function(){return this._backingEditor.textAndValues},n.prototype.get_value=function(){return this._backingEditor.value},n.prototype.get_values=function(){return this._backingEditor.value},Object.defineProperty(n.prototype,"_backingEditor",{get:function(){return void 0===this._backingListMoverEditor?autotask.throwException("_backingListMoverEditor is undefined."):this._backingListMoverEditor},enumerable:!1,configurable:!0}),n.prototype.addOption=function(t,e){this._backingEditor.addOption(t,e)},n.prototype.addChange=function(t){null!==t&&this._changeHandlers.push(t)},n.prototype.addDoubleClick=function(t){null!==t&&this._doubleClickHandlers.push(t)},n.prototype.addImmediateChange=function(t){null!==t&&this._immediateChangeHandlers.push(t)},n.prototype.contains=function(t){return this._backingEditor.contains(t)},n.prototype.focus=function(){this._backingEditor.focus()},n.prototype.lock=function(t){this._backingEditor.lockOption(t)},n.prototype.unlock=function(t){this._backingEditor.unlockOption(t)},n.prototype.validate=function(){return this._backingEditor.validate()},n.prototype.__initialize=function(){var t=this;this._backingListMoverEditor=autotask.find(this._backingEditorId),this._backingEditor.addChangeHandler((function(){t._changeHandler()})),this._backingEditor.addImmediateChangeHandler((function(e){t._immediateChangeHandler(e)}))},n.prototype._changeHandler=function(){this._raiseChangeEvent()},n.prototype._immediateChangeHandler=function(t){this._raiseImmediateChangeEvent(t.previousValue,t.currentValue)},n.prototype._raiseChangeEvent=function(){if(this._changeHandlers.length>0){var e=new t.EditorChangeEventArgs;e.clientInstance=this;for(var n=0,i=this._changeHandlers;n<i.length;n++){(0,i[n])(e)}}},n.prototype._raiseImmediateChangeEvent=function(e,n){if(this._immediateChangeHandlers.length>0)for(var i=new t.ImmediateChangeEventArgs(this,e,n),o=0,a=this._immediateChangeHandlers;o<a.length;o++){(0,a[o])(i)}},n}(t.LifecycleObject);t.ListMover=e}(Autotask||(Autotask={})),function(t){var e=function(e){function n(t,n,i){var o=e.call(this,t)||this;return o._backingEditorId=n,o._backingMinutesBoxEditor=void 0,o._changeHandlers=[],null!==i&&o.addChange(i),o._immediateChangeHandlers=[],o}return __extends(n,e),n.prototype.get_enabled=function(){return this._backingEditor.isEnabled},n.prototype.set_enabled=function(t){this._backingEditor.isEnabled=t},n.prototype.get_isDirty=function(){return this._backingEditor.isDirty},n.prototype.get_value=function(){return this._backingEditor.value},n.prototype.set_value=function(t){this._backingEditor.value=t},Object.defineProperty(n.prototype,"_backingEditor",{get:function(){return void 0===this._backingMinutesBoxEditor?autotask.throwException("_backingMinutesBoxEditor is undefined."):this._backingMinutesBoxEditor},enumerable:!1,configurable:!0}),n.prototype.addChange=function(t){null!==t&&this._changeHandlers.push(t)},n.prototype.addImmediateChange=function(t){null!==t&&this._immediateChangeHandlers.push(t)},n.prototype.focus=function(){this._backingEditor.focus()},n.prototype.validate=function(){return this._backingEditor.validate()},n.prototype.__initialize=function(){var t=this;this._backingMinutesBoxEditor=autotask.find(this._backingEditorId),this._backingEditor.addChangeHandler((function(){t._change()})),this._backingEditor.addImmediateChangeHandler((function(e){t._immediateChange(e)}))},n.prototype._change=function(){this._raiseChangeEvent()},n.prototype._immediateChange=function(t){this._raiseImmediateChangeEvent(t.previousValue,t.currentValue)},n.prototype._raiseChangeEvent=function(){if(this._changeHandlers.length>0){var e=new t.EditorChangeEventArgs;e.clientInstance=this;for(var n=0,i=this._changeHandlers;n<i.length;n++){(0,i[n])(e)}}},n.prototype._raiseImmediateChangeEvent=function(e,n){if(this._immediateChangeHandlers.length>0)for(var i=new t.ImmediateChangeEventArgs(this,e,n),o=0,a=this._immediateChangeHandlers;o<a.length;o++){(0,a[o])(i)}},n}(t.LifecycleObject);t.MinutesBox=e}(Autotask||(Autotask={})),function(t){var e=function(e){function n(t,n,i,o,a){var r=e.call(this,t)||this;return r._backingCoordinatorId=n,r._chipListContextOverlayRoute=i,r._maximumSelectionCount=o,r._maximumSelectionCountExceededMessage=a,r._applyFiltersHandlers=[],r}return __extends(n,e),n.prototype.addApplyFiltersHandler=function(t){this._applyFiltersHandlers.push(t)},n.prototype.showDialog=function(e){var n=new AutotaskDataSelector.ApplyFiltersEventArgs;this._applyFiltersHandler(n);autotask.find(this._backingCoordinatorId).showDialog(n.data,(function(n){for(var i=[],o=0,a=n.chipInformation;o<a.length;o++){var r=a[o];i.push(r.value)}var s=new t.MultipleDataSelectionEventArgs(i);e(s)}),this._chipListContextOverlayRoute,this._maximumSelectionCount,this._maximumSelectionCountExceededMessage)},n.prototype._applyFiltersHandler=function(t){for(var e=0,n=this._applyFiltersHandlers;e<n.length;e++){(0,n[e])(t)}},n}(t.LifecycleObject);t.MultipleDataSelectionDialogCoordinator=e}(Autotask||(Autotask={})),function(t){var e=function(){function t(t){this._selectionValues=t}return Object.defineProperty(t.prototype,"selectionValues",{get:function(){return this._selectionValues},enumerable:!1,configurable:!0}),t}();t.MultipleDataSelectionEventArgs=e}(Autotask||(Autotask={})),function(t){var e=function(e){function n(t,n,i,o){var a=e.call(this,t)||this;return a._backingEditorId=n,a._backingSelectorEditor=void 0,a._changeHandlers=[],a._immediateChangeHandlers=[],null!==i&&a.addChange(i),null!==o&&a.addImmediateChange(o),a}return __extends(n,e),n.prototype.get_isDirty=function(){return this._backingEditor.isDirty},n.prototype.get_enabled=function(){return this._backingEditor.isEnabled},n.prototype.set_enabled=function(t){this._backingEditor.isEnabled=t},n.prototype.get_isLocked=function(){return this._backingEditor.isLocked},n.prototype.get_value=function(){return this._backingEditor.value},Object.defineProperty(n.prototype,"_backingEditor",{get:function(){return void 0===this._backingSelectorEditor?autotask.throwException("_backingSelectorEditor is undefined."):this._backingSelectorEditor},enumerable:!1,configurable:!0}),n.prototype.addChange=function(t){null!==t&&this._changeHandlers.push(t)},n.prototype.addImmediateChange=function(t){null!==t&&this._immediateChangeHandlers.push(t)},n.prototype.addApplyFilters=function(t){this._backingEditor.addApplyFiltersHandler(t)},n.prototype.addDirtyStateChangeHandler=function(t){this._backingEditor.addDirtyStateChangeHandler(t)},n.prototype.applySelection=function(t){this._backingEditor.add(t.__chipInformation)},n.prototype.clearSelection=function(){this._backingEditor.clearSelection()},n.prototype.contains=function(t){return this._backingEditor.contains(t)},n.prototype.copySelection=function(e){var n=this._backingEditor.getSelection(e);return null!==n?new t.SingleDataSelection(n):null},n.prototype.focus=function(){this._backingEditor.focus()},n.prototype.getSelectionTextByValue=function(t){return this._backingEditor.getSelectionTextByValue(t)},n.prototype.populateMultipleDataSelector=function(t,e,n,i){var o=new PopulateMultipleDataSelectorRoute(t,void 0!==i&&i);this._backingEditor.populate(o,e,n)},n.prototype.removeSelectionByValue=function(t){this._backingEditor.removeSelectionByValue(t)},n.prototype.showDialog=function(){this._backingEditor.showDialog()},n.prototype.__initialize=function(){var t=this;this._backingSelectorEditor=autotask.find(this._backingEditorId),this._backingEditor.addChangeHandler((function(){t._change()})),this._backingEditor.addImmediateChangeHandler((function(e){t._immediateChange(e)}))},n.prototype._change=function(){this._raiseChangeEvent()},n.prototype._immediateChange=function(t){this._raiseImmediateChangeEvent(t.previousValue,t.currentValue)},n.prototype._raiseChangeEvent=function(){if(this._changeHandlers.length>0){var e=new t.EditorChangeEventArgs;e.clientInstance=this;for(var n=0,i=this._changeHandlers;n<i.length;n++){(0,i[n])(e)}}},n.prototype._raiseImmediateChangeEvent=function(e,n){if(this._immediateChangeHandlers.length>0)for(var i=new t.ImmediateChangeEventArgs(this,e,n),o=0,a=this._immediateChangeHandlers;o<a.length;o++){(0,a[o])(i)}},n}(t.LifecycleObject);t.MultipleDataSelector=e}(Autotask||(Autotask={})),function(t){var e=function(e){function n(t,n,i,o){var a=e.call(this,t)||this;return a._backingEditorId=n,a._backingSelectorEditor=void 0,a._changeHandlers=[],a._immediateChangeHandlers=[],null!==i&&a.addChange(i),null!==o&&a.addImmediateChange(o),a}return __extends(n,e),n.prototype.get_isDirty=function(){return this._backingEditor.isDirty},n.prototype.get_enabled=function(){return this._backingEditor.isEnabled},n.prototype.set_enabled=function(t){this._backingEditor.isEnabled=t},n.prototype.get_isLocked=function(){return this._backingEditor.isLocked},n.prototype.get_value=function(){return this._backingEditor.value},Object.defineProperty(n.prototype,"_backingEditor",{get:function(){return void 0===this._backingSelectorEditor?autotask.throwException("_backingSelectorEditor is undefined."):this._backingSelectorEditor},enumerable:!1,configurable:!0}),n.prototype.addChange=function(t){null!==t&&this._changeHandlers.push(t)},n.prototype.addImmediateChange=function(t){null!==t&&this._immediateChangeHandlers.push(t)},n.prototype.addDirtyStateChangeHandler=function(t){this._backingEditor.addDirtyStateChangeHandler(t)},n.prototype.clearSelection=function(){this._backingEditor.clearSelection()},n.prototype.contains=function(t){return this._backingEditor.contains(t)},n.prototype.focus=function(){this._backingEditor.focus()},n.prototype.populateMultipleItemSelector=function(t,e,n){var i=new PopulateMultipleItemSelectorRoute(t);this._backingEditor.populate(i,e,n)},n.prototype.removeSelectionByValue=function(t){this._backingEditor.removeSelectionByValue(t)},n.prototype.__initialize=function(){var t=this;this._backingSelectorEditor=autotask.find(this._backingEditorId),this._backingEditor.addChangeHandler((function(){t._change()})),this._backingEditor.addImmediateChangeHandler((function(e){t._immediateChange(e)}))},n.prototype._change=function(){this._raiseChangeEvent()},n.prototype._immediateChange=function(t){this._raiseImmediateChangeEvent(t.previousValue,t.currentValue)},n.prototype._raiseChangeEvent=function(){if(this._changeHandlers.length>0){var e=new t.EditorChangeEventArgs;e.clientInstance=this;for(var n=0,i=this._changeHandlers;n<i.length;n++){(0,i[n])(e)}}},n.prototype._raiseImmediateChangeEvent=function(e,n){if(this._immediateChangeHandlers.length>0)for(var i=new t.ImmediateChangeEventArgs(this,e,n),o=0,a=this._immediateChangeHandlers;o<a.length;o++){(0,a[o])(i)}},n}(t.LifecycleObject);t.MultipleItemSelector=e}(Autotask||(Autotask={})),function(t){var e=function(e){function n(t,n,i){var o=e.call(this,t)||this;return o._backingEditorId=n,o._backingPasswordBoxEditor=void 0,o._changeHandlers=[],null!==i&&o.addChange(i),o}return __extends(n,e),n.prototype.get_enabled=function(){return this._backingEditor.isEnabled},n.prototype.set_enabled=function(t){this._backingEditor.isEnabled=t},n.prototype.get_isDirty=function(){return this._backingEditor.isDirty},n.prototype.get_value=function(){return this._backingEditor.value},n.prototype.set_value=function(t){this._backingEditor.value=t},Object.defineProperty(n.prototype,"_backingEditor",{get:function(){return void 0===this._backingPasswordBoxEditor?autotask.throwException("_backingPasswordBoxEditor is undefined."):this._backingPasswordBoxEditor},enumerable:!1,configurable:!0}),n.prototype.addChange=function(t){null!==t&&this._changeHandlers.push(t)},n.prototype.focus=function(){this._backingEditor.focus()},n.prototype.validate=function(){return this._backingEditor.validate()},n.prototype.__initialize=function(){var t=this;this._backingPasswordBoxEditor=autotask.find(this._backingEditorId),this._backingEditor.addChangeHandler((function(){t._change()}))},n.prototype._change=function(){this._raiseChangeEvent()},n.prototype._raiseChangeEvent=function(){if(this._changeHandlers.length>0){var e=new t.EditorChangeEventArgs;e.clientInstance=this;for(var n=0,i=this._changeHandlers;n<i.length;n++){(0,i[n])(e)}}},n}(t.LifecycleObject);t.PasswordBox=e}(Autotask||(Autotask={})),function(t){var e=function(e){function n(t,n,i,o){var a=e.call(this,t)||this;return a._backingEditorId=n,a._numberOfDecimalPlaces=i,a._backingPercentageBoxEditor=void 0,a._changeHandlers=[],null!==o&&a.addChange(o),a}return __extends(n,e),n.prototype.get_enabled=function(){return this._backingEditor.isEnabled},n.prototype.set_enabled=function(t){this._backingEditor.isEnabled=t},n.prototype.get_isDirty=function(){return this._backingEditor.isDirty},n.prototype.get_value=function(){return this._backingEditor.value},n.prototype.set_value=function(t){if("string"==typeof t){var e=this._numberOfDecimalPlaces+2,n=window.autotask.convert.stringToDecimal(t,e);isNaN(n)||(this._backingEditor.value=n)}else this._backingEditor.value=t},Object.defineProperty(n.prototype,"_backingEditor",{get:function(){return void 0===this._backingPercentageBoxEditor?autotask.throwException(""):this._backingPercentageBoxEditor},enumerable:!1,configurable:!0}),n.prototype.addChange=function(t){null!==t&&this._changeHandlers.push(t)},n.prototype.focus=function(){this._backingEditor.focus()},n.prototype.validate=function(){return this._backingEditor.validate()},n.prototype.__initialize=function(){var t=this;this._backingPercentageBoxEditor=autotask.find(this._backingEditorId),this._backingEditor.addChangeHandler((function(){t._change()}))},n.prototype._change=function(){this._raiseChangeEvent()},n.prototype._raiseChangeEvent=function(){if(this._changeHandlers.length>0){var e=new t.EditorChangeEventArgs;e.clientInstance=this;for(var n=0,i=this._changeHandlers;n<i.length;n++){(0,i[n])(e)}}},n}(t.LifecycleObject);t.PercentageBox=e}(Autotask||(Autotask={})),function(t){var e=function(e){function n(t,n,i){var o=e.call(this,t)||this;return o._backingEditorId=n,o._backingRadioButtonEditor=void 0,o._changeHandlers=[],o.addChange(i),o}return __extends(n,e),n.prototype.get_enabled=function(){return this._backingEditor.isEnabled},n.prototype.set_enabled=function(t){this._backingEditor.isEnabled=t},n.prototype.get_isDirty=function(){return this._backingEditor.isDirty},n.prototype.get_value=function(){return this._backingEditor.value},n.prototype.set_value=function(t){this._backingEditor.value=t},n.prototype.addChange=function(t){null!==t&&this._changeHandlers.push(t)},n.prototype.focus=function(){this._backingEditor.focus()},n.prototype.__initialize=function(){var t=this;this._backingRadioButtonEditor=autotask.find(this._backingEditorId),this._backingEditor.addChangeHandler((function(e){t._raiseChangeEvent(e)}))},Object.defineProperty(n.prototype,"_backingEditor",{get:function(){return void 0===this._backingRadioButtonEditor?autotask.throwException("_backingCheckBoxEditor is undefined."):this._backingRadioButtonEditor},enumerable:!1,configurable:!0}),n.prototype._raiseChangeEvent=function(e){if(this._changeHandlers.length>0){var n=new t.RadioButtonChangeEventArgs;n.clientInstance=this,n.isSelected=e.isSelected;for(var i=0,o=this._changeHandlers;i<o.length;i++){(0,o[i])(n)}}},n}(t.LifecycleObject);t.RadioButton=e}(Autotask||(Autotask={})),function(t){var e=function(){function t(){this._clientInstance=null,this._id=null,this._isSelected=!1}return Object.defineProperty(t.prototype,"clientInstance",{get:function(){return this._clientInstance},set:function(t){this._clientInstance=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"__id",{get:function(){return this._id},set:function(t){this._id=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isSelected",{get:function(){return this._isSelected},set:function(t){this._isSelected=t},enumerable:!1,configurable:!0}),t}();t.RadioButtonChangeEventArgs=e}(Autotask||(Autotask={})),function(t){var e=function(e){function n(t,n,i,o){var a=e.call(this,t)||this;return a._backingEditorId=n,a._backingSelectorEditor=void 0,a._changeHandlers=[],a._immediateChangeHandlers=[],null!==i&&a.addChange(i),null!==o&&a.addImmediateChange(o),a}return __extends(n,e),n.prototype.get_enabled=function(){return this._backingEditor.isEnabled},n.prototype.set_enabled=function(t){this._backingEditor.isEnabled=t},n.prototype.get_isDirty=function(){return this._backingEditor.isDirty},n.prototype.get_isLocked=function(){return this._backingEditor.isLocked},n.prototype.get_value=function(){return this._backingEditor.value},n.prototype.set_value=function(t){this._backingEditor.setSelection(t)},Object.defineProperty(n.prototype,"_backingEditor",{get:function(){return void 0===this._backingSelectorEditor?autotask.throwException("_backingSelectorEditor is undefined."):this._backingSelectorEditor},enumerable:!1,configurable:!0}),n.prototype.addChange=function(t){null!==t&&this._changeHandlers.push(t)},n.prototype.addImmediateChange=function(t){null!==t&&this._immediateChangeHandlers.push(t)},n.prototype.addApplyFilters=function(t){this._backingEditor.addApplyFiltersHandler(t)},n.prototype.addDirtyStateChangeHandler=function(t){this._backingEditor.addDirtyStateChangeHandler(t)},n.prototype.applySelection=function(t){this._backingEditor.setSelection(t.__chipInformation)},n.prototype.copySelection=function(){var e=this._backingEditor.getSelection();return null!==e?new t.SingleDataSelection(e):null},n.prototype.focus=function(){this._backingEditor.focus()},n.prototype.getSelectionTextByValue=function(t){return this._backingEditor.getSelectionTextByValue(t)},n.prototype.showDialog=function(){this._backingEditor.showDialog()},n.prototype.applyItemSetHtml=function(t,e){this._backingEditor.applyItemSetHtml(t,e)},n.prototype.populateSingleDataSelector=function(t,e,n){var i=new PopulateSingleDataSelectorRoute(t);this._backingEditor.populate(i,e,n)},n.prototype.__enableLockedState=function(t){this._backingEditor.enableLockedState(t)},n.prototype.__enableBrowseOnlyState=function(t){this._backingEditor.enableBrowseOnlyState(t)},n.prototype.__initialize=function(){var t=this;this._backingSelectorEditor=autotask.find(this._backingEditorId),this._backingEditor.addChangeHandler((function(){t._change()})),this._backingEditor.addImmediateChangeHandler((function(e){t._immediateChange(e)}))},n.prototype._change=function(){this._raiseChangeEvent()},n.prototype._immediateChange=function(t){this._raiseImmediateChangeEvent(t.previousValue,t.currentValue)},n.prototype._raiseChangeEvent=function(){if(this._changeHandlers.length>0){var e=new t.EditorChangeEventArgs;e.clientInstance=this;for(var n=0,i=this._changeHandlers;n<i.length;n++){(0,i[n])(e)}}},n.prototype._raiseImmediateChangeEvent=function(e,n){if(this._immediateChangeHandlers.length>0)for(var i=new t.ImmediateChangeEventArgs(this,e,n),o=0,a=this._immediateChangeHandlers;o<a.length;o++){(0,a[o])(i)}},n}(t.LifecycleObject);t.SingleDataSelector=e}(Autotask||(Autotask={})),function(t){var e=function(){function t(t){this._chipInformation=t}return Object.defineProperty(t.prototype,"__chipInformation",{get:function(){return this._chipInformation},enumerable:!1,configurable:!0}),t}();t.SingleDataSelection=e}(Autotask||(Autotask={})),function(t){var e=function(e){function n(t,n){var i=e.call(this,t)||this;return i._backingCoordinatorId=n,i._applyFiltersHandlers=[],i}return __extends(n,e),n.prototype.addApplyFiltersHandler=function(t){this._applyFiltersHandlers.push(t)},n.prototype.showDialog=function(e){var n=new AutotaskDataSelector.ApplyFiltersEventArgs;this._applyFiltersHandler(n);autotask.find(this._backingCoordinatorId).showDialog(n.data,(function(n){var i=new t.SingleDataSelectionEventArgs(n.chipInformation.value);e(i)}))},n.prototype._applyFiltersHandler=function(t){for(var e=0,n=this._applyFiltersHandlers;e<n.length;e++){(0,n[e])(t)}},n}(t.LifecycleObject);t.SingleDataSelectionDialogCoordinator=e}(Autotask||(Autotask={})),function(t){var e=function(){function t(t){this._selectionValue=t}return Object.defineProperty(t.prototype,"selectionValue",{get:function(){return this._selectionValue},enumerable:!1,configurable:!0}),t}();t.SingleDataSelectionEventArgs=e}(Autotask||(Autotask={})),function(t){var e=function(e){function n(t,n,i){var o=e.call(this,t)||this;return o._backingEditorId=n,o._backingSelectorEditor=void 0,o._changeHandlers=[],null!==i&&o.addChange(i),o}return __extends(n,e),n.prototype.get_enabled=function(){return this._backingEditor.isEnabled},n.prototype.set_enabled=function(t){this._backingEditor.isEnabled=t},n.prototype.get_isDirty=function(){return this._backingEditor.isDirty},n.prototype.get_isLocked=function(){return this._backingEditor.isLocked},n.prototype.get_value=function(){return this._backingEditor.value},n.prototype.set_value=function(t){var e=null;null!==t&&("number"==typeof t?e=new AutotaskItemSelectionSystem.ItemValue(t.toString(),null):"string"==typeof t?e=new AutotaskItemSelectionSystem.ItemValue(t,null):t instanceof AutotaskItemSelectionSystem.ItemValue?e=t:autotask.throwException("SingleItemSelector.set_value() received an unexpected set_value parameter type.")),this._backingEditor.value=e},Object.defineProperty(n.prototype,"_backingEditor",{get:function(){return void 0===this._backingSelectorEditor?autotask.throwException("_backingSelectorEditor is undefined."):this._backingSelectorEditor},enumerable:!1,configurable:!0}),n.prototype.addChange=function(t){null!==t&&this._changeHandlers.push(t)},n.prototype.addDirtyStateChangeHandler=function(t){this._backingEditor.addDirtyStateChangeHandler(t)},n.prototype.focus=function(){this._backingEditor.focus()},n.prototype.populateSingleItemSelector=function(t,e,n){var i=new PopulateSingleItemSelectorRoute(t);this._backingEditor.populate(i,e,n)},n.prototype.resetValue=function(){this._backingEditor.resetValue()},n.prototype.__initialize=function(){var t=this;this._backingSelectorEditor=autotask.find(this._backingEditorId),this._backingEditor.addChangeHandler((function(){t._change()}))},n.prototype.__populateResponseHandler=function(t,e,n,i,o){this._backingEditor.populateResponseHandler(t,e,n,i,o)},n.prototype._change=function(){this._raiseChangeEvent()},n.prototype._raiseChangeEvent=function(){if(this._changeHandlers.length>0){var e=new t.EditorChangeEventArgs;e.clientInstance=this;for(var n=0,i=this._changeHandlers;n<i.length;n++){(0,i[n])(e)}}},n}(t.LifecycleObject);t.SingleItemSelector=e}(Autotask||(Autotask={})),function(t){var e=function(e){function n(t,n,i){var o=e.call(this,t)||this;return o._backingEditorId=n,o._backingColorSelectorEditor=void 0,o._changeHandlers=[],null!==i&&o.addChange(i),o}return __extends(n,e),n.prototype.get_enabled=function(){return this._backingEditor.isEnabled},n.prototype.get_isDirty=function(){return this._backingEditor.isDirty},n.prototype.get_value=function(){return this._backingEditor.value},Object.defineProperty(n.prototype,"_backingEditor",{get:function(){return void 0===this._backingColorSelectorEditor?autotask.throwException("_backingColorSelectorEditor is undefined."):this._backingColorSelectorEditor},enumerable:!1,configurable:!0}),n.prototype.addChange=function(t){null!==t&&this._changeHandlers.push(t)},n.prototype.__initialize=function(){var t=this;this._backingColorSelectorEditor=autotask.find(this._backingEditorId),this._backingEditor.addChangeHandler((function(){t._changeHandler()}))},n.prototype._changeHandler=function(){this._raiseChangeEvent()},n.prototype._raiseChangeEvent=function(){if(this._changeHandlers.length>0){var e=new t.EditorChangeEventArgs;e.clientInstance=this;for(var n=0,i=this._changeHandlers;n<i.length;n++){(0,i[n])(e)}}},n}(t.LifecycleObject);t.StandardColorSelector=e}(Autotask||(Autotask={})),function(t){var e=function(e){function n(t,n,i){var o=e.call(this,t)||this;return o._backingEditorId=n,o._backingTextAreaEditor=void 0,o._changeHandlers=[],o._immediateChangeHandlers=[],null!==i&&o.addChange(i),o}return __extends(n,e),n.prototype.get_enabled=function(){return this._backingEditor.isEnabled},n.prototype.set_enabled=function(t){this._backingEditor.isEnabled=t},n.prototype.get_isDirty=function(){return this._backingEditor.isDirty},n.prototype.get_value=function(){return this._backingEditor.value},n.prototype.set_value=function(t){this._backingEditor.value=t},Object.defineProperty(n.prototype,"_backingEditor",{get:function(){return void 0===this._backingTextAreaEditor?autotask.throwException(""):this._backingTextAreaEditor},enumerable:!1,configurable:!0}),n.prototype.addChange=function(t){null!==t&&this._changeHandlers.push(t)},n.prototype.__addFocus=function(t){this._backingEditor.addFocusHandler(t)},n.prototype.__addImmediateChange=function(t){null!==t&&this._immediateChangeHandlers.push(t)},n.prototype.focus=function(){this._backingEditor.focus()},n.prototype.insertText=function(t){this._backingEditor.insertText(t)},n.prototype.validate=function(){return this._backingEditor.validate()},n.prototype.__initialize=function(){var t=this;this._backingTextAreaEditor=autotask.find(this._backingEditorId),this._backingEditor.addChangeHandler((function(){t._change()})),this._backingEditor.addImmediateChangeHandler((function(e){t._immediateChange(e)}))},n.prototype._change=function(){this._raiseChangeEvent()},n.prototype._immediateChange=function(t){this._raiseImmediateChangeEvent(t.previousValue,t.currentValue)},n.prototype._raiseChangeEvent=function(){if(this._changeHandlers.length>0){var e=new t.EditorChangeEventArgs;e.clientInstance=this;for(var n=0,i=this._changeHandlers;n<i.length;n++){(0,i[n])(e)}}},n.prototype._raiseImmediateChangeEvent=function(e,n){if(this._immediateChangeHandlers.length>0)for(var i=new t.ImmediateChangeEventArgs(this,e,n),o=0,a=this._immediateChangeHandlers;o<a.length;o++){(0,a[o])(i)}},n}(t.LifecycleObject);t.TextArea=e}(Autotask||(Autotask={})),function(t){var e=function(e){function n(t,n,i,o){var a=e.call(this,t)||this;return a._backingEditorId=n,a._backingTextBoxEditor=void 0,a._changeHandlers=[],a._enterKeyUpHandler=null,a._immediateChangeHandlers=[],null!==i&&a.addChange(i),null!==o&&a.addImmediateChange(o),a}return __extends(n,e),n.prototype.get_enabled=function(){return this._backingEditor.isEnabled},n.prototype.set_enabled=function(t){this._backingEditor.isEnabled=t},n.prototype.get_isDirty=function(){return this._backingEditor.isDirty},n.prototype.get_value=function(){return this._backingEditor.value},n.prototype.set_value=function(t){this._backingEditor.value=t},n.prototype.set_enterKeyUp=function(t){this._enterKeyUpHandler=t},Object.defineProperty(n.prototype,"_backingEditor",{get:function(){return void 0===this._backingTextBoxEditor?autotask.throwException("_backingTextBoxEditor is undefined."):this._backingTextBoxEditor},enumerable:!1,configurable:!0}),n.prototype.addChange=function(t){null!==t&&this._changeHandlers.push(t)},n.prototype.addImmediateChange=function(t){null!==t&&this._immediateChangeHandlers.push(t)},n.prototype.focus=function(){this._backingEditor.focus()},n.prototype.validate=function(){return this._backingEditor.validate()},n.prototype.__initialize=function(){var t=this;this._backingTextBoxEditor=autotask.find(this._backingEditorId),this._backingEditor.addChangeHandler((function(){t._change()})),this._backingEditor.addImmediateChangeHandler((function(e){t._immediateChange(e)})),this._backingEditor.addBroadcastKeyUpHandler((function(e){t._broadcastKeyUp(e)}))},n.prototype._change=function(){this._raiseChangeEvent()},n.prototype._broadcastKeyUp=function(t){null!==this._enterKeyUpHandler&&t.isEnter&&this._enterKeyUpHandler()},n.prototype._immediateChange=function(t){this._raiseImmediateChangeEvent(t.previousValue,t.currentValue)},n.prototype._raiseChangeEvent=function(){if(this._changeHandlers.length>0){var e=new t.EditorChangeEventArgs;e.clientInstance=this;for(var n=0,i=this._changeHandlers;n<i.length;n++){(0,i[n])(e)}}},n.prototype._raiseImmediateChangeEvent=function(e,n){if(this._immediateChangeHandlers.length>0)for(var i=new t.ImmediateChangeEventArgs(this,e,n),o=0,a=this._immediateChangeHandlers;o<a.length;o++){(0,a[o])(i)}},n}(t.LifecycleObject);t.TextBox=e}(Autotask||(Autotask={})),function(t){var e=function(e){function n(t,n,i){var o=e.call(this,t)||this;return o._backingEditorId=n,o._backingTimeBoxEditor=void 0,o._changeHandlers=[],null!==i&&o.addChange(i),o._immediateChangeHandlers=[],o}return __extends(n,e),n.prototype.get_enabled=function(){return this._backingEditor.isEnabled},n.prototype.set_enabled=function(t){this._backingEditor.isEnabled=t},n.prototype.get_isDirty=function(){return this._backingEditor.isDirty},n.prototype.get_value=function(){return this._backingEditor.value},n.prototype.set_value=function(t){this._backingEditor.value=t},Object.defineProperty(n.prototype,"_backingEditor",{get:function(){return void 0===this._backingTimeBoxEditor?autotask.throwException("_backingTimeBoxEditor is undefined."):this._backingTimeBoxEditor},enumerable:!1,configurable:!0}),n.prototype.addChange=function(t){null!==t&&this._changeHandlers.push(t)},n.prototype.addImmediateChange=function(t){null!==t&&this._immediateChangeHandlers.push(t)},n.prototype.focus=function(){this._backingEditor.focus()},n.prototype.selectDefault=function(){this._backingEditor.selectDefault()},n.prototype.validate=function(){return this._backingEditor.validate()},n.prototype.__initialize=function(){var t=this;this._backingTimeBoxEditor=autotask.find(this._backingEditorId),this._backingEditor.addChangeHandler((function(){t._change()})),this._backingEditor.addImmediateChangeHandler((function(e){t._immediateChange(e)}))},n.prototype._change=function(){this._raiseChangeEvent()},n.prototype._immediateChange=function(t){this._raiseImmediateChangeEvent(t.previousValue,t.currentValue)},n.prototype._raiseChangeEvent=function(){if(this._changeHandlers.length>0){var e=new t.EditorChangeEventArgs;e.clientInstance=this;for(var n=0,i=this._changeHandlers;n<i.length;n++){(0,i[n])(e)}}},n.prototype._raiseImmediateChangeEvent=function(e,n){if(this._immediateChangeHandlers.length>0)for(var i=new t.ImmediateChangeEventArgs(this,e,n),o=0,a=this._immediateChangeHandlers;o<a.length;o++){(0,a[o])(i)}},n}(t.LifecycleObject);t.TimeBox=e}(Autotask||(Autotask={})),function(t){var e=function(){function t(t){this._editorInstance=t}return Object.defineProperty(t.prototype,"editorInstance",{get:function(){return this._editorInstance},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"instanceId",{get:function(){return this._editorInstance.id},enumerable:!1,configurable:!0}),t}();t.ChangeEventArgs=e}(AutotaskColorSelector||(AutotaskColorSelector={})),function(t){var e=function(e){function n(t,n,i,o,a,r,s){var l=e.call(this,t)||this;return l._editorElement=AutotaskDomSystem.Document.getElementById(t),l._colorSwatchElement=l._editorElement.children[0],l._colorSwatchElement.addEventListener("click",(function(){l._clickListener()})),l._isEnabled=i,l._colorCss=o,l._colorSetName=a,l._originalValue=n,l._value=n,l._bindingPropertyName=s,l._changeHandlers=[],l._dirtyStateChangeHandlers=[],l._isDirty=!1,null!==r&&l._changeHandlers.push(r),l}return __extends(n,e),Object.defineProperty(n.prototype,"isDirty",{get:function(){return this._isDirty},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isEnabled",{get:function(){return this._isEnabled},set:function(t){t!==this._isEnabled&&(this._isEnabled=t,this._isEnabled?this._editorElement.classList.remove("Disabled"):this._editorElement.classList.add("Disabled"))},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"value",{get:function(){return this._value},enumerable:!1,configurable:!0}),n.prototype.addBroadcastKeyUpHandler=function(t){},n.prototype.addChangeHandler=function(t){this._changeHandlers.push(t)},n.prototype.addDirtyStateChangeHandler=function(t){this._dirtyStateChangeHandlers.push(t)},n.prototype.addTabbedAwayHandler=function(t){},n.prototype.addTabbingAwayHandler=function(t){},n.prototype.createRequestData=function(){var t=null;return null!==this._bindingPropertyName&&this._isEnabled&&((t={})[this._bindingPropertyName]=window.autotask.convert.integerToStringWithoutGroupSeparator(this._value)),t},n.prototype.focus=function(){},n.prototype._clickListener=function(){var t=this;this._isEnabled&&autotask.globalColorPicker.show(this._colorSwatchElement,this._colorSetName,(function(e,n,i){t._colorSelectedHandler(e,n)}),this._value)},n.prototype._colorSelectedHandler=function(t,e){this._colorSwatchElement.classList.remove(this._colorCss),this._colorSwatchElement.classList.add(e),this._colorCss=e,this._value=t,this._manageDirtyState(this._value)&&this._raiseDirtyStateChangeEvent(this._isDirty),this._raiseChangeEvent()},n.prototype._manageDirtyState=function(t){var e=!1;return this._isDirty&&t!==this._originalValue||(this._isDirty=!this._isDirty,e=!0),e},n.prototype._raiseChangeEvent=function(){if(this._changeHandlers.length>0)for(var e=new t.ChangeEventArgs(this),n=0,i=this._changeHandlers;n<i.length;n++){(0,i[n])(e)}},n.prototype._raiseDirtyStateChangeEvent=function(t){if(this._dirtyStateChangeHandlers.length>0)for(var e=new AutotaskDirtyStateSystem.DirtyStateChangeEventArgs(t),n=0,i=this._dirtyStateChangeHandlers;n<i.length;n++){(0,i[n])(e)}},n}(AutotaskEditorSystem.Editor);t.StandardColorSelector=e}(AutotaskColorSelector||(AutotaskColorSelector={})),function(t){var e=function(t){function e(e,n){var i=t.call(this,e)||this;return i._clickHandler=n,AutotaskDomSystem.Document.getElementById(e).addEventListener("click",(function(){i._onClick()})),i}return __extends(e,t),e.prototype._onClick=function(){this._clickHandler()},e}(Autotask.LifecycleObject);t.CategoryChipButton=e}(AutotaskEntityPages||(AutotaskEntityPages={})),function(t){var e=function(t){function e(e,n){var i=t.call(this,e)||this;return i._route=n,i._contentInstanceTracker=null,i}return __extends(e,t),e.prototype.replaceContent=function(t,e){var n=this;this._route.__makeRequest(t,(function(t,i){n._replaceContentSuccessHandler(t,i,e)}))},e.prototype.__initialize=function(){this._contentInstanceTracker=autotask.instanceTrackerManagement.__findInstanceTracker(this.id)},e.prototype._contentReplacedHandler=function(){},e.prototype._replaceContentSuccessHandler=function(t,e,n){this._contentInstanceTracker.__loadHtmlAndJavaScript(t,e),this._contentReplacedHandler(),null!==n&&n()},e}(Autotask.LifecycleObject);t.ReplaceableContainer=e}(AutotaskEntityPages||(AutotaskEntityPages={})),function(t){var e=function(t){function e(e){var n=t.call(this,e)||this;n._postedContainerElement=AutotaskDomSystem.Document.getElementById(e);var i=new PostedContainerValidationCreator;return n._postedContainerValidation=i.createValidation(n._postedContainerElement),n._immutableData=[],n._registrationKey=null,n}return __extends(e,t),e.prototype.generateFieldData=function(){for(var t=new AutotaskRequestDataSystem.SerializedRequestData([this._postedContainerElement]),e=0,n=this._immutableData;e<n.length;e++){var i=n[e];t.__addImmutableData(i)}return t},e.prototype.validate=function(){return this._validate(!1)},e.prototype.__addImmutableData=function(t){this._immutableData.push(t)},e.prototype.__dispose=function(){null!==this._registrationKey&&autotask.findPage().__unregisterValidatingHandler(this._registrationKey)},e.prototype.__finalize=function(){var t=this,e=autotask.findPage();this._registrationKey=e.__registerValidation(this._postedContainerValidation,(function(e){return t._validatingHandler(e)})),this._postedContainerValidation.__parse()},e.prototype._validate=function(t){var e=this._postedContainerValidation.__validate();return e||this._postedContainerValidation.__validationFailed(),this._postedContainerValidation.__validationCompleted(e,t),e},e.prototype._validatingHandler=function(t){return this._validate(t)},e}(Autotask.LifecycleObject);t.ReplaceableContent=e}(AutotaskEntityPages||(AutotaskEntityPages={})),function(t){var e=function(t){function e(e,n){return t.call(this,e,n)||this}return __extends(e,t),e}(t.ReplaceableContainer);t.ReplaceableHeadingContainer=e}(AutotaskEntityPages||(AutotaskEntityPages={})),function(t){var e=function(t){function e(e,n){return t.call(this,e,n)||this}return __extends(e,t),e}(AutotaskEntityPages.ReplaceableContainer);t.ReplaceableBodyContainer=e}(AutotaskEntityDetailPage||(AutotaskEntityDetailPage={})),function(t){var e=function(t){function e(e,n){return t.call(this,e,n)||this}return __extends(e,t),e}(AutotaskEntityPages.ReplaceableContainer);t.ReplaceableDetailsContainer=e}(AutotaskEntityDetailPage||(AutotaskEntityDetailPage={})),function(t){var e=function(t){function e(e,n){return t.call(this,e,n)||this}return __extends(e,t),e.prototype._contentReplacedHandler=function(){autotask.findPage().__resetValidation()},e}(AutotaskEntityPages.ReplaceableContainer);t.ReplaceableBodyContainer=e}(AutotaskEntityEditPage||(AutotaskEntityEditPage={})),function(t){var e=function(t){function e(e){return t.call(this,e)||this}return __extends(e,t),e}(AutotaskEntityPages.ReplaceableContent);t.ReplaceableBodyContent=e}(AutotaskEntityEditPage||(AutotaskEntityEditPage={})),function(t){var e=function(t){function e(e,n){return t.call(this,e,n)||this}return __extends(e,t),e.prototype._contentReplacedHandler=function(){autotask.findPage().__resetValidation()},e}(AutotaskEntityPages.ReplaceableContainer);t.ReplaceableDetailsContainer=e}(AutotaskEntityEditPage||(AutotaskEntityEditPage={})),function(t){var e=function(t){function e(e){return t.call(this,e)||this}return __extends(e,t),e}(AutotaskEntityPages.ReplaceableContent);t.ReplaceableDetailsContent=e}(AutotaskEntityEditPage||(AutotaskEntityEditPage={})),function(t){var e=function(){function t(t,e){this._fileTypeValidator=t,this._fileSizeValidator=e}return t.prototype.validate=function(t){var e=this._fileTypeValidator.validate(t);return e.isValid&&(e=this._fileSizeValidator.validate(t)),e},t}();t.ImageFileUploadValidation=e}(AutotaskFileUploadSystem||(AutotaskFileUploadSystem={})),function(t){var e=function(){function t(t,e,n,i,o,a,r){var s=this;this._getTrackingKeyRoute=t,this._uploadUrl=e,this._uploadTypeId=n,this._streamTemporaryImageUrl=i,this._trackingKeyParameterName=o,this._trackingKeyAttributeName=a,this._imageFileUploadValidation=r,this._imageElementErrorListener=function(t){s._imageElementStreamError(t)},this._imageElementLoadListener=function(t){s._imageElementStreamComplete(t)},this._previewingCssClass="Previewing"}return t.prototype.uploadFile=function(t,e){var n=this;autotask.overlayManagement.__showLoadingIndicator();var i=document.createElement("img");i.classList.add(this._previewingCssClass),i=e(i);var o=new FileReader;o.addEventListener("loadend",(function(){n._fileReaderLoadEndListener(o,i,t)})),o.readAsDataURL(t)},t.prototype.validate=function(t){return this._imageFileUploadValidation.validate(t)},t.prototype._fileReaderLoadEndListener=function(t,e,n){var i=this;e.src=t.result,this._getTrackingKeyRoute.__makeRequest((function(t){i._getTrackingKeySuccess(t,e,n)}))},t.prototype._getTrackingKeySuccess=function(t,e,n){var i=this,o=new URL(this._uploadUrl,window.location.toString());o.searchParams.append("f",t.trackingKey),o.searchParams.append("t",this._uploadTypeId.toString());var a=new FormData;a.append("file",n),fetch(o.toString(),{method:"POST",body:a}).then((function(){i._uploadComplete(e,t.trackingKey)})).catch((function(){autotask.throwException("Image file upload failed.")}))},t.prototype._imageElementStreamComplete=function(t){var e=t.srcElement;e.removeEventListener("load",this._imageElementLoadListener),e.removeEventListener("error",this._imageElementErrorListener),e.classList.remove(this._previewingCssClass),autotask.overlayManagement.__hideLoadingIndicator()},t.prototype._imageElementStreamError=function(t){var e=t.srcElement;e.removeEventListener("load",this._imageElementLoadListener),e.removeEventListener("error",this._imageElementErrorListener),e.classList.remove(this._previewingCssClass),autotask.overlayManagement.__hideLoadingIndicator()},t.prototype._uploadComplete=function(t,e){t.setAttribute(this._trackingKeyAttributeName,e),t.addEventListener("load",this._imageElementLoadListener),t.addEventListener("error",this._imageElementErrorListener);var n=new URL(this._streamTemporaryImageUrl,window.location.toString());n.searchParams.append(this._trackingKeyParameterName,e),t.src=n.toString()},t}();t.ImageFileUploader=e}(AutotaskFileUploadSystem||(AutotaskFileUploadSystem={})),function(t){var e=function(){function t(){}return t.prototype._onLoad=function(){return window.autotask.contextOverlayManagement.__hideVisibleContextOverlays(),!0},t.prototype._onPointerUp=function(t){return void 0!==t.pointerType&&"mouse"===t.pointerType||window.autotask.contextOverlayManagement.__hideIfEventOccursOutsideContextOverlay(t),!0},t.prototype._onTouchEnd=function(t){return window.autotask.contextOverlayManagement.__hideIfEventOccursOutsideContextOverlay(t),!0},t.prototype.initialize=function(){("ontouchend"in document||window.PointerEvent)&&window.autotask.lifeCycleManagement.__addFinalInitializationDelegate(this._registerHandler.bind(this))},t.prototype._registerHandler=function(){"ontouchend"in document?document.body.addEventListener("touchend",this._onTouchEnd.bind(this)):window.PointerEvent&&window.document.body.addEventListener("pointerup",this._onPointerUp.bind(this)),AutotaskDomSystem.Document.getElementById("PageContainerFrame").addEventListener("onload",this._onLoad.bind(this))},t}();t.FrameEventManagement=e}(AutotaskFrameEventSystem||(AutotaskFrameEventSystem={})),function(t){var e=function(){function t(t){this._frameEventManagement=t}return t.prototype.initialize=function(){this._frameEventManagement.initialize()},t}();t.InternalPageFacade=e}(AutotaskFrameEventSystem||(AutotaskFrameEventSystem={})),function(t){var e=function(){function t(){this._delayBeforeSwitching=150,this._switchingTimeoutId=null}return t.prototype._onSwitch=function(t){this._currentButton.__deactivateModule(),t.__activateModule(),this._currentButton=t},t.prototype.addDefaultButton=function(t){t.__activateModule(),this._currentButton=t,this._defaultButton=t},t.prototype.close=function(){this._currentButton.__deactivateModule(),this._defaultButton.__activateModule(),this._currentButton=this._defaultButton},t.prototype.initialize=function(){},t.prototype.stopModuleSwitch=function(){null!==this._switchingTimeoutId&&clearTimeout(this._switchingTimeoutId)},t.prototype.switchModule=function(t){var e=this;this._startSwitchingTimer((function(){e._onSwitch(t)}),this._delayBeforeSwitching)},t.prototype._startSwitchingTimer=function(t,e){this._switchingTimeoutId=window.setTimeout(t,e)},t}();t.GuideManagement=e}(AutotaskGuideSystem||(AutotaskGuideSystem={})),function(t){var e=function(){function t(t){this._guideManagement=t}return t.prototype.addDefaultButton=function(t){this._guideManagement.addDefaultButton(t)},t.prototype.close=function(){this._guideManagement.close()},t.prototype.initialize=function(){this._guideManagement.initialize()},t.prototype.stopModuleSwitch=function(){this._guideManagement.stopModuleSwitch()},t.prototype.switchModule=function(t){this._guideManagement.switchModule(t)},t}();t.InternalPageFacade=e}(AutotaskGuideSystem||(AutotaskGuideSystem={})),function(AutotaskHomepageSystem){var HomepageManagement=function(){function HomepageManagement(){}return HomepageManagement.prototype.initialize=function(t,e,n){this._routingPage=t,this._homepageRefreshUrl=n;var i=autotask.findPage(),o=(new AutotaskSessionExpirationSystem.LocalStorageKeys).workspaceUrlKeyPrefix+i.__restoreWorkspaceKey,a=autotask.localStorageManagement.__getItem(o);null!==a?(i.__workspace.navigate(a),autotask.localStorageManagement.__removeItem(o)):null!==e?autotask.windowManagement.openPage(e,null,!1):null!==this._routingPage?autotask.windowManagement.openPage(this._routingPage,null,!1):window.autotask.siteNavigation.activateDashboard(!1)},HomepageManagement.prototype.navigateToHomepage=function(t){var e=!1;null!=t&&void 0!==t.__ctrlKey&&(e=t.__ctrlKey),null!==this._routingPage?autotask.windowManagement.openPage(this._routingPage,null,e):window.autotask.siteNavigation.activateAndRefreshDashboard()},HomepageManagement.prototype.refreshHomepage=function(t){var e={homepage:t};window.autotask.navigation.ajax.__restrictedGetRequest(this._homepageRefreshUrl,e,this._onRefreshHomepageSuccess.bind(this)).__homepageRefresh()},HomepageManagement.prototype._onRefreshHomepageSuccess=function(data){this._routingPage=eval(data.homepage)},HomepageManagement}();AutotaskHomepageSystem.HomepageManagement=HomepageManagement}(AutotaskHomepageSystem||(AutotaskHomepageSystem={})),function(t){var e=function(){function t(t){this._homepageManagagement=t}return t.prototype.refreshHomepage=function(t){this._homepageManagagement.refreshHomepage(t)},t}();t.InternalPageFacade=e}(AutotaskHomepageSystem||(AutotaskHomepageSystem={})),function(t){var e=function(){function t(t){this._homepageManagagement=t}return t.prototype.initialize=function(t,e,n){this._homepageManagagement.initialize(t,e,n)},t.prototype.navigateToHomepage=function(t){this._homepageManagagement.navigateToHomepage(t)},t.prototype.__refreshHomepage=function(t){this._homepageManagagement.refreshHomepage(t)},t}();t.PageFacade=e}(AutotaskHomepageSystem||(AutotaskHomepageSystem={})),function(t){var e=function(){function e(t,e,n){t.length!==e.length&&autotask.throwException("The arguments must have the same length."),this._keys=t,this._routeSettings=e,this._headersFragment=n,this._imagesFragment=new DocumentFragment;for(var i=0;i<t.length;i++)this._imagesFragment.appendChild(document.createElement("img"));this._preparedImageKeys=[],this._isContentLended=!1,this._isPrepared=!1,this._imagePreparedHandler=null}return Object.defineProperty(e.prototype,"isPrepared",{get:function(){return this._isPrepared},enumerable:!1,configurable:!0}),e.prototype.copyLinkToClipboard=function(t){var e=new Autotask.ClipboardManagement,n=this._routeSettings[t].fullSizeUrl;e.copyText(n)},e.prototype.downloadImage=function(t){var e=this._routeSettings[t].downloadUrl;window.location.assign(e)},e.prototype.getIndex=function(t){var e=this._keys.indexOf(t);return e<0&&autotask.throwException("The key does not exist."),e},e.prototype.getNextIndex=function(t){var e=t+1;return e>=this._keys.length&&(e=0),e},e.prototype.getPreviousIndex=function(t){var e=t-1;return e<0&&(e=this._keys.length-1),e},e.prototype.isImagePrepared=function(t){var e=this._keys[t];return this._preparedImageKeys.indexOf(e)>=0},e.prototype.lendContent=function(e){return this._isContentLended&&autotask.throwException("The content has been lended and not returned."),this._isContentLended=!0,this._imagePreparedHandler=e,this._isPrepared||this._prepare(),new t.ActivatorContent(this._headersFragment,this._imagesFragment)},e.prototype.openImage=function(t){var e=this._routeSettings[t].fullSizeUrl;window.open(e,"_blank")},e.prototype.returnContent=function(t){this._isContentLended||autotask.throwException("The content is not lended."),this._isContentLended=!1,this._imagePreparedHandler=null,this._headersFragment=t.headersFragment,this._imagesFragment=t.imagesFragment},e.prototype._imagePreparedListener=function(t){this._preparedImageKeys.push(t),null!==this._imagePreparedHandler&&this._imagePreparedHandler(this.getIndex(t))},e.prototype._prepare=function(){for(var t,e=this,n=function(n){(t=i._imagesFragment.children[n]).addEventListener("load",(function(){e._imagePreparedListener(e._keys[n])})),t.addEventListener("error",(function(){e._imagePreparedListener(e._keys[n])})),t.src=i._routeSettings[n].thumbnailUrl},i=this,o=0;o<this._keys.length;o++)n(o);this._isPrepared=!0},e}();t.Activator=e}(AutotaskImageViewerSystem||(AutotaskImageViewerSystem={})),function(t){var e=function(){function t(t,e){this._headersFragment=t,this._imagesFragment=e}return Object.defineProperty(t.prototype,"headersFragment",{get:function(){return this._headersFragment},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"imagesFragment",{get:function(){return this._imagesFragment},enumerable:!1,configurable:!0}),t}();t.ActivatorContent=e}(AutotaskImageViewerSystem||(AutotaskImageViewerSystem={})),function(t){var e=function(t){function e(e,n,i,o,a,r){var s=t.call(this,e)||this;return s._headerElement=AutotaskDomSystem.Document.getElementById(e),s._conversationItemCoordinatorId=n,s._key=i,s._thumbnailUrl=o,s._fullSizeUrl=a,s._downloadUrl=r,s}return __extends(e,t),e.prototype.__initialize=function(){autotask.find(this._conversationItemCoordinatorId).registerImageAttachment(this._key,this._headerElement,this._thumbnailUrl,this._fullSizeUrl,this._downloadUrl)},e}(Autotask.LifecycleObject);t.ActivityAttachmentImageViewerHeader=e}(AutotaskImageViewerSystem||(AutotaskImageViewerSystem={})),function(t){var e=function(){function e(){this._headersFragment=new DocumentFragment,this._keys=[],this._routeSettings=[]}return e.prototype.createActivator=function(){return new t.Activator(this._keys,this._routeSettings,this._headersFragment)},e.prototype.registerImage=function(e,n,i,o,a){this._keys.push(e),this._headersFragment.appendChild(n),this._routeSettings.push(new t.RouteSettings(i,o,a))},e}();t.ActivityImageRegistrar=e}(AutotaskImageViewerSystem||(AutotaskImageViewerSystem={})),function(t){var e=function(e){function n(t,n,i,o,a,r){var s=e.call(this,t)||this;return s._imageViewerElement=AutotaskDomSystem.Document.getElementById(t),s._headerContentElement=AutotaskDomSystem.Document.getElementById(n),s._imageContainerElement=AutotaskDomSystem.Document.getElementById(i),s._loadingIndicatorElement=AutotaskDomSystem.Document.getElementById(o),s._backButtonElement=AutotaskDomSystem.Document.getElementById(a),s._backButtonClickListener=function(t){s._backButtonClick(t)},s._backButtonElement.addEventListener("click",s._backButtonClickListener),s._forwardButtonElement=AutotaskDomSystem.Document.getElementById(r),s._forwardButtonClickListener=function(t){s._forwardButtonClick(t)},s._forwardButtonElement.addEventListener("click",s._forwardButtonClickListener),s._imageClickListener=function(t){t.stopPropagation()},s._activator=null,s._currentIndex=null,s._activeCssClass="Active",s._isActive=!1,s}return __extends(n,e),n.prototype.copyLinkToClipboard=function(){this._isActive||autotask.throwException("The image viewer is not active.");var t=this._activator,e=this._currentIndex;t.copyLinkToClipboard(e)},n.prototype.downloadImage=function(){this._isActive||autotask.throwException("The image viewer is not active.");var t=this._activator,e=this._currentIndex;t.downloadImage(e)},n.prototype.hide=function(){this._isActive||autotask.throwException("The image viewer is not active."),autotask.overlayManagement.__pullDialogOffStack(this._imageViewerElement,null),this._isActive=!1;var e=this._currentIndex;this._deactivateImage(e);var n=new DocumentFragment;n.append.apply(n,Array.from(this._headerContentElement.childNodes));var i=new DocumentFragment;i.append.apply(i,Array.from(this._imageContainerElement.childNodes));var o=this._activator,a=new t.ActivatorContent(n,i);o.returnContent(a),this._activator=null,this._currentIndex=null,this._hideLoadingIndicator()},n.prototype.openImage=function(){this._isActive||autotask.throwException("The image viewer is not active.");var t=this._activator,e=this._currentIndex;t.openImage(e)},n.prototype.show=function(t,e){var n=this;this._isActive&&autotask.throwException("The image viewer is active."),this._activator=t;var i=t.getIndex(e);this._currentIndex=i,t.isPrepared||this._showLoadingIndicator();var o=t.lendContent((function(t){n._imagePreparedHandler(t)}));this._headerContentElement.appendChild(o.headersFragment),this._imageContainerElement.appendChild(o.imagesFragment),this._imageContainerElement.childElementCount>1?(this._backButtonElement.classList.add(this._activeCssClass),this._forwardButtonElement.classList.add(this._activeCssClass)):(this._backButtonElement.classList.remove(this._activeCssClass),this._forwardButtonElement.classList.remove(this._activeCssClass)),this._activateImage(i),autotask.overlayManagement.__pushDialogOnStack(this._imageViewerElement,null),this._isActive=!0},n.prototype.__dispose=function(){(this._backButtonElement.removeEventListener("click",this._backButtonClickListener),this._forwardButtonElement.removeEventListener("click",this._forwardButtonClickListener),null!==this._currentIndex)&&this._imageContainerElement.children[this._currentIndex].removeEventListener("click",this._imageClickListener)},n.prototype._activateImage=function(t){this._activator.isImagePrepared(t)||this._showLoadingIndicator();var e=this._imageContainerElement.children[t];e.addEventListener("click",this._imageClickListener),e.classList.add(this._activeCssClass);var n=1===this._headerContentElement.childElementCount?0:t;this._headerContentElement.children[n].classList.add(this._activeCssClass)},n.prototype._backButtonClick=function(t){var e=this._activator,n=this._currentIndex,i=e.getPreviousIndex(n);this._activateImage(i),this._deactivateImage(n),this._currentIndex=i,t.stopPropagation()},n.prototype._deactivateImage=function(t){var e=this._imageContainerElement.children[t];(e.classList.remove(this._activeCssClass),e.removeEventListener("click",this._imageClickListener),this._headerContentElement.childElementCount>1)&&this._headerContentElement.children[t].classList.remove(this._activeCssClass)},n.prototype._forwardButtonClick=function(t){var e=this._activator,n=this._currentIndex,i=e.getNextIndex(n);this._activateImage(i),this._deactivateImage(n),this._currentIndex=i,t.stopPropagation()},n.prototype._hideLoadingIndicator=function(){this._loadingIndicatorElement.classList.remove(this._activeCssClass)},n.prototype._imagePreparedHandler=function(t){this._currentIndex===t&&this._hideLoadingIndicator()},n.prototype._showLoadingIndicator=function(){this._loadingIndicatorElement.classList.add(this._activeCssClass)},n}(Autotask.LifecycleObject);t.ImageViewer=e}(AutotaskImageViewerSystem||(AutotaskImageViewerSystem={})),function(t){var e=function(){function e(t,e,n,i,o,a){this._headersFragment=new DocumentFragment,this._headersFragment.appendChild(t),this._keys=[],this._routeSettings=[];for(var r=0,s=e;r<s.length;r++){var l=s[r];this._registerImage(l,n,i,o,a)}}return e.prototype.createActivator=function(){return new t.Activator(this._keys,this._routeSettings,this._headersFragment)},e.prototype._registerImage=function(e,n,i,o,a){this._keys.push(e);var r=new UrlCreator,s=r.createUrl(n);s.add(a,e);var l=r.createUrl(i);l.add(a,e);var u=r.createUrl(o);u.add(a,e);var c=new t.RouteSettings(s.toString(null),l.toString(null),u.toString(null));this._routeSettings.push(c)},e}();t.RichTextImageRegistrar=e}(AutotaskImageViewerSystem||(AutotaskImageViewerSystem={})),function(t){var e=function(t){function e(e){return t.call(this,e)||this}return __extends(e,t),Object.defineProperty(e.prototype,"_imageViewer",{get:function(){return autotask.findPage().__get_imageViewer()},enumerable:!1,configurable:!0}),e.prototype.copyLinkToClipboard=function(){this._imageViewer.copyLinkToClipboard()},e.prototype.downloadImage=function(){this._imageViewer.downloadImage()},e.prototype.openImage=function(){this._imageViewer.openImage()},e}(Autotask.LifecycleObject);t.RichTextImageViewerHeader=e}(AutotaskImageViewerSystem||(AutotaskImageViewerSystem={})),function(t){var e=function(){function t(t,e,n){this._thumbnailUrl=t,this._fullSizeUrl=e,this._downloadUrl=n}return Object.defineProperty(t.prototype,"downloadUrl",{get:function(){return this._downloadUrl},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fullSizeUrl",{get:function(){return this._fullSizeUrl},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"thumbnailUrl",{get:function(){return this._thumbnailUrl},enumerable:!1,configurable:!0}),t}();t.RouteSettings=e}(AutotaskImageViewerSystem||(AutotaskImageViewerSystem={})),function(t){var e=function(t){function e(e,n,i,o){var a=t.call(this,e,n,i)||this;return a._value=o,a}return __extends(e,t),e.prototype._createRequestData=function(){var e=t.prototype._createRequestData.call(this);return null!==this._value&&(e[this._bindingPropertyName]=this._value),e},e}(AutotaskImmutableDataSystem.DateData);t.DateData=e}(AutotaskMvcImmutableDataSystem||(AutotaskMvcImmutableDataSystem={})),function(t){var e=function(t){function e(e,n,i,o){var a=t.call(this,e,n,i)||this;return a._value=o,a}return __extends(e,t),e.prototype._createRequestData=function(){var e=t.prototype._createRequestData.call(this);return null!==this._value&&(e[this._bindingPropertyName]=this._value),e},e}(AutotaskImmutableDataSystem.DecimalData);t.DecimalData=e}(AutotaskMvcImmutableDataSystem||(AutotaskMvcImmutableDataSystem={})),function(t){var e=function(t){function e(e,n,i,o){var a=t.call(this,e,n,i)||this;return a._value=o,a}return __extends(e,t),e.prototype._createRequestData=function(){var e=t.prototype._createRequestData.call(this);return null!==this._value&&(e[this._bindingPropertyName]=this._value),e},e}(AutotaskImmutableDataSystem.IntegerData);t.IntegerData=e}(AutotaskMvcImmutableDataSystem||(AutotaskMvcImmutableDataSystem={})),function(t){var e=function(t){function e(e,n,i,o){var a=t.call(this,e,n,i)||this;return a._value=o,a}return __extends(e,t),e.prototype._createRequestData=function(){var e=t.prototype._createRequestData.call(this);if(null!==this._value){var n=this._value.__createRequestData(this._bindingPropertyName);Object.assign(e,n)}return e},e}(AutotaskImmutableDataSystem.ItemValueCollectionData);t.ItemValueCollectionData=e}(AutotaskMvcImmutableDataSystem||(AutotaskMvcImmutableDataSystem={})),function(t){var e=function(t){function e(e,n,i,o){var a=t.call(this,e,n,i)||this;return a._value=o,a}return __extends(e,t),e.prototype._createRequestData=function(){var e=t.prototype._createRequestData.call(this);if(null!==this._value){var n=this._value.__createRequestData(this._bindingPropertyName);Object.assign(e,n)}return e},e}(AutotaskImmutableDataSystem.ItemValueData);t.ItemValueData=e}(AutotaskMvcImmutableDataSystem||(AutotaskMvcImmutableDataSystem={})),function(t){var e=function(t){function e(e,n,i,o){var a=t.call(this,e,n,i)||this;return a._value=o,a}return __extends(e,t),e.prototype._createRequestData=function(){var e=t.prototype._createRequestData.call(this);return null!==this._value&&(e[this._bindingPropertyName]=this._value),e},e}(AutotaskImmutableDataSystem.StringData);t.SearchFilterUserDefinedFieldSupplementaryData=e}(AutotaskMvcImmutableDataSystem||(AutotaskMvcImmutableDataSystem={})),function(t){var e=function(t){function e(e,n,i,o){var a=t.call(this,e,n,i)||this;return a._value=o,a}return __extends(e,t),e.prototype._createRequestData=function(){var e=t.prototype._createRequestData.call(this);return null!==this._value&&(e[this._bindingPropertyName]=this._value),e},e}(AutotaskImmutableDataSystem.StringData);t.StringData=e}(AutotaskMvcImmutableDataSystem||(AutotaskMvcImmutableDataSystem={})),function(t){var e=function(t){function e(e){var n=t.call(this,e,!0)||this;return n._defaultStyleCoordinator=new AutotaskOverlaySystem.DefaultStyleCoordinator(n._overlayElementStyleApplicator),n}return __extends(e,t),e.prototype.show=function(t){this._show(t)},Object.defineProperty(e.prototype,"_delayBeforeHiding",{get:function(){return 300},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_delayBeforeShowing",{get:function(){return 0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_styleCoordinator",{get:function(){return this._defaultStyleCoordinator},enumerable:!1,configurable:!0}),e.prototype._createPositionCoordinator=function(t){var e=new AutotaskOverlaySystem.PositionCoordinator,n=new AutotaskPositionApplicatorSystem.Default(this._defaultStyleCoordinator,t,null,null),i=new AutotaskPositionSystem.BottomAlignedRight(0,-1);e.addPositionAndApplicator(i,n);var o=new AutotaskPositionSystem.BottomAlignedLeft(0,-1);return e.addPositionAndApplicator(o,n),e},e}(AutotaskOverlaySystem.ContextOverlay);t.DropDownMenu=e}(AutotaskInsightSystem||(AutotaskInsightSystem={})),function(t){var e=function(t){function e(e,n,i){var o=t.call(this,e)||this;return o._buttonContainerElement=AutotaskDomSystem.Document.getElementById(e),o._buttonContainerElement.children[0].addEventListener("click",(function(){o._buttonClickListener()})),o._contextOverlayId=n,o._contentRoute=i,o._contextOverlay=null,o}return __extends(e,t),e.prototype.__initialize=function(){var t=this;this._contextOverlay=autotask.find(this._contextOverlayId),this._contextOverlay.addShowingHandler((function(){t._contextOverlayShowingHandler()}))},e.prototype._buttonClickListener=function(){this._contextOverlay.show(this._buttonContainerElement)},e.prototype._contextOverlayShowingHandler=function(){var t=this._contextOverlay;t.__showLoadingIndicator(),t.__requestContent(this._contentRoute)},e}(Autotask.LifecycleObject);t.InsightEntityDetailsLinkButton=e}(AutotaskInsightSystem||(AutotaskInsightSystem={})),function(t){var e=function(t){function e(e,n){var i=t.call(this,e,!0)||this;return i._defaultStyleCoordinator=new AutotaskOverlaySystem.DefaultStyleCoordinator(i._overlayElementStyleApplicator),i._instanceTrackerContainerId=n,i._instanceTracker=null,i._contentDiv=i._getChildElementByClassName("Content"),i._loadingIndicatorDiv=i._getChildElementByClassName("LoadingIndicator"),i}return __extends(e,t),e.prototype.show=function(t){var e=(t.clientWidth-2).toString()+"px";this._contentDiv.style.maxWidth=e,this._contentDiv.style.minWidth=e,this._show(t)},e.prototype.__dispose=function(){t.prototype.__dispose.call(this),null!==this._instanceTracker&&this._instanceTracker.__dispose()},e.prototype.__requestContent=function(t){var e=this;t.__makeRequest((function(t){e._requestSuccess(t)}))},e.prototype.__showLoadingIndicator=function(){null!==this._instanceTracker&&(this._instanceTracker.__clear(),this._contentDiv.classList.remove("Active"),this._loadingIndicatorDiv.classList.add("Active"))},Object.defineProperty(e.prototype,"_delayBeforeHiding",{get:function(){return 300},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_delayBeforeShowing",{get:function(){return 0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_styleCoordinator",{get:function(){return this._defaultStyleCoordinator},enumerable:!1,configurable:!0}),e.prototype._createPositionCoordinator=function(t){var e=new AutotaskOverlaySystem.PositionCoordinator,n=new AutotaskPositionSystem.BottomAlignedRight(0,-19),i=new AutotaskPositionApplicatorSystem.Default(this._defaultStyleCoordinator,t,"Bottom",null);e.addPositionAndApplicator(n,i);var o=new AutotaskPositionSystem.TopAlignedRight(0,19),a=new AutotaskPositionApplicatorSystem.Default(this._defaultStyleCoordinator,t,"Top",null);return e.addPositionAndApplicator(o,a),e},e.prototype._loadHtmlAndJavaScript=function(t,e){null===this._instanceTracker&&(this._instanceTracker=new Autotask.InstanceTracker(this._instanceTrackerContainerId,this._instanceTrackerContainerId)),this._loadingIndicatorDiv.classList.remove("Active"),this._instanceTracker.__loadHtmlAndJavaScript(t,e),this._contentDiv.classList.add("Active"),this.__reposition()},e.prototype._requestSuccess=function(t){!0===t.isDataUnavailable?this.__hideWithoutDelay():this._loadHtmlAndJavaScript(t.htmlForInstanceTrackerContainer,t.script)},e}(AutotaskOverlaySystem.ContextOverlay);t.InsightEntityDetailsOverlay=e}(AutotaskInsightSystem||(AutotaskInsightSystem={})),function(t){var e=function(t){function e(e,n,i){var o=t.call(this,e)||this;return o._isEnabled=n,o._clickHandler=i,AutotaskDomSystem.Document.getElementById(e).addEventListener("click",(function(){o._clickListener()})),o}return __extends(e,t),e.prototype._clickListener=function(){this._isEnabled&&this._clickHandler()},e}(Autotask.LifecycleObject);t.ToolBarButton=e}(AutotaskInsightSystem||(AutotaskInsightSystem={})),function(t){var e=function(t){function e(e,n){var i=t.call(this,e)||this;return i._contextMenuId=n,i._contextMenuButton=AutotaskDomSystem.Document.getElementById(e),i._contextMenuInteractionEventsCoordinator=new AutotaskOverlaySystem.InteractionEventsCoordinator(i._contextMenuButton,(function(){i._showContextMenu()}),(function(){i._hideContextMenu()})),i._contextMenuShowingHandler=null,i._contextMenuHidingHandler=null,i._contextMenu=null,i}return __extends(e,t),e.prototype.setContextMenuHidingHandler=function(t){this._contextMenuHidingHandler=t},e.prototype.setContextMenuShowingHandler=function(t){this._contextMenuShowingHandler=t},e.prototype.__dispose=function(){this._contextMenuInteractionEventsCoordinator.__dispose()},e.prototype.__initialize=function(){var t=this;this._contextMenu=autotask.find(this._contextMenuId),this._contextMenu.addHideCompletedHandler((function(){t._hideCompleteHandler()}))},e.prototype._hideContextMenu=function(){null!==this._contextMenu&&(this._contextMenu.hide(),null!==this._contextMenuHidingHandler&&this._contextMenuHidingHandler())},e.prototype._showContextMenu=function(){null!==this._contextMenu&&(null!==this._contextMenuShowingHandler&&this._contextMenuShowingHandler(),this._contextMenuButton.classList.add("Active"),this._contextMenu.show(this._contextMenuButton))},e.prototype._hideCompleteHandler=function(){this._contextMenuButton.classList.remove("Active")},e}(Autotask.LifecycleObject);t.ToolBarDropDownButton=e}(AutotaskInsightSystem||(AutotaskInsightSystem={})),function(t){!function(t){var e=function(t){function e(e,n){var i=t.call(this,e)||this;return i._url=n,i}return __extends(e,t),e.prototype.__initialize=function(){var t=this;autotask.cooperBotIntegration.registerInitializationHandler((function(){t._start()}))},e.prototype._start=function(){var t=document.createElement("script");t.async=!0,t.src=this._url,window.document.body.appendChild(t)},e}(Autotask.LifecycleObject);t.CooperBotChat=e}(t.CooperBot||(t.CooperBot={}))}(AutotaskIntegrations||(AutotaskIntegrations={})),function(t){var e=function(){function t(t){this._loginNotificationManagement=t}return t.prototype.initialize=function(t,e,n,i){this._loginNotificationManagement.initialize(t,e,n,i)},t}();t.InternalPageFacade=e}(AutotaskLoginNotificationSystem||(AutotaskLoginNotificationSystem={})),function(t){var e=function(){function t(){this._notificationPointers=[]}return t.prototype.initialize=function(t,e,n,i){if(this._acceptWidgetDialogUrl=n,this._announcementsDialogUrl=t,e&&this._notificationPointers.push(this._showAnnouncementsDialog.bind(this)),i.length>0)for(var o=0;o<i.length;o++)this._notificationPointers.push(this._showAcceptWidgetDialog.bind(this,i[o]));"complete"===document.readyState||"interactive"===document.readyState?this._showNextNotification():document.addEventListener("DOMContentLoaded",this._showNextNotification.bind(this),!1)},t.prototype._onShowAcceptWidgetDialogSuccess=function(){this._notificationPointers.splice(0,1),window.acceptWidgetDialog.set_hidingDelegate(this._showNextNotification.bind(this))},t.prototype._onShowAnnouncementsDialogSuccess=function(){this._notificationPointers.splice(0,1),window.updatesDialog.set_hidingDelegate(this._showNextNotification.bind(this))},t.prototype._showAcceptWidgetDialog=function(t){var e={widgetOfferId:t};window.autotask.ajax.postRequest(this._acceptWidgetDialogUrl,e,this._onShowAcceptWidgetDialogSuccess.bind(this)).dialog()},t.prototype._showAnnouncementsDialog=function(){window.autotask.ajax.postRequest(this._announcementsDialogUrl,null,this._onShowAnnouncementsDialogSuccess.bind(this)).dialog()},t.prototype._showNextNotification=function(){this._notificationPointers.length>0&&this._notificationPointers[0]()},t}();t.LoginNotificationManagement=e}(AutotaskLoginNotificationSystem||(AutotaskLoginNotificationSystem={})),function(t){var e=function(t){function e(e,n,i){var o=t.call(this,e)||this;o._showMoreButtonText=n,o._showLessButtonText=i;var a=AutotaskDomSystem.Document.getElementById(e);return o._buttonElement=AutotaskDomSystem.Document.getChildElementByClassName(a,"ShowMoreLessButton"),o._ellipsesElement=AutotaskDomSystem.Document.getChildElementByClassName(a,"Ellipses"),o._expandableTextElement=AutotaskDomSystem.Document.getChildElementByClassName(a,"ExpandableText"),o._isExpandableTextVisible=!1,o._buttonElement.addEventListener("click",(function(){o._buttonClickListener()})),o}return __extends(e,t),e.prototype._buttonClickListener=function(){this._isExpandableTextVisible?(this._isExpandableTextVisible=!1,this._buttonElement.textContent=this._showMoreButtonText,this._ellipsesElement.classList.remove("Inactive"),this._expandableTextElement.classList.add("Inactive")):(this._isExpandableTextVisible=!0,this._buttonElement.textContent=this._showLessButtonText,this._ellipsesElement.classList.add("Inactive"),this._expandableTextElement.classList.remove("Inactive"))},e}(Autotask.LifecycleObject);t.ExpandableMessageBar=e}(AutotaskMessageBarSystem||(AutotaskMessageBarSystem={})),function(t){var e=function(){function t(t){this._navigationButtonBarEventRegistration=t}return t.prototype.initialize=function(){this._navigationButtonBarEventRegistration.initialize()},t}();t.InternalPageFacade=e}(AutotaskNavigationButtonBarEventRegistrationSystem||(AutotaskNavigationButtonBarEventRegistrationSystem={})),function(t){var e=function(){function t(){this._siteNavigationBar=AutotaskDomSystem.Document.getElementById("SiteNavigationBar")}return t.prototype.initialize=function(){this._registerPermanentHandlers()},t.prototype._registerPermanentHandlers=function(){var t=autotask.findPage();t.__buttonEvents.registerContainer(this._siteNavigationBar,".SiteNavigationButton"),t.__buttonEvents.registerContainer(this._siteNavigationBar,".SiteNavigationButton.Logo"),t.__buttonEvents.registerContainer(this._siteNavigationBar,".ContextOverlay .Button.GuideNavigation")},t}();t.NavigationButtonBarEventRegistration=e}(AutotaskNavigationButtonBarEventRegistrationSystem||(AutotaskNavigationButtonBarEventRegistrationSystem={})),function(t){var e=function(t){function e(e){var n=t.call(this,e,!0)||this;n._defaultStyleCoordinator=new AutotaskOverlaySystem.DefaultStyleCoordinator(n._overlayElementStyleApplicator);var i=AutotaskDomSystem.Document.getElementByClassName("ColorPickerContextOverlay");i.addEventListener("mousedown",(function(t){t.preventDefault()}));var o=AutotaskDomSystem.Document.getChildElementByClassName(i,"Content");n._colorSets=AutotaskDomSystem.Document.getChildElementsByClassName(o,"ColorSet"),n._colorSwatches=[];for(var a=0,r=n._colorSets;a<r.length;a++)for(var s=r[a],l=0;l<s.children.length;l++){for(var u=0,c=AutotaskDomSystem.Document.getChildElementsByClassName(s.children[l],"ColorContainer");u<c.length;u++){var d=c[u],h=d.firstElementChild;d.dataset.colorHexadecimal=AutotaskColorPickerSystem.ColorConverter.getBackgroundColorHexadecimal(h),d.addEventListener("click",(function(t){n._colorSwatchClickListener(t)})),n._colorSwatches.push(d)}for(var _=0,p=AutotaskDomSystem.Document.getChildElementsByClassName(s.children[l],"NoColor");_<p.length;_++){p[_].addEventListener("click",(function(){n._noColorIconClickListener()}))}}return n._activeCssClass="Active",n._selectedCssClass="Selected",n._colorSelectedHandler=null,n}return __extends(e,t),e.prototype.show=function(t,e,n,i){this._activateColorSet(e),this._selectColorSwatch(i),this._colorSelectedHandler=n,this._show(t)},e.prototype.showWithHexadecimal=function(t,e,n,i){this._activateColorSet(e),this._selectColorSwatchByHexadecimal(i),this._colorSelectedHandler=n,this._show(t)},e.prototype.getColorCss=function(t){for(var e=null,n=0,i=this._colorSwatches;n<i.length;n++){var o=i[n];o.dataset.colorId===t&&(e=o.dataset.colorCss)}return e},Object.defineProperty(e.prototype,"_delayBeforeHiding",{get:function(){return 300},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_delayBeforeShowing",{get:function(){return 0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_styleCoordinator",{get:function(){return this._defaultStyleCoordinator},enumerable:!1,configurable:!0}),e.prototype._createPositionCoordinator=function(t){var e=new AutotaskOverlaySystem.PositionCoordinator,n=new AutotaskPositionSystem.BottomAlignedLeft(-3,8),i=new AutotaskPositionApplicatorSystem.Default(this._defaultStyleCoordinator,t,"BottomLeft",null);e.addPositionAndApplicator(n,i);var o=new AutotaskPositionSystem.TopAlignedLeft(-3,-8),a=new AutotaskPositionApplicatorSystem.Default(this._defaultStyleCoordinator,t,"TopLeft",null);e.addPositionAndApplicator(o,a);var r=new AutotaskPositionSystem.BottomAlignedRight(3,8),s=new AutotaskPositionApplicatorSystem.Default(this._defaultStyleCoordinator,t,"BottomRight",null);e.addPositionAndApplicator(r,s);var l=new AutotaskPositionSystem.TopAlignedRight(3,-8),u=new AutotaskPositionApplicatorSystem.Default(this._defaultStyleCoordinator,t,"TopRight",null);return e.addPositionAndApplicator(l,u),e},e.prototype._activateColorSet=function(t){for(var e=0,n=this._colorSets;e<n.length;e++){var i=n[e];i.classList.remove(this._activeCssClass),i.classList.contains(t)&&i.classList.add(this._activeCssClass)}},e.prototype._colorSwatchClickListener=function(t){if(null!==this._colorSelectedHandler){var e=t.currentTarget,n=window.autotask.convert.stringToInteger(e.dataset.colorId),i=e.dataset.colorCss,o=e.firstElementChild,a=AutotaskColorPickerSystem.ColorConverter.getBackgroundColorHexadecimal(o);this._colorSelectedHandler(n,i,a)}this.__hideWithoutDelay()},e.prototype._noColorIconClickListener=function(){null!==this._colorSelectedHandler&&this._colorSelectedHandler(null,null,null),this.__hideWithoutDelay()},e.prototype._selectColorSwatch=function(t){for(var e=0,n=this._colorSwatches;e<n.length;e++){var i=n[e];i.classList.remove(this._selectedCssClass),null!==t&&i.dataset.colorId===t&&i.classList.add(this._selectedCssClass)}},e.prototype._selectColorSwatchByHexadecimal=function(t){for(var e=0,n=this._colorSwatches;e<n.length;e++){var i=n[e];i.classList.remove(this._selectedCssClass),null!==t&&i.dataset.colorHexadecimal===t&&i.classList.add(this._selectedCssClass)}},e}(AutotaskOverlaySystem.ContextOverlay);t.GlobalColorPickerContextOverlay=e}(AutotaskOverlays||(AutotaskOverlays={})),function(t){var e=function(t){function e(e){var n=t.call(this,e,!0)||this;n._defaultStyleCoordinator=new AutotaskOverlaySystem.DefaultStyleCoordinator(n._overlayElementStyleApplicator);var i=AutotaskDomSystem.Document.getElementById(e);n._itemContainerElement=i.querySelector(".Content > .IconItemContainer"),n._itemElements=n._itemContainerElement.querySelectorAll("div > .IconItem"),n._contentElement=i.querySelector(".Content"),n._activeCssClass="Active",n._iconContainerElements=[];for(var o=0;o<n._itemElements.length;o++)n._itemElements[o].addEventListener("click",(function(t){n._itemClickListener(t)})),n._iconContainerElements.push(n._itemElements[o].children[0]);return n._itemSelectedDelegate=null,n._colorCssClass=null,n}return __extends(e,t),e.prototype.__set_itemSelectedDelegate=function(t){this._itemSelectedDelegate=t},Object.defineProperty(e.prototype,"_delayBeforeHiding",{get:function(){return 300},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_delayBeforeShowing",{get:function(){return 0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_styleCoordinator",{get:function(){return this._defaultStyleCoordinator},enumerable:!1,configurable:!0}),e.prototype.__show=function(t,e){this._contentElement.classList.add(this._activeCssClass),this._selectIcon(e),this._show(t)},e.prototype.__dispose=function(){t.prototype.__dispose.call(this)},e.prototype.__applyColorCss=function(t){if(null!==this._colorCssClass||this._colorCssClass!==t){for(var e=0,n=this._iconContainerElements;e<n.length;e++){var i=n[e];null!==this._colorCssClass&&i.classList.remove(this._colorCssClass),i.classList.add(t)}this._colorCssClass=t}},e.prototype._createPositionCoordinator=function(t){var e=new AutotaskOverlaySystem.PositionCoordinator,n=new AutotaskPositionSystem.BottomAlignedLeft(-4,9),i=new AutotaskPositionApplicatorSystem.Default(this._defaultStyleCoordinator,t,"BottomLeft",null);e.addPositionAndApplicator(n,i);var o=new AutotaskPositionSystem.TopAlignedLeft(-4,-9),a=new AutotaskPositionApplicatorSystem.Default(this._defaultStyleCoordinator,t,"TopLeft",null);e.addPositionAndApplicator(o,a);var r=new AutotaskPositionSystem.BottomAlignedRight(4,9),s=new AutotaskPositionApplicatorSystem.Default(this._defaultStyleCoordinator,t,"BottomRight",null);e.addPositionAndApplicator(r,s);var l=new AutotaskPositionSystem.TopAlignedRight(4,-9),u=new AutotaskPositionApplicatorSystem.Default(this._defaultStyleCoordinator,t,"TopRight",null);return e.addPositionAndApplicator(l,u),e},e.prototype._itemClickListener=function(t){if(this._contentElement.classList.remove(this._activeCssClass),this.__hideWithoutDelay(),null!==this._itemSelectedDelegate&&null!==t.currentTarget){var e=t.currentTarget,n=e.getAttribute("data-icon-id"),i=e.getAttribute("data-icon-css");null!==n&&null!==i&&this._itemSelectedDelegate(n,i)}},e.prototype._selectIcon=function(t){for(var e=0;e<this._itemElements.length;e++)this._itemElements[e].classList.contains("Selected")?this._itemElements[e].classList.remove("Selected"):this._itemElements[e].getAttribute("data-icon-id")===t.toString()&&this._itemElements[e].classList.add("Selected")},e}(AutotaskOverlaySystem.ContextOverlay);t.IconPickerContextOverlay=e}(AutotaskOverlays||(AutotaskOverlays={})),function(t){var e=function(t){function e(e){var n=t.call(this,e,!0)||this;return n._defaultStyleCoordinator=new AutotaskOverlaySystem.DefaultStyleCoordinator(n._overlayElementStyleApplicator),n}return __extends(e,t),e.prototype.show=function(t){this._show(t)},Object.defineProperty(e.prototype,"_delayBeforeHiding",{get:function(){return 300},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_delayBeforeShowing",{get:function(){return 0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_styleCoordinator",{get:function(){return this._defaultStyleCoordinator},enumerable:!1,configurable:!0}),e.prototype._createPositionCoordinator=function(t){var e=new AutotaskOverlaySystem.PositionCoordinator,n=new AutotaskPositionSystem.BottomAlignedLeft(-12,10),i=new AutotaskPositionApplicatorSystem.Default(this._defaultStyleCoordinator,t,"BottomLeft",null);e.addPositionAndApplicator(n,i);var o=new AutotaskPositionSystem.BottomAlignedRight(12,10),a=new AutotaskPositionApplicatorSystem.Default(this._defaultStyleCoordinator,t,"BottomRight",null);e.addPositionAndApplicator(o,a);var r=new AutotaskPositionSystem.TopAlignedLeft(-12,-10),s=new AutotaskPositionApplicatorSystem.Default(this._defaultStyleCoordinator,t,"TopLeft",null);e.addPositionAndApplicator(r,s);var l=new AutotaskPositionSystem.TopAlignedRight(-12,-10),u=new AutotaskPositionApplicatorSystem.Default(this._defaultStyleCoordinator,t,"TopRight",null);return e.addPositionAndApplicator(l,u),e},e}(AutotaskOverlaySystem.ContextOverlay);t.InlineIconContextOverlay=e}(AutotaskOverlays||(AutotaskOverlays={})),function(t){var e=function(t){function e(e){var n=t.call(this,e,!0)||this;n._defaultStyleCoordinator=new AutotaskOverlaySystem.DefaultStyleCoordinator(n._overlayElementStyleApplicator);for(var i=AutotaskDomSystem.Document.getElementById(e),o=function(t){var e=t.dataset.quickTime,i=window.autotask.convert.stringToInteger(e);t.addEventListener("click",(function(){n._quickTimeElementClickListener(i)}))},a=0,r=Array.from(AutotaskDomSystem.Document.getElementsByAttributeName(i,"data-quick-time"));a<r.length;a++){o(r[a])}return n._selectionHandler=null,n}return __extends(e,t),e.prototype.hideWithoutDelay=function(){this.__hideWithoutDelay()},e.prototype.show=function(t,e){this._selectionHandler=e,this._show(t)},Object.defineProperty(e.prototype,"_delayBeforeHiding",{get:function(){return 500},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_delayBeforeShowing",{get:function(){return 0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_styleCoordinator",{get:function(){return this._defaultStyleCoordinator},enumerable:!1,configurable:!0}),e.prototype._createPositionCoordinator=function(t){var e=new AutotaskOverlaySystem.PositionCoordinator,n=new AutotaskPositionSystem.TopAlignedRight(4,-9),i=new AutotaskPositionApplicatorSystem.Default(this._defaultStyleCoordinator,t,"TopRight",null);e.addPositionAndApplicator(n,i);var o=new AutotaskPositionSystem.BottomAlignedRight(4,9),a=new AutotaskPositionApplicatorSystem.Default(this._defaultStyleCoordinator,t,"BottomRight",null);return e.addPositionAndApplicator(o,a),e},e.prototype._quickTimeElementClickListener=function(t){this._raiseSelectionEvent(t)},e.prototype._raiseSelectionEvent=function(t){null!==this._selectionHandler&&this._selectionHandler(t)},e}(AutotaskOverlaySystem.ContextOverlay);t.QuickTimeEntryContextOverlay=e}(AutotaskOverlays||(AutotaskOverlays={})),function(t){var e=function(){function t(t,e,n,i,o,a){this._name=t,this._pageCode=e,this._url=n,this._primaryParameterName=i,this._defaultPrimaryParameterValue=o,this._popupSettings=a,this._requestData=null}return t.prototype.__get_pageCode=function(){return this._pageCode},t.prototype.applyDynamicRequestData=function(t){this._requestData=t},t.prototype.open=function(t){var e=this._createForm(t);if(document.body.appendChild(e),null===this._popupSettings||window.autotask.browserDetection.isSafari())e.target="_blank";else{var n=this._popupSettings.__generateSettings();window.open("",this._name,n),e.target=this._name}e.submit(),null!==e.parentNode&&e.parentNode.removeChild(e)},t.prototype._createForm=function(t){var e=document.createElement("form");if(e.action=this._url,e.method="POST",null!==this._primaryParameterName&&(null!==t?e.appendChild(this._createInput(this._primaryParameterName,t)):null!==this._defaultPrimaryParameterValue&&e.appendChild(this._createInput(this._primaryParameterName,this._defaultPrimaryParameterValue))),null!==this._requestData)for(var n in this._requestData.__data)this._requestData.__data.hasOwnProperty(n)&&e.appendChild(this._createInput(n,this._requestData.__data[n]));return e},t.prototype._createInput=function(t,e){var n=document.createElement("input");return n.setAttribute("type","hidden"),n.setAttribute("name",t),null!==e&&n.setAttribute("value",e),n},t}();t.PostedPage=e}(AutotaskPageDirectorySystem||(AutotaskPageDirectorySystem={})),function(t){var e=function(t){function e(e,n,i){var o=t.call(this,e)||this;autotask.registerPage(o),o._isAuthenticated=n,o._headingElement=AutotaskDomSystem.Document.getElementByClassName("PageHeadingContainer"),o._headingHeight=o._headingElement.clientHeight,o._validationSummaryElement=o._headingElement.children[1],o._quickLaunchBarElement=AutotaskDomSystem.Document.getElementByClassName("QuickLaunchBar"),o._mainContainerElement=AutotaskDomSystem.Document.getElementByClassName("MainContainer"),o._leftSecondaryContainerElement=AutotaskDomSystem.Document.getChildElementByClassNames(o._mainContainerElement,["SecondaryContainer","Left"]),o._rightSecondaryContainerElement=AutotaskDomSystem.Document.getChildElementByClassNames(o._mainContainerElement,["SecondaryContainer","Right"]),window.addEventListener("keyup",(function(t){o._windowKeyUpListener(t)})),window.addEventListener("resize",(function(){o._windowResizeListener()})),window.addEventListener("scroll",(function(){o._windowScrollListener()}));var a=new window.AutotaskButtonEventsSystem.ButtonEventsManagement;return o._buttonEventsInternalPageFacade=new window.AutotaskButtonEventsSystem.InternalPageFacade(a),o._sessionExpirationManagement=new AutotaskSessionExpirationSystem.SessionExpirationManagement(e,!1,i),o._sessionExpirationInternalPageFacade=new AutotaskSessionExpirationSystem.InternalPageFacade(o._sessionExpirationManagement),o._activeCssClass="Active",o._isLeftSecondaryContainerActive=!0,o._keyUpHandlers=[],o._customValidationSummaryInstance=null,o._validationSummaryInstance=null,o}return __extends(e,t),Object.defineProperty(e.prototype,"customValidationSummary",{get:function(){return this._customValidationSummaryInstance},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"__buttonEvents",{get:function(){return this._buttonEventsInternalPageFacade},enumerable:!1,configurable:!0}),e.prototype.__get_headingHeight=function(){return this._headingHeight},e.prototype.get_observerRootTopMargin=function(){return this._headingHeight},Object.defineProperty(e.prototype,"__sessionExpiration",{get:function(){return this._sessionExpirationInternalPageFacade},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_validationSummary",{get:function(){return this._validationSummaryInstance},enumerable:!1,configurable:!0}),e.prototype.__addKeyUp=function(t){this._keyUpHandlers.push(t)},e.prototype.__toggleForcedCompactMode=function(t,e){var n="Compact";this._mainContainerElement.classList.contains(n)?this._mainContainerElement.classList.remove(n):this._mainContainerElement.classList.add(n);var i=(new RestrictedJsonPostRouteCreator).createRestrictedJsonPostRoute(t),o=new AutotaskRequestDataSystem.RequestData;o.addBoolean(e,this._mainContainerElement.classList.contains(n)),i.__makeRequest(o,null,!1)},e.prototype.__toggleSecondaryContainer=function(){var t="Active";this._isLeftSecondaryContainerActive?(this._leftSecondaryContainerElement.classList.remove(t),this._rightSecondaryContainerElement.classList.add(t),this._isLeftSecondaryContainerActive=!1):(this._rightSecondaryContainerElement.classList.remove(t),this._leftSecondaryContainerElement.classList.add(t),this._isLeftSecondaryContainerActive=!0)},e.prototype._activateLeftSecondaryContainer=function(){this._isLeftSecondaryContainerActive||this.__toggleSecondaryContainer()},e.prototype._initialize=function(){var t=this;this._isAuthenticated&&this._sessionExpirationManagement.__initialize(),this._validationSummaryInstance=autotask.find(this._validationSummaryElement.id),this._validationSummaryInstance.__addContentChanged((function(){t._validationSummaryContentChanged()})),this._validationSummaryInstance.__addVisibilityChanged((function(){t._validationSummaryVisibilityChanged()})),this._customValidationSummaryInstance=this._validationSummaryInstance.__get_customValidationSummary()},e.prototype._hideMainContainer=function(){this._mainContainerElement.classList.remove(this._activeCssClass)},e.prototype._showMainContainer=function(){this._mainContainerElement.classList.add(this._activeCssClass)},e.prototype._adjustHeadingLayout=function(){var t=this._headingElement.clientHeight;if(this._headingHeight!==t){this._headingHeight=t;var e=t.toString()+"px";document.body.style.paddingTop=e,this._quickLaunchBarElement.style.top=e}},e.prototype._raiseKeyUpEvent=function(t){for(var e=0,n=this._keyUpHandlers;e<n.length;e++){(0,n[e])(t)}},e.prototype._validationSummaryContentChanged=function(){this._adjustHeadingLayout()},e.prototype._validationSummaryVisibilityChanged=function(){this._adjustHeadingLayout()},e.prototype._windowKeyUpListener=function(t){this._raiseKeyUpEvent(t)},e.prototype._windowResizeListener=function(){this._adjustHeadingLayout()},e.prototype._windowScrollListener=function(){window.autotask.contextOverlayManagement.__hideVisibleContextOverlays()},e}(Autotask.LifecycleObject);t.AdvancedEntityPage=e}(AutotaskPages||(AutotaskPages={})),function(t){var e=function(t){function e(e,n,i,o,a,r,s,l,u){var c=t.call(this,e,l,u)||this;c._imageViewerId=n,c._quickEditPage=i,c._quickEditEventHandler=o,c._quickEditTokenValueParameterName=a,c._quickEditOffsetParameterName=r,c._dashboardPanelId=s,c._saveCoordinator=new AutotaskSaveCoordinatorSystem.EntityDetailSaveCoordinator;var d=new AutotaskDirtyStateSystem.DirtyStateManagement;return c._dirtyStatePageFacade=new AutotaskDirtyStateSystem.PageFacade(d),c._dirtyStateInternalPageFacade=new AutotaskDirtyStateSystem.InternalPageFacade(d),c._imageViewerInstance=null,c._quickEditStartingHandler=null,c._dashboardActiveCssClass="DashboardActive",c}return __extends(e,t),Object.defineProperty(e.prototype,"dirtyState",{get:function(){return this._dirtyStatePageFacade},enumerable:!1,configurable:!0}),e.prototype.get_saveCoordinator=function(){return this._saveCoordinator},Object.defineProperty(e.prototype,"__dirtyState",{get:function(){return this._dirtyStateInternalPageFacade},enumerable:!1,configurable:!0}),e.prototype.__get_imageViewer=function(){return this._imageViewerInstance},e.prototype.setQuickEditStarting=function(t){this._quickEditStartingHandler=t},e.prototype.__activateQuickEditing=function(t,e){var n=this,i=function(){if(null!==n._quickEditPage){autotask.overlayManagement.__showLoadingIndicator();var i=new AutotaskQuickEditSystem.QuickEditStartingEventArgs;i.data.addString(n._quickEditTokenValueParameterName,e),i.data.addInteger(n._quickEditOffsetParameterName,autotask.quickEditManagement.quickEditOffset(t,e)),null!==n._quickEditStartingHandler&&n._quickEditStartingHandler(i),n._quickEditPage.applyDynamicRequestData(i.data),n._quickEditPage.open(null)}},o=function(){n._saveCoordinator.beginSaving(i)};if(null!==this._quickEditEventHandler){var a=new AutotaskQuickEditSystem.QuickEditEventArgs(o);this._quickEditEventHandler(a)}else o()},e.prototype.__initialize=function(){var t=this;if(this._initialize(),this._imageViewerInstance=autotask.find(this._imageViewerId),null!==this._dashboardPanelId){var e=autotask.find(this._dashboardPanelId);e.addHidingHandler((function(){t._dashboardPanelHidingHandler()})),e.addShowingHandler((function(){t._dashboardPanelShowingHandler()}))}},e.prototype._dashboardPanelHidingHandler=function(){this._showMainContainer(),document.body.classList.remove(this._dashboardActiveCssClass)},e.prototype._dashboardPanelShowingHandler=function(){this._hideMainContainer(),document.body.classList.add(this._dashboardActiveCssClass)},e}(t.AdvancedEntityPage);t.AdvancedEntityDetailPage=e}(AutotaskPages||(AutotaskPages={})),function(t){var e=function(t){function e(e,n,i,o,a,r,s){var l=t.call(this,e,r,s)||this;l._postedContainerElement=AutotaskDomSystem.Document.getElementById(n);var u=new PostedContainerValidationCreator;l._postedContainerValidation=u.createValidation(l._postedContainerElement),l._imageViewerId=i,l._quickEditToken=o,l._quickEditOffset=a,l._saveCoordinator=new AutotaskSaveCoordinatorSystem.EntityEditSaveCoordinator((function(){return l._validatingHandler()}),(function(t){l._submittingHandler(t)}));var c=new AutotaskDirtyStateSystem.DirtyStateManagement;return l._dirtyStatePageFacade=new AutotaskDirtyStateSystem.PageFacade(c),l._dirtyStateInternalPageFacade=new AutotaskDirtyStateSystem.InternalPageFacade(c),l._immutableData=[],l._validatingHandlers={},l._validatingHandlerCount=0,l._imageViewerInstance=null,l._notificationSlideOut=null,l}return __extends(e,t),Object.defineProperty(e.prototype,"dirtyState",{get:function(){return this._dirtyStatePageFacade},enumerable:!1,configurable:!0}),e.prototype.get_saveCoordinator=function(){return this._saveCoordinator},Object.defineProperty(e.prototype,"__dirtyState",{get:function(){return this._dirtyStateInternalPageFacade},enumerable:!1,configurable:!0}),e.prototype.__get_imageViewer=function(){return this._imageViewerInstance},e.prototype.generateFieldData=function(){for(var t=new AutotaskRequestDataSystem.SerializedRequestData([this._postedContainerElement]),e=0,n=this._immutableData;e<n.length;e++){var i=n[e];t.__addImmutableData(i)}return t},e.prototype.validate=function(){return this._validate(!1)},e.prototype.__addImmutableData=function(t){this._immutableData.push(t)},e.prototype.__finalize=function(){this._postedContainerValidation.__parse(),null!==this._quickEditToken&&(autotask.quickEditManagement.scrollToToken(this._quickEditToken,this._quickEditOffset),autotask.overlayManagement.__hideLoadingIndicator())},e.prototype.__initialize=function(){var t=this;this._initialize(),this._imageViewerInstance=autotask.find(this._imageViewerId),this._validationSummary.__addValidationFailed((function(){t._validationFailedHandler()})),this._postedContainerValidation.__registerValidationSummary(this._validationSummary),null!==this._quickEditToken&&autotask.overlayManagement.__set_isLoadingIndicatorEnabledOnRender(!0)},e.prototype.__registerValidation=function(t,e){t.__registerValidationSummary(this._validationSummary);var n=this._validatingHandlerCount.toString();return this._validatingHandlerCount++,this._validatingHandlers[n]=e,n},e.prototype.__resetValidation=function(){this._postedContainerValidation.__reset(),this._validationSummary.__get_isActive()&&this._validate(!0)},e.prototype.__setNotificationSlideOut=function(t){this._notificationSlideOut=t},e.prototype.__unregisterValidatingHandler=function(t){delete this._validatingHandlers[t]},e.prototype._applyCustomValidation=function(t){this.customValidationSummary.clearMessages();for(var e=0,n=0,i=t;n<i.length;n++){var o=i[n];this.customValidationSummary.addMessage(e.toString(),o),e++}},e.prototype._submitSuccessHandler=function(t,e){this._applyCustomValidation(e.customValidationMessages);var n={};n.hasValidationFailure=e.customValidationMessages.length>0,n.responseData=e.responseData,t(n)},e.prototype._submittingHandler=function(t){var e=this;if(null!==this._notificationSlideOut){var n=this._notificationSlideOut.get_panel();t.data.addFieldData(n.__get_postingModelParameterName(),n.__createSerializedRequestData())}(new SubmitRouteCreator).createSubmitRoute(t.url).makeRequest(t.data,(function(n){e._submitSuccessHandler(t.successHandler,n)}))},e.prototype._validate=function(t){var e=this._postedContainerValidation.__validate();for(var n in e||this._postedContainerValidation.__validationFailed(),this._postedContainerValidation.__validationCompleted(e,t),this._validatingHandlers)this._validatingHandlers.hasOwnProperty(n)&&(e=this._validatingHandlers[n](t)&&e);return e},e.prototype._validatingHandler=function(){return this._validate(!1)},e.prototype._validationFailedHandler=function(){null!==this._notificationSlideOut&&this._notificationSlideOut.hide()},e}(t.AdvancedEntityPage);t.AdvancedEntityEditPage=e}(AutotaskPages||(AutotaskPages={})),function(t){var e=function(t){function e(e,n,i){var o=t.call(this,e)||this;autotask.registerPage(o),o._isAuthenticated=n;var a=new window.AutotaskButtonEventsSystem.ButtonEventsManagement;return o._buttonEvents=new window.AutotaskButtonEventsSystem.InternalPageFacade(a),o._sessionExpirationManagement=new AutotaskSessionExpirationSystem.SessionExpirationManagement(e,!1,i),o._sessionExpiration=new AutotaskSessionExpirationSystem.InternalPageFacade(o._sessionExpirationManagement),o}return __extends(e,t),Object.defineProperty(e.prototype,"__buttonEvents",{get:function(){return this._buttonEvents},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"__sessionExpiration",{get:function(){return this._sessionExpiration},enumerable:!1,configurable:!0}),e.prototype.__initialize=function(){this._isAuthenticated&&!autotask.windowManagement.isWindowInWorkspace()&&this._sessionExpirationManagement.__initialize()},e}(Autotask.LifecycleObject);t.BoardPage=e}(AutotaskPages||(AutotaskPages={})),function(t){var e=function(){function t(t,e,n,i,o,a,r){var s=this;autotask.instanceManagement.__addRegistrationKey(this,t),autotask.registerPage(this),this._navigationContentInstanceId=e,this._navigationContentTrackingKey=n,this._primaryContentTrackingKey=i,this._imageViewerId=o,this._isAuthenticated=a;var l=document.body.firstElementChild.children[1];this._scrollingContainer=l.firstElementChild,this._scrollingContainer.addEventListener("scroll",(function(){s._scrollListener()}));var u=new window.AutotaskButtonEventsSystem.ButtonEventsManagement;this._buttonEvents=new window.AutotaskButtonEventsSystem.InternalPageFacade(u);var c=new AutotaskDirtyStateSystem.DirtyStateManagement;this._dirtyStatePageFacade=new AutotaskDirtyStateSystem.PageFacade(c),this._dirtyStateInternalPageFacade=new AutotaskDirtyStateSystem.InternalPageFacade(c),this._sessionExpirationManagement=new AutotaskSessionExpirationSystem.SessionExpirationManagement(t,!1,r),this._sessionExpiration=new AutotaskSessionExpirationSystem.InternalPageFacade(this._sessionExpirationManagement),this._imageViewer=null,this._navigationContentInstanceTracker=null,this._primaryContentInstanceTracker=null,this._navigationContent=null,this._isDocumentsNavigatorSelected=!1,this._isExpirationsNavigatorSelected=!1,this._isOverviewNavigatorSelected=!1,this._selectedChooserKey=null,this._selectedNestedChooserKey=null,this._expandedNestedChooserKeys=[]}return Object.defineProperty(t.prototype,"dirtyState",{get:function(){return this._dirtyStatePageFacade},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"__buttonEvents",{get:function(){return this._buttonEvents},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"__dirtyState",{get:function(){return this._dirtyStateInternalPageFacade},enumerable:!1,configurable:!0}),t.prototype.__get_imageViewer=function(){return this._imageViewer},Object.defineProperty(t.prototype,"__sessionExpiration",{get:function(){return this._sessionExpiration},enumerable:!1,configurable:!0}),t.prototype.replaceNavigationContent=function(t,e){var n=this,i=this._navigationContent;this._isDocumentsNavigatorSelected=i.isDocumentsNavigatorSelected,this._isExpirationsNavigatorSelected=i.isExpirationsNavigatorSelected,this._isOverviewNavigatorSelected=i.isOverviewNavigatorSelected,this._selectedChooserKey=i.selectedChooserKey,this._selectedNestedChooserKey=i.selectedNestedChooserKey,this._expandedNestedChooserKeys=i.expandedNestedChooserKeys,e.__makeRequest(t,(function(t,e,i){n._replaceNavigationContentSuccess(t,e,i)}))},t.prototype.replacePrimaryContent=function(t,e){var n=this;e.__makeRequest(t,(function(t,e){n._replacePrimaryContentSuccess(t,e)}))},t.prototype.__initialize=function(){this._navigationContent=autotask.find(this._navigationContentInstanceId),this._navigationContentInstanceTracker=autotask.instanceTrackerManagement.__findInstanceTracker(this._navigationContentTrackingKey),this._primaryContentInstanceTracker=autotask.instanceTrackerManagement.__findInstanceTracker(this._primaryContentTrackingKey),this._isAuthenticated&&!autotask.windowManagement.isWindowInWorkspace()&&this._sessionExpirationManagement.__initialize(),this._imageViewer=autotask.find(this._imageViewerId)},t.prototype._replaceNavigationContentSuccess=function(t,e,n){this._navigationContentInstanceTracker.__loadHtmlAndJavaScript(e,n);var i=autotask.find(t);this._isOverviewNavigatorSelected?i.selectOverviewNavigator():this._isExpirationsNavigatorSelected?i.selectExpirationsNavigator():null!==this._selectedChooserKey?i.selectChooser(this._selectedChooserKey):this._isDocumentsNavigatorSelected?i.selectDocumentsNavigator():null!==this._selectedNestedChooserKey&&i.selectNestedChooser(this._selectedNestedChooserKey),i.expandNestedChooser(this._expandedNestedChooserKeys),this._navigationContent=i},t.prototype._replacePrimaryContentSuccess=function(t,e){this._primaryContentInstanceTracker.__loadHtmlAndJavaScript(t,e),this._scrollingContainer.scrollTop=0},t.prototype._scrollListener=function(){window.autotask.contextOverlayManagement.__hideVisibleContextOverlays()},t}();t.DocumentationManagerPage=e}(AutotaskPages||(AutotaskPages={})),function(t){var e=function(t){function e(e,n,i,o){var a=t.call(this,e)||this;autotask.registerPage(a),a._fieldContainerElement=AutotaskDomSystem.Document.getElementById(n),a._isAuthenticated=i,document.body.firstElementChild.children[1].addEventListener("scroll",(function(){a._scrollListener()}));var r=new window.AutotaskButtonEventsSystem.ButtonEventsManagement;a._buttonEventsInternalPageFacade=new window.AutotaskButtonEventsSystem.InternalPageFacade(r);var s=new AutotaskDirtyStateSystem.DirtyStateManagement;return a._dirtyStatePageFacade=new AutotaskDirtyStateSystem.PageFacade(s),a._dirtyStateInternalPageFacade=new AutotaskDirtyStateSystem.InternalPageFacade(s),a._sessionExpirationManagement=new AutotaskSessionExpirationSystem.SessionExpirationManagement(e,!1,o),a._sessionExpirationInternalPageFacade=new AutotaskSessionExpirationSystem.InternalPageFacade(a._sessionExpirationManagement),a._customValidationSummaryInstance=null,a._validationSummaryInstance=null,a}return __extends(e,t),Object.defineProperty(e.prototype,"customValidationSummary",{get:function(){return this._customValidationSummaryInstance},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dirtyState",{get:function(){return this._dirtyStatePageFacade},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"__buttonEvents",{get:function(){return this._buttonEventsInternalPageFacade},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"__dirtyState",{get:function(){return this._dirtyStateInternalPageFacade},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"__sessionExpiration",{get:function(){return this._sessionExpirationInternalPageFacade},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_validationSummary",{get:function(){return this._validationSummaryInstance},enumerable:!1,configurable:!0}),e.prototype._initialize=function(){this._isAuthenticated&&this._sessionExpirationManagement.__initialize(),this._validationSummaryInstance=autotask.validationSummaryManagement.__findValidationSummaryUsingElement(this._fieldContainerElement),this._customValidationSummaryInstance=this._validationSummary.__get_customValidationSummary()},e.prototype._scrollListener=function(){window.autotask.contextOverlayManagement.__hideVisibleContextOverlays()},e}(Autotask.LifecycleObject);t.SimpleEntityPage=e}(AutotaskPages||(AutotaskPages={})),function(t){var e=function(t){function e(e,n,i,o,a,r){var s=t.call(this,e,n,o,a)||this;return s._imageViewerId=i,s._shellContentId=r,s._imageViewer=null,s._shellContentInstance=null,s}return __extends(e,t),Object.defineProperty(e.prototype,"saveCoordinator",{get:function(){return this._shellContent.saveCoordinator},enumerable:!1,configurable:!0}),e.prototype.__get_imageViewer=function(){return this._imageViewer},Object.defineProperty(e.prototype,"_shellContent",{get:function(){return this._shellContentInstance},enumerable:!1,configurable:!0}),e.prototype.__initialize=function(){t.prototype._initialize.call(this),this._imageViewer=autotask.find(this._imageViewerId),this._shellContentInstance=autotask.find(this._shellContentId)},e}(t.SimpleEntityPage);t.SimpleEntityDetailPage=e}(AutotaskPages||(AutotaskPages={})),function(t){var e=function(t){function e(e,n,i,o,a,r){var s=t.call(this,e,n,o,a)||this;return s._imageViewerId=i,s._shellContentId=r,s._imageViewer=null,s._shellContentInstance=null,s}return __extends(e,t),Object.defineProperty(e.prototype,"saveCoordinator",{get:function(){return this._shellContent.saveCoordinator},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_shellContent",{get:function(){return this._shellContentInstance},enumerable:!1,configurable:!0}),e.prototype.__get_imageViewer=function(){return this._imageViewer},e.prototype.generateFieldData=function(){return this._shellContent.generateFieldData()},e.prototype.validate=function(){return this._shellContent.validate(!1)},e.prototype.validateEditor=function(t){return this._shellContent.__validateEditor(t)},e.prototype.__finalize=function(){this._shellContent.prepareValidation(this._validationSummary)},e.prototype.__initialize=function(){var e=this;t.prototype._initialize.call(this),this._imageViewer=autotask.find(this._imageViewerId),this._shellContentInstance=autotask.find(this._shellContentId),this._shellContentInstance.submittedHandler=function(t){e._submittedHandler(t)}},e.prototype.__resetValidation=function(){this._shellContent.resetValidation(),this._validationSummary.__get_isActive()&&this._shellContent.validate(!0)},e.prototype._submittedHandler=function(t){this.customValidationSummary.clearMessages();for(var e=0,n=0,i=t;n<i.length;n++){var o=i[n];this.customValidationSummary.addMessage(e.toString(),o),e++}},e}(t.SimpleEntityPage);t.SimpleEntityEditPage=e}(AutotaskPages||(AutotaskPages={})),function(t){var e=function(t){function e(e,n,i,o,a){var r=t.call(this,e,n,i,o)||this;return r._shellContentId=a,r._shellContentInstance=null,r}return __extends(e,t),Object.defineProperty(e.prototype,"saveCoordinator",{get:function(){return this._shellContent.saveCoordinator},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_shellContent",{get:function(){return this._shellContentInstance},enumerable:!1,configurable:!0}),e.prototype.generateFieldData=function(){return this._shellContent.generateFieldData()},e.prototype.validate=function(){return this._shellContent.validate(!1)},e.prototype.validateEditor=function(t){return this._shellContent.__validateEditor(t)},e.prototype.__finalize=function(){this._shellContent.prepareValidation(this._validationSummary)},e.prototype.__initialize=function(){var e=this;t.prototype._initialize.call(this),this._shellContentInstance=autotask.find(this._shellContentId),this._shellContentInstance.submittedHandler=function(t){e._submittedHandler(t)}},e.prototype.__resetValidation=function(){this._shellContent.resetValidation(),this._validationSummary.__get_isActive()&&this._shellContent.validate(!0)},e.prototype._submittedHandler=function(t){this.customValidationSummary.clearMessages();for(var e=0,n=0,i=t;n<i.length;n++){var o=i[n];this.customValidationSummary.addMessage(e.toString(),o),e++}},e}(t.SimpleEntityPage);t.SimpleEntityNewPage=e}(AutotaskPages||(AutotaskPages={})),function(t){var e=function(t){function e(e,n,i,o,a,r,s,l,u,c,d){var h=t.call(this,e)||this;autotask.registerPage(h),h._titleBarId=n,h._menuId=i,h._menuContentTrackingKey=o,h._permanentHelpId=a,h._permanentPrimaryContentElement=AutotaskDomSystem.Document.getElementById(r),h._permanentPrimaryContentTrackingKey=s,h._replaceablePrimaryContentElement=AutotaskDomSystem.Document.getElementById(l),h._replaceablePrimaryContentTrackingKey=u,h._isAuthenticated=c;var _=new window.AutotaskButtonEventsSystem.ButtonEventsManagement;h._buttonEvents=new window.AutotaskButtonEventsSystem.InternalPageFacade(_);var p=new AutotaskDirtyStateSystem.DirtyStateManagement;return h._dirtyStatePageFacade=new AutotaskDirtyStateSystem.PageFacade(p),h._dirtyStateInternalPageFacade=new AutotaskDirtyStateSystem.InternalPageFacade(p),h._sessionExpirationManagement=new AutotaskSessionExpirationSystem.SessionExpirationManagement(e,!1,d),h._sessionExpiration=new AutotaskSessionExpirationSystem.InternalPageFacade(h._sessionExpirationManagement),h._activeCssClass="Active",h._menu=null,h._menuContentInstanceTracker=null,h._permanentPrimaryContentInstanceTracker=null,h._resetValidationHandlers={},h._replaceablePrimaryContentInstanceTracker=null,h._titleBar=null,h}return __extends(e,t),Object.defineProperty(e.prototype,"dirtyState",{get:function(){return this._dirtyStatePageFacade},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"__buttonEvents",{get:function(){return this._buttonEvents},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"__dirtyState",{get:function(){return this._dirtyStateInternalPageFacade},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"__sessionExpiration",{get:function(){return this._sessionExpiration},enumerable:!1,configurable:!0}),e.prototype.replaceMenuContent=function(t,e){var n=this;e.__makeRequest(t,(function(t,e,i){n._replaceMenuContentSuccessHandler(t,e,i)}))},e.prototype.replacePermanentPrimaryContent=function(t,e){var n=this;e.__makeRequest(t,(function(t,e,i){n._replacePermanentPrimaryContentSuccessHandler(t,e,i)}))},e.prototype.replacePrimaryContent=function(t,e){var n=this;e.__makeRequest(t,(function(t,e,i){n._replacePrimaryContentSuccessHandler(t,e,i)}))},e.prototype.selectMenuItem=function(t){this._menu.select(t)},e.prototype.showPermanentPrimaryContent=function(){this._replaceablePrimaryContentElement.classList.toggle(this._activeCssClass),this._permanentPrimaryContentElement.classList.toggle(this._activeCssClass),this._titleBar.replaceHelpId(this._permanentHelpId),this._replaceablePrimaryContentInstanceTracker.__clear();for(var t=this._permanentPrimaryContentElement.querySelectorAll(".Grid"),e=0;e<t.length;e++){autotask.find(t[e].id).__initializeLayout()}},e.prototype.__addResetValidationHandler=function(t,e){this._resetValidationHandlers[t]=e},e.prototype.__initialize=function(){this._titleBar=autotask.find(this._titleBarId),this._menu=autotask.find(this._menuId),this._menuContentInstanceTracker=autotask.instanceTrackerManagement.__findInstanceTracker(this._menuContentTrackingKey),this._permanentPrimaryContentInstanceTracker=autotask.instanceTrackerManagement.__findInstanceTracker(this._permanentPrimaryContentTrackingKey),this._replaceablePrimaryContentInstanceTracker=autotask.instanceTrackerManagement.__findInstanceTracker(this._replaceablePrimaryContentTrackingKey),this._isAuthenticated&&!autotask.windowManagement.isWindowInWorkspace()&&this._sessionExpirationManagement.__initialize()},e.prototype.__removeResetValidationHandler=function(t){delete this._resetValidationHandlers[t]},e.prototype.__resetValidation=function(){this._raiseResetValidationEvent()},e.prototype._raiseResetValidationEvent=function(){for(var t in this._resetValidationHandlers)this._resetValidationHandlers.hasOwnProperty(t)&&this._resetValidationHandlers[t]()},e.prototype._replaceMenuContentSuccessHandler=function(t,e,n){var i=this._menu,o=i.selectedKey,a=i.collapsedMenuKeys;this._menuContentInstanceTracker.__loadHtmlAndJavaScript(e,n),this._menu=autotask.find(t),this._menu.select(o),this._menu.collapse(a)},e.prototype._replacePermanentPrimaryContentSuccessHandler=function(t,e,n){this._permanentPrimaryContentInstanceTracker.__loadHtmlAndJavaScript(t,e),this._replaceablePrimaryContentElement.classList.contains(this._activeCssClass)&&(this._replaceablePrimaryContentElement.classList.toggle(this._activeCssClass),this._permanentPrimaryContentElement.classList.toggle(this._activeCssClass)),this._titleBar.replaceHelpId(n)},e.prototype._replacePrimaryContentSuccessHandler=function(t,e,n){this._replaceablePrimaryContentInstanceTracker.__loadHtmlAndJavaScript(t,e),this._permanentPrimaryContentElement.classList.contains(this._activeCssClass)&&(this._permanentPrimaryContentElement.classList.toggle(this._activeCssClass),this._replaceablePrimaryContentElement.classList.toggle(this._activeCssClass)),this._titleBar.replaceHelpId(n)},e}(Autotask.LifecycleObject);t.SummaryPage=e}(AutotaskPages||(AutotaskPages={})),function(t){var e=function(){function t(t,e,n,i,o,a,r,s,l,u,c,d,h,_,p){this._timeOrigin=l,this._domainLookupStart=t,this._domainLookupEnd=e,this._connectStart=n,this._connectEnd=i,this._requestStart=o,this._responseStart=a,this._responseEnd=r,this._transferSize=s,this._url=u,this._serverApplicationDuration=c,this._serverDatabaseRetrievalDuration=d,this._serverDatabaseUpdateDuration=h,this._startTime=_,this._performanceTrackingKey=p}return t.__fromPerformanceEntry=function(e){for(var n=e.serverTiming,i=0,o=0,a=0,r="",s=0;s<n.length;s++){var l=n[s];switch(l.name){case"app":i=l.duration;break;case"dbupd":a=l.duration;break;case"dbret":o=l.duration;break;case"ts":r=l.duration.toString()}}return new t(e.domainLookupStart,e.domainLookupEnd,e.connectStart,e.connectEnd,e.requestStart,e.responseStart,e.responseEnd,e.transferSize,performance.timeOrigin,e.name,i,o,a,e.startTime,r)},t.__fromJson=function(e){var n=JSON.parse(e);return new t(n._domainLookupStart,n._domainLookupEnd,n._connectStart,n._connectEnd,n._requestStart,n._responseStart,n._responseEnd,n._transferSize,n._timeOrigin,n._url,n._serverApplicationDuration,n._serverDatabaseRetrievalDuration,n._serverDatabaseUpdateDuration,n._startTime,n._performanceTrackingKey)},t.prototype.__toJson=function(){return JSON.stringify(this)},t.prototype.__toRequestDataDictionary=function(){var t=new AutotaskRequestDataSystem.RequestDataDictionary;return t.addInteger("timeOrigin",this._timeOrigin),t.addDecimal("domainLookupStart",this._domainLookupStart),t.addDecimal("domainLookupEnd",this._domainLookupEnd),t.addDecimal("connectStart",this._connectStart),t.addDecimal("connectEnd",this._connectEnd),t.addDecimal("requestStart",this._requestStart),t.addDecimal("responseStart",this._responseStart),t.addDecimal("responseEnd",this._responseEnd),t.addInteger("transferSize",this._transferSize),t.addString("url",this._url),t.addString("performanceTrackingKey",this._performanceTrackingKey),t.addInteger("serverApplicationDuration",this._serverApplicationDuration),t.addInteger("serverDatabaseRetrievalDuration",this._serverDatabaseRetrievalDuration),t.addInteger("serverDatabaseUpdateDuration",this._serverDatabaseUpdateDuration),t.addDecimal("startTime",this._startTime),t},t}();t.AjaxPerformanceLog=e}(AutotaskPerformanceInstrumentationSystem||(AutotaskPerformanceInstrumentationSystem={})),function(t){var e=function(){function t(t){this._performanceTrackingKey=t,this._createFrameworkInstancesEnd=0,this._createFrameworkInstancesStart=0,this._createAndInitializeViewInstancesEnd=0,this._createAndInitializeViewInstancesStart=0,this._executeLifeCycleCompleteEventEnd=0,this._executeLifeCycleCompleteEventStart=0,this._executeLifeCycleEnd=0,this._executeLifeCycleStart=0,this._finalInitializationEnd=0,this._finalInitializationStart=0,this._firstInitializationEnd=0,this._firstInitializationStart=0,this._intermediateInitializationEnd=0,this._intermediateInitializationStart=0,this._notifyWorkspaceEnd=0,this._notifyWorkspaceStart=0,this._raiseFrameworkLoadedEnd=0,this._raiseFrameworkLoadedStart=0,this._startTime=performance.now(),this._timeOrigin=performance.timeOrigin}return t.__fromJson=function(e){var n=JSON.parse(e),i=new t(n._performanceTrackingKey);return i._createFrameworkInstancesEnd=n._createFrameworkInstancesEnd,i._createFrameworkInstancesStart=n._createFrameworkInstancesStart,i._createAndInitializeViewInstancesEnd=n._createAndInitializeViewInstancesEnd,i._createAndInitializeViewInstancesStart=n._createAndInitializeViewInstancesStart,i._executeLifeCycleCompleteEventEnd=n._executeLifeCycleCompleteEventEnd,i._executeLifeCycleCompleteEventStart=n._executeLifeCycleCompleteEventStart,i._executeLifeCycleEnd=n._executeLifeCycleEnd,i._executeLifeCycleStart=n._executeLifeCycleStart,i._finalInitializationEnd=n._finalInitializationEnd,i._finalInitializationStart=n._finalInitializationStart,i._firstInitializationEnd=n._firstInitializationEnd,i._firstInitializationStart=n._firstInitializationStart,i._intermediateInitializationEnd=n._intermediateInitializationEnd,i._intermediateInitializationStart=n._intermediateInitializationStart,i._notifyWorkspaceEnd=n._notifyWorkspaceEnd,i._notifyWorkspaceStart=n._notifyWorkspaceStart,i._raiseFrameworkLoadedEnd=n._raiseFrameworkLoadedEnd,i._raiseFrameworkLoadedStart=n._raiseFrameworkLoadedStart,i._startTime=n._startTime,i._timeOrigin=n._timeOrigin,i},t.prototype.__markCreateFrameworkInstancesEnd=function(){this._createFrameworkInstancesEnd=performance.now()},t.prototype.__markCreateFrameworkInstancesStart=function(){this._createFrameworkInstancesStart=performance.now()},t.prototype.__markCreateAndInitializeViewInstancesEnd=function(){this._createAndInitializeViewInstancesEnd=performance.now()},t.prototype.__markCreateAndInitializeViewInstancesStart=function(){this._createAndInitializeViewInstancesStart=performance.now()},t.prototype.__markExecuteLifeCycleCompleteEventEnd=function(){this._executeLifeCycleCompleteEventEnd=performance.now()},t.prototype.__markExecuteLifeCycleCompleteEventStart=function(){this._executeLifeCycleCompleteEventStart=performance.now()},t.prototype.__markExecuteLifeCycleEnd=function(){this._executeLifeCycleEnd=performance.now()},t.prototype.__markExecuteLifeCycleStart=function(){this._executeLifeCycleStart=performance.now()},t.prototype.__markFinalInitializationEnd=function(){this._finalInitializationEnd=performance.now()},t.prototype.__markFinalInitializationStart=function(){this._finalInitializationStart=performance.now()},t.prototype.__markFirstInitializationEnd=function(){this._firstInitializationEnd=performance.now()},t.prototype.__markFirstInitializationStart=function(){this._firstInitializationStart=performance.now()},t.prototype.__markIntermediateInitializationEnd=function(){this._intermediateInitializationEnd=performance.now()},t.prototype.__markIntermediateInitializationStart=function(){this._intermediateInitializationStart=performance.now()},t.prototype.__markNotifyWorkspaceEnd=function(){this._notifyWorkspaceEnd=performance.now()},t.prototype.__markNotifyWorkspaceStart=function(){this._notifyWorkspaceStart=performance.now()},t.prototype.__markRaiseFrameworkLoadedEnd=function(){this._raiseFrameworkLoadedEnd=performance.now()},t.prototype.__markRaiseFrameworkLoadedStart=function(){this._raiseFrameworkLoadedStart=performance.now()},t.prototype.__toJson=function(){return JSON.stringify(this)},t.prototype.__toRequestDataDictionary=function(){var t=new AutotaskRequestDataSystem.RequestDataDictionary;return t.addInteger("timeOrigin",this._timeOrigin),t.addString("performanceTrackingKey",this._performanceTrackingKey),t.addDecimal("startTime",this._startTime),t.addDecimal("createFrameworkInstancesEnd",this._createFrameworkInstancesEnd),t.addDecimal("createFrameworkInstancesStart",this._createFrameworkInstancesStart),t.addDecimal("createAndInitializeViewInstancesEnd",this._createAndInitializeViewInstancesEnd),t.addDecimal("createAndInitializeViewInstancesStart",this._createAndInitializeViewInstancesStart),t.addDecimal("executeLifeCycleCompleteEventEnd",this._executeLifeCycleCompleteEventEnd),t.addDecimal("executeLifeCycleCompleteEventStart",this._executeLifeCycleCompleteEventStart),t.addDecimal("executeLifeCycleEnd",this._executeLifeCycleEnd),t.addDecimal("executeLifeCycleStart",this._executeLifeCycleStart),t.addDecimal("finalInitializationEnd",this._finalInitializationEnd),t.addDecimal("finalInitializationStart",this._finalInitializationStart),t.addDecimal("firstInitializationEnd",this._firstInitializationEnd),t.addDecimal("firstInitializationStart",this._firstInitializationStart),t.addDecimal("intermediateInitializationEnd",this._intermediateInitializationEnd),t.addDecimal("intermediateInitializationStart",this._intermediateInitializationStart),t.addDecimal("notifyWorkspaceEnd",this._notifyWorkspaceEnd),t.addDecimal("notifyWorkspaceStart",this._notifyWorkspaceStart),t.addDecimal("raiseFrameworkLoadedEnd",this._raiseFrameworkLoadedEnd),t.addDecimal("raiseFrameworkLoadedStart",this._raiseFrameworkLoadedStart),t},t}();t.FrameworkLifeCycleLog=e}(AutotaskPerformanceInstrumentationSystem||(AutotaskPerformanceInstrumentationSystem={})),function(t){var e=function(){function t(t,e,n,i,o,a,r,s,l,u,c,d,h,_,p,m,f,y,g,v){this._connectEnd=t,this._connectStart=e,this._domainLookupStart=n,this._domainLookupEnd=i,this._documentComplete=o,this._documentContentLoadedEventEnd=a,this._documentContentLoadedEventStart=r,this._documentInteractive=s,this._performanceTrackingKey=l,this._requestStart=u,this._responseStart=c,this._responseEnd=d,this._serverApplicationDuration=h,this._serverDatabaseRetrievalDuration=_,this._serverDatabaseUpdateDuration=p,this._startTime=m,this._timeOrigin=f,this._transferSize=y,this._type=g,this._url=v}return t.__fromPerformanceEntry=function(e){for(var n=e.serverTiming,i=0,o=0,a=0,r="",s=0;s<n.length;s++){var l=n[s];switch(l.name){case"app":i=l.duration;break;case"dbupd":a=l.duration;break;case"dbret":o=l.duration;break;case"ts":r=l.duration.toString()}}return new t(e.connectEnd,e.connectStart,e.domainLookupStart,e.domainLookupEnd,e.domComplete,e.domContentLoadedEventEnd,e.domContentLoadedEventStart,e.domInteractive,r,e.requestStart,e.responseStart,e.responseEnd,i,o,a,e.startTime,performance.timeOrigin,e.transferSize,e.type,e.name)},t.__fromJson=function(e){var n=JSON.parse(e);return new t(n._connectEnd,n._connectStart,n._domainLookupStart,n._domainLookupEnd,n._documentComplete,n._documentContentLoadedEventEnd,n._documentContentLoadedEventStart,n._documentInteractive,n._performanceTrackingKey,n._requestStart,n._responseStart,n._responseEnd,n._serverApplicationDuration,n._serverDatabaseRetrievalDuration,n._serverDatabaseUpdateDuration,n._startTime,n._timeOrigin,n._transferSize,n._type,n._url)},t.prototype.__toJson=function(){return JSON.stringify(this)},t.prototype.__toRequestDataDictionary=function(){var t=new AutotaskRequestDataSystem.RequestDataDictionary;return t.addDecimal("connectEnd",this._connectEnd),t.addDecimal("connectStart",this._connectStart),t.addDecimal("domainLookupStart",this._domainLookupStart),t.addDecimal("domainLookupEnd",this._domainLookupEnd),t.addDecimal("documentComplete",this._documentComplete),t.addDecimal("documentContentLoadedEventEnd",this._documentContentLoadedEventEnd),t.addDecimal("documentContentLoadedEventStart",this._documentContentLoadedEventStart),t.addDecimal("documentInteractive",this._documentInteractive),t.addString("performanceTrackingKey",this._performanceTrackingKey),t.addDecimal("requestStart",this._requestStart),t.addDecimal("responseStart",this._responseStart),t.addDecimal("responseEnd",this._responseEnd),t.addInteger("serverApplicationDuration",this._serverApplicationDuration),t.addInteger("serverDatabaseRetrievalDuration",this._serverDatabaseRetrievalDuration),t.addInteger("serverDatabaseUpdateDuration",this._serverDatabaseUpdateDuration),t.addDecimal("startTime",this._startTime),t.addInteger("timeOrigin",this._timeOrigin),t.addInteger("transferSize",this._transferSize),t.addString("type",this._type),t.addString("url",this._url),t},t}();t.PagePerformanceLog=e}(AutotaskPerformanceInstrumentationSystem||(AutotaskPerformanceInstrumentationSystem={})),function(t){var e=function(){function t(t){this._name=t,this._startTime=null,this._endTime=null}return t.__fromJson=function(e){var n=JSON.parse(e),i=new t(n._name);return i._endTime=n._endTime,i._startTime=n._startTime,i},t.prototype.__start=function(){this._startTime=performance.timeOrigin+performance.now()},t.prototype.__stop=function(){this._endTime=performance.timeOrigin+performance.now()},t.prototype.__toJson=function(){return JSON.stringify(this)},t.prototype.__toRequestData=function(){var t=new AutotaskRequestDataSystem.RequestData;return t.addString("name",this._name),t.addInteger("workflowStart",this._startTime),t.addInteger("workflowEnd",this._endTime),t},t}();t.PerformanceWorkflow=e}(AutotaskPerformanceInstrumentationSystem||(AutotaskPerformanceInstrumentationSystem={})),function(t){var e=function(){function t(t,e,n,i){this._workflow=t,this._pageLogs=e,this._ajaxLogs=n,this._frameworkLifeCycleLogs=i}return t.prototype.__createRequestData=function(){for(var t=this._workflow.__toRequestData(),e=0;e<this._pageLogs.length;e++){var n=this._pageLogs[e].__toRequestDataDictionary();t.addDataDictionary("pagePerformanceLogs["+e.toString(10)+"]",n)}for(e=0;e<this._ajaxLogs.length;e++){n=this._ajaxLogs[e].__toRequestDataDictionary();t.addDataDictionary("ajaxPerformanceLogs["+e.toString(10)+"]",n)}for(e=0;e<this._frameworkLifeCycleLogs.length;e++){n=this._frameworkLifeCycleLogs[e].__toRequestDataDictionary();t.addDataDictionary("frameworkLifeCycleLogs["+e.toString(10)+"]",n)}return t},t}();t.PerformanceWorkflowPostedData=e}(AutotaskPerformanceInstrumentationSystem||(AutotaskPerformanceInstrumentationSystem={})),function(t){var e=function(){function t(t){this._continueDelegate=t}return t.prototype.continue=function(){this._continueDelegate()},t}();t.QuickEditEventArgs=e}(AutotaskQuickEditSystem||(AutotaskQuickEditSystem={})),function(t){var e=function(){function t(){this._data=new AutotaskRequestDataSystem.RequestData}return Object.defineProperty(t.prototype,"data",{get:function(){return this._data},enumerable:!1,configurable:!0}),t}();t.QuickEditStartingEventArgs=e}(AutotaskQuickEditSystem||(AutotaskQuickEditSystem={})),function(t){var e=function(t){function e(e,n){var i=t.call(this,e)||this;return i._valueElement=AutotaskDomSystem.Document.getElementById(e),i._numberOfDecimalPlaces=n,i}return __extends(e,t),Object.defineProperty(e.prototype,"value",{set:function(t){var e;this._valueElement.innerText=null!==(e=this._convertNumberToString(t))&&void 0!==e?e:""},enumerable:!1,configurable:!0}),e.prototype._convertNumberToString=function(t){var e=null;return null!==t&&(e=window.autotask.convert.decimalToString(t,this._numberOfDecimalPlaces,!0)),e},e}(Autotask.LifecycleObject);t.Decimal=e}(AutotaskReadOnlyDataSystem||(AutotaskReadOnlyDataSystem={})),function(t){var e=function(t){function e(e){var n=t.call(this,e)||this;return n._valueElement=AutotaskDomSystem.Document.getElementById(e),n}return __extends(e,t),Object.defineProperty(e.prototype,"value",{set:function(t){this._valueElement.firstElementChild.innerText=null!=t?t:""},enumerable:!1,configurable:!0}),e}(Autotask.LifecycleObject);t.FormatPreservationText=e}(AutotaskReadOnlyDataSystem||(AutotaskReadOnlyDataSystem={})),function(t){var e=function(t){function e(e,n,i,o){var a=t.call(this,e)||this;return a._valueElement=AutotaskDomSystem.Document.getElementById(e),a._numberOfDecimalPlaces=n,a._hoursAbbreviation=i,a._minutesAbbreviation=o,a}return __extends(e,t),Object.defineProperty(e.prototype,"value",{set:function(t){var e="";if(null!==t){var n=t/60,i=n<0?Math.ceil(n):Math.floor(n),o=t%60;e=window.autotask.convert.decimalToString(n,this._numberOfDecimalPlaces,!0)+" ("+window.autotask.convert.integerToString(i)+this._hoursAbbreviation+" "+window.autotask.convert.integerToString(o)+this._minutesAbbreviation+")"}this._valueElement.innerText=e},enumerable:!1,configurable:!0}),e}(Autotask.LifecycleObject);t.Hours=e}(AutotaskReadOnlyDataSystem||(AutotaskReadOnlyDataSystem={})),function(t){var e=function(t){function e(e){var n=t.call(this,e)||this;return n._valueElement=AutotaskDomSystem.Document.getElementById(e),n}return __extends(e,t),Object.defineProperty(e.prototype,"value",{set:function(t){var e;this._valueElement.innerText=null!==(e=this._convertNumberToString(t))&&void 0!==e?e:""},enumerable:!1,configurable:!0}),e.prototype._convertNumberToString=function(t){var e=null;return null!==t&&(e=window.autotask.convert.integerToString(t)),e},e}(Autotask.LifecycleObject);t.Integer=e}(AutotaskReadOnlyDataSystem||(AutotaskReadOnlyDataSystem={})),function(t){var e=function(t){function e(e,n,i){var o=t.call(this,e)||this;return o._valueElement=AutotaskDomSystem.Document.getElementById(e),o._hoursAbbreviation=n,o._minutesAbbreviation=i,o}return __extends(e,t),Object.defineProperty(e.prototype,"value",{set:function(t){var e="";if(null!==t){var n=t/60,i=n<0?Math.ceil(n):Math.floor(n),o=t%60;e=window.autotask.convert.integerToString(i)+this._hoursAbbreviation+" "+window.autotask.convert.integerToString(o)+this._minutesAbbreviation}this._valueElement.innerText=e},enumerable:!1,configurable:!0}),e}(Autotask.LifecycleObject);t.Minutes=e}(AutotaskReadOnlyDataSystem||(AutotaskReadOnlyDataSystem={})),function(t){var e=function(t){function e(e,n,i,o,a,r,s){var l=t.call(this,e)||this,u=AutotaskDomSystem.Document.getElementById(e);l._imageElements=Array.from(u.querySelectorAll("img")),l._headerElementId=n,l._imageKeys=i,l._thumbnailUrl=o,l._fullSizeUrl=a,l._downloadUrl=r,l._trackingKeyParameterName=s,l._imageClickListener=function(t){var e=t.currentTarget,n=l._imageElements.indexOf(e),o=i[n];autotask.findPage().__get_imageViewer().show(l._imageViewerActivator,o)};for(var c=0,d=l._imageElements;c<d.length;c++){d[c].addEventListener("click",l._imageClickListener)}return l._imageViewerActivator=null,l}return __extends(e,t),e.prototype.__dispose=function(){for(var t=0,e=this._imageElements;t<e.length;t++){e[t].removeEventListener("click",this._imageClickListener)}},e.prototype.__initialize=function(){var t=AutotaskDomSystem.Document.getElementById(this._headerElementId),e=new AutotaskImageViewerSystem.RichTextImageRegistrar(t,this._imageKeys,this._thumbnailUrl,this._fullSizeUrl,this._downloadUrl,this._trackingKeyParameterName);this._imageViewerActivator=e.createActivator()},e}(Autotask.LifecycleObject);t.RichText=e}(AutotaskReadOnlyDataSystem||(AutotaskReadOnlyDataSystem={})),function(t){var e=function(){function t(t){this._realTimeDataManagement=t}return t.prototype.onCalendarDataRetrieval=function(t){this._realTimeDataManagement.onCalendarDataRetrieval(t)},t.prototype.addBookmarkUpdating=function(t){this._realTimeDataManagement.addBookmarkUpdating(t)},t.prototype.refreshAll=function(){this._realTimeDataManagement.refreshAll()},t.prototype.refreshAnnouncements=function(){this._realTimeDataManagement.refreshAnnouncements()},t.prototype.refreshBookmarks=function(t){this._realTimeDataManagement.refreshBookmarks(t)},t.prototype.refreshLiveLinks=function(){this._realTimeDataManagement.refreshLiveLinks()},t.prototype.refreshMyEntities=function(){this._realTimeDataManagement.refreshMyEntities()},t.prototype.refreshRecentItems=function(){this._realTimeDataManagement.refreshRecentItems()},t.prototype.refreshRecentSearches=function(){this._realTimeDataManagement.refreshRecentSearches()},t.prototype.refreshSchedule=function(){this._realTimeDataManagement.refreshSchedule()},t.prototype.refreshWorkList=function(){this._realTimeDataManagement.refreshWorkList()},t.prototype.saveAndRefreshRecentSearches=function(t,e,n){this._realTimeDataManagement.saveAndRefreshRecentSearches(t,e,n)},t}();t.InternalPageFacade=e}(AutotaskRealTimeDataSystem||(AutotaskRealTimeDataSystem={})),function(t){var e=function(){function t(t){this._realTimeDataManagement=t}return t.prototype.initialize=function(t,e,n,i,o,a,r,s,l,u,c,d,h,_,p,m,f,y,g,v,b,E,S,k){this._realTimeDataManagement.initialize(t,e,n,i,o,a,r,s,l,u,c,d,h,_,p,m,f,y,g,v,b,E,S,k)},t}();t.PageFacade=e}(AutotaskRealTimeDataSystem||(AutotaskRealTimeDataSystem={})),function(t){var e=function(){function t(t,e){this._availabilityChangedHandler=e,this._recentItemsRefreshedHandler=t,this._announcementsRefreshDelayInMilliseconds=9e5,this._createAnnouncementsAvailabilityTimer(),this._bookmarksUpdatingPointers=[],this._transitionFadeDelayInMilliseconds=1e3}return t.prototype.onCalendarDataRetrieval=function(t){var e=t.successPointer,n=t.activeDate,i=t.startDate,o=t.endDate,a=this;this._retrieveSchedule((function(t){a._scheduleDataId=t.dataId,e(t.activeMonthAndYear,t.importantDates)}),n,i,o)},t.prototype._onAnnouncementsAvailabilitySuccess=function(t){autotask.findPage().announcementsIndicator.updateAnnouncementsIndicator(t.hasAnnouncements)},t.prototype._onBundledRefreshSuccess=function(t){null!==t.bookmarksDataId&&this._onRefreshBookmarksSuccess(t.bookmarksDataId),null!==t.liveLinksDataId&&this._onRefreshLiveLinksSuccess(t.liveLinksDataId),null!==t.myEntitiesDataId&&this._onRefreshMyEntitiesSuccess(t.myEntitiesDataId),null!==t.recentItemsDataId&&this._onRefreshRecentItemsSuccess(t.recentItemsDataId),null!==t.recentSearchesDataId&&this._onRefreshRecentSearchesSuccess(t.recentSearchesDataId),null!==t.scheduleDataId&&this._onRefreshScheduleSuccess(t),null!==t.slideOutDataId&&this._onRefreshWorkListSuccess(t.slideOutDataId),this._onRefreshWorkListBadgesSuccess(t),this._raiseAvailabilityChangedEvent(t.isAvailabilityAway)},t.prototype._onResumeAnnouncementsAvailability=function(){null===this._announcementsAvailabilityInterval&&(this.refreshAnnouncements(),this._createAnnouncementsAvailabilityTimer())},t.prototype._onResumeBundledRefreshing=function(){null===this._bundledRefreshInterval&&(this.refreshAll(),this._createBundledRefreshTimer())},t.prototype._onRefreshWorkListSuccess=function(t){this._slideOutDataId=t;var e=autotask.findPage();if(e.slideOut.canRefreshWorkListPopup()){var n=e.slideOut.get_popupWindow();n&&n.refresh()}},t.prototype._onRefreshBookmarksSuccess=function(t){this._bookmarksDataId=t},t.prototype._onRefreshLiveLinksSuccess=function(t){this._liveLinksDataId=t},t.prototype._onRefreshMyEntitiesSuccess=function(t){this._myEntitiesDataId=t},t.prototype._onRefreshRecentItemsSuccess=function(t){this._recentItemsDataId=t,this._raiseRecentItemsRefreshedEvent()},t.prototype._onRefreshScheduleSuccess=function(t){t.importantDates&&(this._scheduleDataId=t.dataId,this._scheduleInstance.__loadDate(t.activeMonthAndYear,t.importantDates))},t.prototype._onRefreshRecentSearchesSuccess=function(t){this._recentSearchesDataId=t},t.prototype._onStopAnnouncementsAvailability=function(){null!==this._announcementsAvailabilityInterval&&clearTimeout(this._announcementsAvailabilityInterval),this._announcementsAvailabilityInterval=null},t.prototype._onRefreshWorkListBadgesSuccess=function(t){autotask.findPage().workListBadge.updateCounts(t.workListBadgesTotalTicketCount,t.workListBadgesTotalTaskCount)},t.prototype._onStopBundledRefreshing=function(){null!==this._bundledRefreshInterval&&clearTimeout(this._bundledRefreshInterval),this._bundledRefreshInterval=null},t.prototype._raiseAvailabilityChangedEvent=function(t){this._availabilityChangedHandler(t)},t.prototype._raiseRecentItemsRefreshedEvent=function(){this._recentItemsRefreshedHandler()},t.prototype._siteNavigationMenuTransitionReset=function(){},t.prototype.initialize=function(t,e,n,i,o,a,r,s,l,u,c,d,h,_,p,m,f,y,g,v,b,E,S,k){this._bundledRefreshDelayInSeconds=t,this._createBundledRefreshTimer(),this._announcementsAvailabilityRefreshUrl=E,this._bundledNavigationRefreshUrl=e,this._bookmarksContainerId=n,this._bookmarksDataId=i,this._bookmarksRefreshUrl=o,this._liveLinksContainerId=a,this._liveLinksDataId=r,this._liveLinksRefreshUrl=s,this._myEntitiesContainerId=l,this._myEntitiesDataId=u,this._myEntitiesRefreshUrl=c,this._recentItemsContainerId=d,this._recentItemsDataId=h,this._recentItemsRefreshUrl=_,this._recentSearchesContainerId=p,this._recentSearchesDataId=m,this._recentSearchesRefreshUrl=f,this._scheduleInstance=autotask.find(y),this._scheduleDataId=g,this._scheduleRefreshUrl=v,this._slideOutContainerId=b,this._workListBadgesUrl=S;var C=autotask.findPage();C.__activity.addIdleHandler(this._onStopBundledRefreshing.bind(this)),C.__activity.addResumeHandler(this._onResumeBundledRefreshing.bind(this)),C.__activity.addIdleHandler(this._onStopAnnouncementsAvailability.bind(this)),C.__activity.addResumeHandler(this._onResumeAnnouncementsAvailability.bind(this));var A=AutotaskDomSystem.Document.getElementById(this._bookmarksContainerId);this._bookmarksTransitionCoordinator=this._createSiteNavigationMenuTransitionCoordinator(A);var D=AutotaskDomSystem.Document.getElementById(this._liveLinksContainerId);this._liveLinksTransitionCoordinator=this._createSiteNavigationMenuTransitionCoordinator(D);var I=AutotaskDomSystem.Document.getElementById(this._myEntitiesContainerId);this._myEntitiesTransitionCoordinator=this._createSiteNavigationMenuTransitionCoordinator(I);var w=AutotaskDomSystem.Document.getElementById(this._recentItemsContainerId);this._recentItemsTransitionCoordinator=this._createSiteNavigationMenuTransitionCoordinator(w);var H=AutotaskDomSystem.Document.getElementById(this._recentSearchesContainerId);this._recentSearchesTransitionCoordinator=this._createSiteNavigationMenuTransitionCoordinator(H),(new RestrictedJsonPostRouteCreator).createRestrictedJsonPostRoute(k).__makeRequest(null,null,!1)},t.prototype.addBookmarkUpdating=function(t){this._bookmarksUpdatingPointers.push(t)},t.prototype.refreshAll=function(){var t=autotask.instanceTrackerManagement.__findInstanceTracker(this._slideOutContainerId),e=autotask.instanceTrackerManagement.__findInstanceTracker(this._bookmarksContainerId),n=autotask.instanceTrackerManagement.__findInstanceTracker(this._liveLinksContainerId),i=autotask.instanceTrackerManagement.__findInstanceTracker(this._myEntitiesContainerId),o=autotask.instanceTrackerManagement.__findInstanceTracker(this._recentItemsContainerId),a=autotask.instanceTrackerManagement.__findInstanceTracker(this._recentSearchesContainerId),r=this._scheduleInstance.__get_loadedDateInformation(),s=autotask.findPage().slideOut,l=s.canRefreshWorkList()||s.canRefreshWorkListPopup(),u=s.get_workListType(),c=this._onBundledRefreshSuccess.bind(this),d={bookmarksDataId:this._bookmarksDataId,liveLinksDataId:this._liveLinksDataId,myEntitiesDataId:this._myEntitiesDataId,recentItemsDataId:this._recentItemsDataId,recentSearchesDataId:this._recentSearchesDataId,slideOutDataId:this._scheduleDataId,isWorkListVisible:l,workListType:u,scheduleDataId:this._scheduleDataId,activeMonthAndYear:window.autotask.convert.__formatDateForGetRequest(r.activeDate),startDate:window.autotask.convert.__formatDateForGetRequest(r.startDate),endDate:window.autotask.convert.__formatDateForGetRequest(r.endDate)};window.autotask.navigation.ajax.__restrictedGetRequest(this._bundledNavigationRefreshUrl,d,c).__bundledNavigationRefresh(e,this._bookmarksTransitionCoordinator,n,this._liveLinksTransitionCoordinator,i,this._myEntitiesTransitionCoordinator,o,this._recentItemsTransitionCoordinator,a,this._recentSearchesTransitionCoordinator,t)},t.prototype.refreshAnnouncements=function(){var t=this._onAnnouncementsAvailabilitySuccess.bind(this);window.autotask.navigation.ajax.__restrictedGetRequest(this._announcementsAvailabilityRefreshUrl,null,t).__announcementsRefresh()},t.prototype.refreshBookmarks=function(t){window.autotask.eventManagement.__executeHandlers(t,this._bookmarksUpdatingPointers,null);var e=autotask.instanceTrackerManagement.__findInstanceTracker(this._bookmarksContainerId),n=this._onRefreshBookmarksSuccess.bind(this),i={bookmarksDataId:this._bookmarksDataId};window.autotask.navigation.ajax.__restrictedGetRequest(this._bookmarksRefreshUrl,i,n).__bookmarksRefresh(e,this._bookmarksTransitionCoordinator)},t.prototype.refreshLiveLinks=function(){var t=autotask.instanceTrackerManagement.__findInstanceTracker(this._liveLinksContainerId),e=this._onRefreshLiveLinksSuccess.bind(this),n={liveLinksDataId:this._liveLinksDataId};window.autotask.navigation.ajax.__restrictedGetRequest(this._liveLinksRefreshUrl,n,e).__liveLinksRefresh(t,this._liveLinksTransitionCoordinator)},t.prototype.refreshMyEntities=function(){var t=autotask.instanceTrackerManagement.__findInstanceTracker(this._myEntitiesContainerId),e=this._onRefreshMyEntitiesSuccess.bind(this),n={myEntitiesDataId:this._myEntitiesDataId};window.autotask.navigation.ajax.__restrictedGetRequest(this._myEntitiesRefreshUrl,n,e).__myEntitiesRefresh(t,this._myEntitiesTransitionCoordinator)},t.prototype.refreshRecentItems=function(){var t=autotask.instanceTrackerManagement.__findInstanceTracker(this._recentItemsContainerId),e=this._onRefreshRecentItemsSuccess.bind(this),n={recentItemsDataId:this._recentItemsDataId};window.autotask.navigation.ajax.__restrictedGetRequest(this._recentItemsRefreshUrl,n,e).__recentItemsRefresh(t,this._recentItemsTransitionCoordinator)},t.prototype.refreshRecentSearches=function(){this.saveAndRefreshRecentSearches(null,null,null)},t.prototype.refreshSchedule=function(){var t=this._scheduleInstance.__get_loadedDateInformation(),e=this._onRefreshScheduleSuccess.bind(this);this._retrieveSchedule(e,t.activeDate,t.startDate,t.endDate)},t.prototype.refreshWorkList=function(){var t=autotask.instanceTrackerManagement.__findInstanceTracker(this._slideOutContainerId),e=autotask.findPage().slideOut;if(e.canRefreshWorkList()){var n=e.get_workListRefreshUrl(),i=this._onRefreshWorkListSuccess.bind(this),o={workListDataId:this._slideOutDataId};window.autotask.navigation.ajax.__restrictedGetRequest(n,o,i).__workListRefresh(t)}if(e.canRefreshWorkListBadges()){var a=this._onRefreshWorkListBadgesSuccess.bind(this);window.autotask.navigation.ajax.__restrictedGetRequest(this._workListBadgesUrl,null,a).__workListBadgesRefresh()}var r=e.get_popupWindow();e.canRefreshWorkListPopup()&&null!==r&&r.refresh()},t.prototype.saveAndRefreshRecentSearches=function(t,e,n){var i=autotask.instanceTrackerManagement.__findInstanceTracker(this._recentSearchesContainerId),o=this._onRefreshRecentSearchesSuccess.bind(this),a={recentSearchesDataId:this._recentSearchesDataId,searchType:t,searchText:e,pageCode:n};window.autotask.navigation.ajax.__restrictedGetRequest(this._recentSearchesRefreshUrl,a,o).__recentSearchesRefresh(i,this._recentSearchesTransitionCoordinator)},t.prototype._createAnnouncementsAvailabilityTimer=function(){this._announcementsAvailabilityInterval=window.setInterval(this.refreshAnnouncements.bind(this),this._announcementsRefreshDelayInMilliseconds)},t.prototype._createBundledRefreshTimer=function(){this._bundledRefreshInterval=window.setInterval(this.refreshAll.bind(this),1e3*this._bundledRefreshDelayInSeconds)},t.prototype._createSiteNavigationMenuTransitionCoordinator=function(t){return new Autotask.TransitionCoordinator(0,(function(){window.autotask.transitionManagement.__startFadeTransitionForContextOverlayContent(t)}),this._transitionFadeDelayInMilliseconds,(function(){window.autotask.transitionManagement.__stopFadeTransitionForContextOverlayContent(t)}),this._siteNavigationMenuTransitionReset.bind(this))},t.prototype._retrieveSchedule=function(t,e,n,i){var o={scheduleDataId:this._scheduleDataId,activeMonthAndYear:window.autotask.convert.__formatDateForGetRequest(e),startDate:window.autotask.convert.__formatDateForGetRequest(n),endDate:window.autotask.convert.__formatDateForGetRequest(i)};window.autotask.navigation.ajax.__restrictedGetRequest(this._scheduleRefreshUrl,o,t).__scheduleRefresh()},t}();t.RealTimeDataManagement=e}(AutotaskRealTimeDataSystem||(AutotaskRealTimeDataSystem={})),function(t){var e=function(){function t(){this._data=new AutotaskRequestDataSystem.RequestData}return Object.defineProperty(t.prototype,"requestData",{get:function(){return this._data},enumerable:!1,configurable:!0}),t}();t.ContentTransitioningEventArgs=e}(AutotaskReplaceableColumnSystem||(AutotaskReplaceableColumnSystem={})),function(t){var e=function(t){function e(){return t.call(this)||this}return __extends(e,t),e.prototype.deprecatedAddDataDictionary=function(t,e){if(this._validateKey(t),null!==e){if(!(e instanceof AutotaskRequestDataSystem.RequestDataDictionary))return autotask.throwException("The value must be an instance of AutotaskRequestDataSystem.RequestDataDictionary.");var n=e.data;for(var i in n)n.hasOwnProperty(i)&&this._addData(i,n[i])}else this._addData(t,null)},e}(AutotaskRequestDataSystem.RequestData);t.DeprecatedRequestData=e}(Autotask||(Autotask={})),function(t){var e=function(t){function e(e){var n=t.call(this,e)||this;n._data={};for(var i=1;i<arguments.length;i+=2){var o=arguments[i],a=arguments[i+1];n._data[o]=a}return n}return __extends(e,t),Object.defineProperty(e.prototype,"data",{get:function(){return this._data},enumerable:!1,configurable:!0}),e}(t.LifecycleObject);t.ResponseData=e}(Autotask||(Autotask={})),function(t){var e=function(){function t(){this._steps=[],this._currentIndex=null,this._savingCompleteHandler=null}return t.prototype.beginSaving=function(t){this._steps=this._createSteps(),this._savingCompleteHandler=t,this._validate()&&(this._currentIndex=0,this._executeStep(this._currentIndex))},t.prototype.completeStep=function(t){null===this._currentIndex&&autotask.throwException("The save coordinator is not started."),t!==this._steps[this._currentIndex].key&&autotask.throwException("The key is incorrect."),this._currentIndex++,this._executeStep(this._currentIndex)},t.prototype._executeStep=function(t){this._steps.length>t?this._steps[t].execute():null!==this._savingCompleteHandler&&this._savingCompleteHandler()},t.prototype._validate=function(){for(var t=!0,e=0,n=this._steps;e<n.length;e++){var i=n[e];t=t&&i.validate()}return t},t}();t.SaveCoordinator=e}(AutotaskSaveCoordinatorSystem||(AutotaskSaveCoordinatorSystem={})),function(t){var e=function(e){function n(){var t=e.call(this)||this;return t._accessoryTabStep=null,t._activityNoteStep=null,t._guestAcivityNoteStep=null,t}return __extends(n,e),n.prototype.configureAccessoryTabHandlers=function(e,n){this._accessoryTabStep=new t.SaveCoordinatorStep("AccessoryTab",e,n)},n.prototype.__clearAccessoryTabHandlers=function(){this._accessoryTabStep=null},n.prototype.__clearGuestActivityNoteHandlers=function(){this._guestAcivityNoteStep=null},n.prototype.__configureActivityNoteHandlers=function(e,n){this._activityNoteStep=new t.SaveCoordinatorStep("ActivityNote",e,n)},n.prototype.__configureGuestActivityNoteHandlers=function(e,n){this._guestAcivityNoteStep=new t.SaveCoordinatorStep("GuestActivityNote",e,n)},n.prototype._createSteps=function(){var t=[];return null!==this._accessoryTabStep&&t.push(this._accessoryTabStep),null!==this._activityNoteStep&&t.push(this._activityNoteStep),null!==this._guestAcivityNoteStep&&t.push(this._guestAcivityNoteStep),t},n}(t.SaveCoordinator);t.EntityDetailSaveCoordinator=e}(AutotaskSaveCoordinatorSystem||(AutotaskSaveCoordinatorSystem={})),function(t){var e=function(e){function n(t,n){var i=e.call(this)||this;return i._validatingHandler=t,i._submittingHandler=n,i._accessoryTabStep=null,i._activityNoteStep=null,i._guestAcivityNoteStep=null,i._primaryContentStep=null,i._primaryContentPreparationStep=null,i}return __extends(n,e),n.prototype.configureAccessoryTabHandlers=function(e,n){this._accessoryTabStep=new t.SaveCoordinatorStep("AccessoryTab",e,n)},n.prototype.configurePrimaryContentHandlers=function(e,n,i){var o=this;this._primaryContentPreparationStep=new t.SaveCoordinatorStep("PrimaryContentPreparation",e,n),this._primaryContentStep=new t.SaveCoordinatorStep("PrimaryContent",this._validatingHandler,(function(t){var e=i(t);o._submittingHandler(e)}))},n.prototype.__clearAccessoryTabHandlers=function(){this._accessoryTabStep=null},n.prototype.__clearGuestActivityNoteHandlers=function(){this._guestAcivityNoteStep=null},n.prototype.__configureActivityNoteHandlers=function(e,n){this._activityNoteStep=new t.SaveCoordinatorStep("ActivityNote",e,n)},n.prototype.__configureGuestActivityNoteHandlers=function(e,n){this._guestAcivityNoteStep=new t.SaveCoordinatorStep("GuestActivityNote",e,n)},n.prototype._createSteps=function(){var t=[];return null!==this._primaryContentPreparationStep&&t.push(this._primaryContentPreparationStep),null!==this._primaryContentStep&&t.push(this._primaryContentStep),null!==this._accessoryTabStep&&t.push(this._accessoryTabStep),null!==this._activityNoteStep&&t.push(this._activityNoteStep),null!==this._guestAcivityNoteStep&&t.push(this._guestAcivityNoteStep),t},n}(t.SaveCoordinator);t.EntityEditSaveCoordinator=e}(AutotaskSaveCoordinatorSystem||(AutotaskSaveCoordinatorSystem={})),function(t){var e=function(e){function n(t,n){var i=e.call(this)||this;return i._validatingHandler=t,i._submittingHandler=n,i._primaryContentStep=null,i._primaryContentPreparationStep=null,i}return __extends(n,e),n.prototype.configurePrimaryContentHandlers=function(e,n,i){var o=this;this._primaryContentPreparationStep=new t.SaveCoordinatorStep("PrimaryContentPreparation",e,n),this._primaryContentStep=new t.SaveCoordinatorStep("PrimaryContent",this._validatingHandler,(function(t){var e=i(t);o._submittingHandler(e)}))},n.prototype._createSteps=function(){var t=[];return null!==this._primaryContentPreparationStep&&t.push(this._primaryContentPreparationStep),null!==this._primaryContentStep&&t.push(this._primaryContentStep),t},n}(t.SaveCoordinator);t.EntityNewSaveCoordinator=e}(AutotaskSaveCoordinatorSystem||(AutotaskSaveCoordinatorSystem={})),function(t){var e=function(){function t(t,e,n){this._key=t,this._validatingHandler=e,this._executionHandler=n}return Object.defineProperty(t.prototype,"key",{get:function(){return this._key},enumerable:!1,configurable:!0}),t.prototype.execute=function(){this._executionHandler(this._key)},t.prototype.validate=function(){return this._validatingHandler()},t}();t.SaveCoordinatorStep=e}(AutotaskSaveCoordinatorSystem||(AutotaskSaveCoordinatorSystem={})),function(t){var e=function(e){function n(){var t=e.call(this)||this;return t._accessoryTabStep=null,t._activityNoteStep=null,t._guestAcivityNoteStep=null,t}return __extends(n,e),n.prototype.configureAccessoryTabHandlers=function(e,n){this._accessoryTabStep=new t.SaveCoordinatorStep("AccessoryTab",e,n)},n.prototype.__clearAccessoryTabHandlers=function(){this._accessoryTabStep=null},n.prototype.__clearGuestActivityNoteHandlers=function(){this._guestAcivityNoteStep=null},n.prototype.__configureActivityNoteHandlers=function(e,n){this._activityNoteStep=new t.SaveCoordinatorStep("ActivityNote",e,n)},n.prototype.__configureGuestActivityNoteHandlers=function(e,n){this._guestAcivityNoteStep=new t.SaveCoordinatorStep("GuestActivityNote",e,n)},n.prototype._createSteps=function(){var t=[];return null!==this._accessoryTabStep&&t.push(this._accessoryTabStep),null!==this._activityNoteStep&&t.push(this._activityNoteStep),null!==this._guestAcivityNoteStep&&t.push(this._guestAcivityNoteStep),t},n}(t.SaveCoordinator);t.SimpleEntityDetailSaveCoordinator=e}(AutotaskSaveCoordinatorSystem||(AutotaskSaveCoordinatorSystem={})),function(t){var e=function(e){function n(t,n){var i=e.call(this)||this;return i._validatingHandler=t,i._submittingHandler=n,i._accessoryTabStep=null,i._activityNoteStep=null,i._guestAcivityNoteStep=null,i._primaryContentStep=null,i._primaryContentPreparationStep=null,i}return __extends(n,e),n.prototype.configureAccessoryTabHandlers=function(e,n){this._accessoryTabStep=new t.SaveCoordinatorStep("AccessoryTab",e,n)},n.prototype.configurePrimaryContentHandlers=function(e,n,i){var o=this;this._primaryContentPreparationStep=new t.SaveCoordinatorStep("PrimaryContentPreparation",e,n),this._primaryContentStep=new t.SaveCoordinatorStep("PrimaryContent",this._validatingHandler,(function(t){var e=i(t);o._submittingHandler(e)}))},n.prototype.__clearAccessoryTabHandlers=function(){this._accessoryTabStep=null},n.prototype.__clearGuestActivityNoteHandlers=function(){this._guestAcivityNoteStep=null},n.prototype.__configureActivityNoteHandlers=function(e,n){this._activityNoteStep=new t.SaveCoordinatorStep("ActivityNote",e,n)},n.prototype.__configureGuestActivityNoteHandlers=function(e,n){this._guestAcivityNoteStep=new t.SaveCoordinatorStep("GuestActivityNote",e,n)},n.prototype._createSteps=function(){var t=[];return null!==this._primaryContentPreparationStep&&t.push(this._primaryContentPreparationStep),null!==this._primaryContentStep&&t.push(this._primaryContentStep),null!==this._accessoryTabStep&&t.push(this._accessoryTabStep),null!==this._activityNoteStep&&t.push(this._activityNoteStep),null!==this._guestAcivityNoteStep&&t.push(this._guestAcivityNoteStep),t},n}(t.SaveCoordinator);t.SimpleEntityEditSaveCoordinator=e}(AutotaskSaveCoordinatorSystem||(AutotaskSaveCoordinatorSystem={})),function(t){var e=function(e){function n(t,n){var i=e.call(this)||this;return i._validatingHandler=t,i._submittingHandler=n,i._primaryContentStep=null,i._primaryContentPreparationStep=null,i}return __extends(n,e),n.prototype.configurePrimaryContentHandlers=function(e,n,i){var o=this;this._primaryContentPreparationStep=new t.SaveCoordinatorStep("PrimaryContentPreparation",e,n),this._primaryContentStep=new t.SaveCoordinatorStep("PrimaryContent",this._validatingHandler,(function(t){var e=i(t);o._submittingHandler(e)}))},n.prototype._createSteps=function(){var t=[];return null!==this._primaryContentPreparationStep&&t.push(this._primaryContentPreparationStep),null!==this._primaryContentStep&&t.push(this._primaryContentStep),t},n}(t.SaveCoordinator);t.SimpleEntityNewSaveCoordinator=e}(AutotaskSaveCoordinatorSystem||(AutotaskSaveCoordinatorSystem={})),function(t){var e=function(){function t(t,e){this._url=t,this._successHandler=e,this._data=new AutotaskRequestDataSystem.RequestData}return Object.defineProperty(t.prototype,"data",{get:function(){return this._data},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"successHandler",{get:function(){return this._successHandler},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"url",{get:function(){return this._url},enumerable:!1,configurable:!0}),t}();t.SubmitSettings=e}(AutotaskSaveCoordinatorSystem||(AutotaskSaveCoordinatorSystem={})),function(t){var e=function(){function t(t){this._scheduleCalendarManagement=t}return t.prototype.initialize=function(t,e){this._scheduleCalendarManagement.initialize(t,e)},t}();t.InternalPageFacade=e}(AutotaskScheduleCalendarSystem||(AutotaskScheduleCalendarSystem={})),function(t){var e=function(){function t(){}return t.prototype._onContextOverlayHiding=function(){return this._scheduleInstance.__loadDefaultDate(),!0},t.prototype.initialize=function(t,e){var n=autotask.find(t);this._contextOverlay=n.__get_contextOverlay(),this._scheduleInstance=autotask.find(e),this._registerHandlers()},t.prototype._registerHandlers=function(){this._contextOverlay.__addHiding(this._onContextOverlayHiding.bind(this))},t}();t.ScheduleCalendarManagement=e}(AutotaskScheduleCalendarSystem||(AutotaskScheduleCalendarSystem={})),function(t){var e=function(){function t(t){this._container=t}return t.prototype.get_selectedParticipant=function(){for(var t=this._container.querySelectorAll("[data-search-menu-system]"),e=0;e<t.length;e++){var n=autotask.find(t[e].id);if(n.isSelected())return n}return null},t.prototype.get_participantBySearchType=function(t){for(var e=this._container.querySelectorAll("[data-search-menu-system]"),n=0;n<e.length;n++){var i=autotask.find(e[n].id);if(i.get_searchType()===t)return i}return null},t}();t.SearchMenuCoordinator=e}(AutotaskSearchMenuSystem||(AutotaskSearchMenuSystem={})),function(t){var e=function(){function t(t,e,n,i,o){this._alternativeSearchButtonId=t,this._confirmButtonText=i,this._denyButtonText=o,this._description=n,this._title=e}return t.prototype.matchesSearchPattern=function(t){return!!new RegExp(/^(T|t)2(\d{3,7}|\d{7}\.\d{0,4}|\d{7}\.\d{4}\.\d{0,3})$/).test(t)&&window.autotask.convert.stringToInteger(t.substring(1,5))<=(new Date).getFullYear()},Object.defineProperty(t.prototype,"alternativeSearchButtonId",{get:function(){return this._alternativeSearchButtonId},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"confirmButtonText",{get:function(){return this._confirmButtonText},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"denyButtonText",{get:function(){return this._denyButtonText},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"description",{get:function(){return this._description},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"title",{get:function(){return this._title},enumerable:!1,configurable:!0}),t}();t.TicketSearchOptions=e}(AutotaskSearchMenuSystem||(AutotaskSearchMenuSystem={})),function(t){var e=function(t){function e(e,n){var i=t.call(this,e)||this;return i._backingSectionId=n,i._sectionElement=AutotaskDomSystem.Document.getElementById(e),i._backingSectionInstance=void 0,i._collapsedHandlers=[],i._expandedHandlers=[],i}return __extends(e,t),Object.defineProperty(e.prototype,"isCollapsed",{get:function(){return this._backingSection.isCollapsed},enumerable:!1,configurable:!0}),e.prototype.__initialize=function(){var t=this;this._backingSectionInstance=autotask.find(this._backingSectionId),this._backingSection.addCollapsedStateChangeHandler((function(e){t._collapsedStateChangeHandler(e)}))},e.prototype.addExpandedHandler=function(t){this._expandedHandlers.push(t)},e.prototype.addCollapsedHandler=function(t){this._collapsedHandlers.push(t)},e.prototype.collapse=function(){this._backingSection.collapse()},e.prototype.expand=function(){this._backingSection.expand()},Object.defineProperty(e.prototype,"_backingSection",{get:function(){return void 0===this._backingSectionInstance?autotask.throwException("_backingSectionInstance is undefined."):this._backingSectionInstance},enumerable:!1,configurable:!0}),e.prototype._collapsedStateChangeHandler=function(t){if(t.isCollapsed){if(this._sectionElement.classList.add("Collapsed"),this._collapsedHandlers.length>0)for(var e=0,n=this._collapsedHandlers;e<n.length;e++){(0,n[e])()}}else if(this._sectionElement.classList.remove("Collapsed"),this._expandedHandlers.length>0)for(var i=0,o=this._expandedHandlers;i<o.length;i++){(0,o[i])()}},e}(t.LifecycleObject);t.CollapsibleSection=e}(Autotask||(Autotask={})),function(t){var e=function(t){function e(e,n,i,o,a,r){var s=t.call(this,e)||this;return s._buttonId=a,s._checklistId=n,s._hideCompletedItemsText=i,s._showCompletedItemsText=o,s._completedItemsStatusElement=AutotaskDomSystem.Document.getElementById(r),s._areCompletedItemsVisible=!0,s._buttonInstance=void 0,s._checklistInstance=void 0,s}return __extends(e,t),e.prototype.__hideCompletedItemsButtonHandler=function(){this._areCompletedItemsVisible=!this._areCompletedItemsVisible,this._areCompletedItemsVisible?(this._checklist.showCompleletedItems(),this._hideCompletedItemsButton.set_text(this._hideCompletedItemsText)):(this._checklist.hideCompleletedItems(),this._hideCompletedItemsButton.set_text(this._showCompletedItemsText))},e.prototype.__initialize=function(){var t=this;this._checklistInstance=autotask.find(this._checklistId),this._checklistInstance.setCompletedItemCountChangeHandler((function(){t._completedItemCountChangeHandler()})),this._buttonInstance=autotask.find(this._buttonId),this._updateHideCompletedItemsButtonState()},Object.defineProperty(e.prototype,"_checklist",{get:function(){return void 0===this._checklistInstance?autotask.throwException("_checklistInstance is undefined."):this._checklistInstance},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_hideCompletedItemsButton",{get:function(){return void 0===this._buttonInstance?autotask.throwException("_buttonInstance is undefined."):this._buttonInstance},enumerable:!1,configurable:!0}),e.prototype._completedItemCountChangeHandler=function(){this._updateCompletedCount(),this._updateHideCompletedItemsButtonState()},e.prototype._updateCompletedCount=function(){this._completedItemsStatusElement.textContent=this._checklist.completedItemCount.toString()},e.prototype._updateHideCompletedItemsButtonState=function(){this._hideCompletedItemsButton.get_enabled()?0===this._checklist.completedItemCount&&this._hideCompletedItemsButton.set_enabled(!1):this._checklist.completedItemCount>0&&this._hideCompletedItemsButton.set_enabled(!0)},e}(t.LifecycleObject);t.EntityDetailBodyChecklistHeading=e}(Autotask||(Autotask={})),function(t){var e=function(t){function e(e,n,i,o,a,r){var s=t.call(this,e)||this;return s._toggleButtonId=n,s._showMoreText=i,s._showLessText=o,s._isExpanded=!1,s._moreContentIndicatorSectionElement=AutotaskDomSystem.Document.getElementById(a),s._contentRemainingSectionElement=AutotaskDomSystem.Document.getElementById(r),s._toggleButtonInstance=void 0,s}return __extends(e,t),e.prototype.__toggle=function(){var t="Hidden";this._isExpanded?(this._toggleButton.set_text(this._showMoreText),this._contentRemainingSectionElement.classList.add(t),this._moreContentIndicatorSectionElement.classList.remove(t)):(this._toggleButton.set_text(this._showLessText),this._contentRemainingSectionElement.classList.remove(t),this._moreContentIndicatorSectionElement.classList.add(t)),this._isExpanded=!this._isExpanded},e.prototype.__initialize=function(){this._toggleButtonInstance=autotask.find(this._toggleButtonId)},Object.defineProperty(e.prototype,"_toggleButton",{get:function(){return void 0===this._toggleButtonInstance?autotask.throwException("_toggleButtonInstance is undefined."):this._toggleButtonInstance},enumerable:!1,configurable:!0}),e}(t.LifecycleObject);t.EntityDetailBodyEnhancedText=e}(Autotask||(Autotask={})),function(t){var e=function(t){function e(e,n){var i=t.call(this,e)||this;i._backingSectionId=n,i._postedContainerElement=AutotaskDomSystem.Document.getElementById(e);var o=new PostedContainerValidationCreator;return i._postedContainerValidation=o.createValidation(i._postedContainerElement),i._backingSectionInstance=void 0,i._collapsedHandlers=[],i._expandedHandlers=[],i._immutableData=[],i._customValidationSummaryInstance=null,i._validationSummaryInstance=null,i}return __extends(e,t),e.prototype.get_customValidationSummary=function(){return this._customValidationSummaryInstance},Object.defineProperty(e.prototype,"isCollapsed",{get:function(){return this._backingSection.isCollapsed},enumerable:!1,configurable:!0}),e.prototype.addCollapsedHandler=function(t){this._collapsedHandlers.push(t)},e.prototype.addExpandedHandler=function(t){this._expandedHandlers.push(t)},e.prototype.collapse=function(){this._backingSection.collapse()},e.prototype.expand=function(){this._backingSection.expand()},e.prototype.generateFieldData=function(){for(var t=new AutotaskRequestDataSystem.SerializedRequestData([this._postedContainerElement]),e=0,n=this._immutableData;e<n.length;e++){var i=n[e];t.__addImmutableData(i)}return t},e.prototype.validate=function(){var t=this._postedContainerValidation.__validate();return t||this._postedContainerValidation.__validationFailed(),this._postedContainerValidation.__validationCompleted(t,!1),t},e.prototype.validateEditor=function(t){var e;return(e="function"==typeof t.validate?t.validate():this._postedContainerValidation.__validateLegacyEditor(t.__get_id(),!1))||this._postedContainerValidation.__validationFailed(),this._postedContainerValidation.__validationCompleted(e,!1),e},e.prototype.__addImmutableData=function(t){this._immutableData.push(t)},e.prototype.__finalize=function(){this._postedContainerValidation.__parse()},e.prototype.__initialize=function(){var t=this;this._validationSummaryInstance=autotask.validationSummaryManagement.__findValidationSummaryUsingElement(this._postedContainerElement),this._postedContainerValidation.__registerValidationSummary(this._validationSummaryInstance),this._customValidationSummaryInstance=this._validationSummaryInstance.__get_customValidationSummary(),this._backingSectionInstance=autotask.find(this._backingSectionId),this._backingSection.addCollapsedStateChangeHandler((function(e){t._collapsedStateChangeHandler(e)}))},Object.defineProperty(e.prototype,"_backingSection",{get:function(){return void 0===this._backingSectionInstance?autotask.throwException("_backingSectionInstance is undefined."):this._backingSectionInstance},enumerable:!1,configurable:!0}),e.prototype._collapsedStateChangeHandler=function(t){if(t.isCollapsed){if(this._postedContainerElement.classList.add("Collapsed"),this._collapsedHandlers.length>0)for(var e=0,n=this._collapsedHandlers;e<n.length;e++){(0,n[e])()}}else if(this._postedContainerElement.classList.remove("Collapsed"),this._expandedHandlers.length>0)for(var i=0,o=this._expandedHandlers;i<o.length;i++){(0,o[i])()}},e}(t.LifecycleObject);t.PostedCollapsibleSection=e}(Autotask||(Autotask={})),function(t){var e=function(t){function e(e){var n=t.call(this,e)||this;n._postedContainerElement=AutotaskDomSystem.Document.getElementById(e);var i=new PostedContainerValidationCreator;return n._postedContainerValidation=i.createValidation(n._postedContainerElement),n._immutableData=[],n._customValidationSummaryInstance=null,n._validationSummaryInstance=null,n}return __extends(e,t),e.prototype.get_customValidationSummary=function(){return this._customValidationSummaryInstance},e.prototype.generateFieldData=function(){for(var t=new AutotaskRequestDataSystem.SerializedRequestData([this._postedContainerElement]),e=0,n=this._immutableData;e<n.length;e++){var i=n[e];t.__addImmutableData(i)}return t},e.prototype.validate=function(){var t=this._postedContainerValidation.__validate();return t||this._postedContainerValidation.__validationFailed(),this._postedContainerValidation.__validationCompleted(t,!1),t},e.prototype.validateEditor=function(t){var e;return(e="function"==typeof t.validate?t.validate():this._postedContainerValidation.__validateLegacyEditor(t.__get_id(),!1))||this._postedContainerValidation.__validationFailed(),this._postedContainerValidation.__validationCompleted(e,!1),e},e.prototype.__addImmutableData=function(t){this._immutableData.push(t)},e.prototype.__finalize=function(){this._postedContainerValidation.__parse()},e.prototype.__initialize=function(){this._validationSummaryInstance=autotask.validationSummaryManagement.__findValidationSummaryUsingElement(this._postedContainerElement),this._postedContainerValidation.__registerValidationSummary(this._validationSummaryInstance),this._customValidationSummaryInstance=this._validationSummaryInstance.__get_customValidationSummary()},e}(t.LifecycleObject);t.PostedSection=e}(Autotask||(Autotask={})),function(t){var e=function(t){function e(e,n){var i=t.call(this,e)||this;i._backingSectionId=n,i._sectionElement=AutotaskDomSystem.Document.getElementById(e);var o=new PostedContainerValidationCreator;return i._postedContainerValidation=o.createValidation(i._sectionElement),i._validationSummary=autotask.validationSummaryManagement.__findValidationSummaryUsingElement(i._sectionElement),i._immutableData=[],i._collapsedHandlers=[],i._expandedHandlers=[],i}return __extends(e,t),Object.defineProperty(e.prototype,"isCollapsed",{get:function(){return this._backingSection.isCollapsed},enumerable:!1,configurable:!0}),e.prototype.addExpandedHandler=function(t){this._expandedHandlers.push(t)},e.prototype.addCollapsedHandler=function(t){this._collapsedHandlers.push(t)},e.prototype.collapse=function(){this._backingSection.collapse()},e.prototype.expand=function(){this._backingSection.expand()},e.prototype.get_customValidationSummary=function(){return this._validationSummary.__get_customValidationSummary()},e.prototype.generateFieldData=function(){for(var t=new AutotaskRequestDataSystem.SerializedRequestData([this._sectionElement]),e=0,n=this._immutableData;e<n.length;e++){var i=n[e];t.__addImmutableData(i)}return t},e.prototype.moveAfterNextSection=function(){var t=!1,e=this._sectionElement.nextElementSibling;return null!==e&&"true"===e.dataset.isMovable&&(e.after(this._sectionElement),t=!0),t},e.prototype.moveBeforePreviousSection=function(){var t=!1,e=this._sectionElement.previousElementSibling;return null!==e&&"true"===e.dataset.isMovable&&(e.before(this._sectionElement),t=!0),t},e.prototype.validate=function(){var t=this._postedContainerValidation.__validate();return t||this._postedContainerValidation.__validationFailed(),this._postedContainerValidation.__validationCompleted(t,!1),t},e.prototype.validateEditor=function(t){var e;return(e="function"==typeof t.validate?t.validate():this._postedContainerValidation.__validateLegacyEditor(t.__get_id(),!1))||this._postedContainerValidation.__validationFailed(),this._postedContainerValidation.__validationCompleted(e,!1),e},e.prototype.__addImmutableData=function(t){this._immutableData.push(t)},e.prototype.__finalize=function(){this._postedContainerValidation.__parse()},e.prototype.__initialize=function(){var t=this;this._backingSectionInstance=autotask.find(this._backingSectionId),this._backingSection.addCollapsedStateChangeHandler((function(e){t._collapsedStateChangeHandler(e)}))},e.prototype.__registerHandlers=function(){this._postedContainerValidation.__registerValidationSummary(this._validationSummary)},Object.defineProperty(e.prototype,"_backingSection",{get:function(){return void 0===this._backingSectionInstance?autotask.throwException("_backingSectionInstance is undefined."):this._backingSectionInstance},enumerable:!1,configurable:!0}),e.prototype._collapsedStateChangeHandler=function(t){if(t.isCollapsed){if(this._sectionElement.classList.add("Collapsed"),this._collapsedHandlers.length>0)for(var e=0,n=this._collapsedHandlers;e<n.length;e++){(0,n[e])()}}else if(this._sectionElement.classList.remove("Collapsed"),this._expandedHandlers.length>0)for(var i=0,o=this._expandedHandlers;i<o.length;i++){(0,o[i])()}},e}(t.LifecycleObject);t.SubWidgetSection=e}(Autotask||(Autotask={})),function(t){var e=function(){function t(t){this._securityManagement=t}return t.prototype.get_canCreateAndModifyWidgets=function(){return this._securityManagement.get_canCreateAndModifyWidgets()},t.prototype.get_canManageSharedTabs=function(){return this._securityManagement.get_canManageSharedTabs()},t}();t.InternalPageFacade=e}(AutotaskSecuritySystem||(AutotaskSecuritySystem={})),function(t){var e=function(){function t(t){this._securityManagement=t}return t.prototype.get_isDashboardOnlyUser=function(){return this._securityManagement.get_isDashboardOnlyUser()},t.prototype.initialize=function(t,e,n){this._securityManagement.initialize(t,e,n)},t}();t.PageFacade=e}(AutotaskSecuritySystem||(AutotaskSecuritySystem={})),function(t){var e=function(){function t(){this._canCreateAndModifyWidgets=!1,this._canManageSharedTabs=!1,this._isDashboardOnlyUser=!1}return t.prototype.get_canCreateAndModifyWidgets=function(){return this._canCreateAndModifyWidgets},t.prototype.get_canManageSharedTabs=function(){return this._canManageSharedTabs},t.prototype.get_isDashboardOnlyUser=function(){return this._isDashboardOnlyUser},t.prototype.initialize=function(t,e,n){this._canCreateAndModifyWidgets=n,this._canManageSharedTabs=t,this._isDashboardOnlyUser=e},t}();t.SecurityManagement=e}(AutotaskSecuritySystem||(AutotaskSecuritySystem={})),function(t){var e=function(){function t(t){this._sessionExpirationManagement=t}return t.prototype.extend=function(){this._sessionExpirationManagement.extend()},t}();t.InternalPageFacade=e}(AutotaskSessionExpirationSystem||(AutotaskSessionExpirationSystem={})),function(t){var e=function(){function t(){this._countdownEndTimeKey="SesExpCountdownEndTime",this._expiredTimeKey="SesExpExpiredTime",this._expiringTimeKey="SesExpExpiringTime",this._isContinuedKey="SesExpIsContinued",this._isExpiredKey="SesExpIsExpired",this._isExpiringKey="SesExpIsExpiring",this._isInitializedKey="SesExpIsInitialized",this._isKeepingAliveKey="SesExpIsKeepingAlive",this._isLoggedOutKey="SesExpIsLoggedOut",this._masterIdKey="SesExpMasterId",this._staleMasterActivityTimeKey="SesExpStaleMasterActivityTime",this._timerTextKey="SesExpTimerText",this._workspaceUrlKeyPrefix="SesExpWorkspaceUrl"}return Object.defineProperty(t.prototype,"countdownEndTimeKey",{get:function(){return this._countdownEndTimeKey},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"expiredTimeKey",{get:function(){return this._expiredTimeKey},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"expiringTimeKey",{get:function(){return this._expiringTimeKey},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isContinuedKey",{get:function(){return this._isContinuedKey},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isExpiredKey",{get:function(){return this._isExpiredKey},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isExpiringKey",{get:function(){return this._isExpiringKey},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isInitializedKey",{get:function(){return this._isInitializedKey},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isKeepingAliveKey",{get:function(){return this._isKeepingAliveKey},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isLoggedOutKey",{get:function(){return this._isLoggedOutKey},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"masterIdKey",{get:function(){return this._masterIdKey},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"staleMasterActivityTimeKey",{get:function(){return this._staleMasterActivityTimeKey},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"timerTextKey",{get:function(){return this._timerTextKey},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"workspaceUrlKeyPrefix",{get:function(){return this._workspaceUrlKeyPrefix},enumerable:!1,configurable:!0}),t}();t.LocalStorageKeys=e}(AutotaskSessionExpirationSystem||(AutotaskSessionExpirationSystem={})),function(t){var e=function(){function e(e,n,i){var o=this;this._id=e,this._isLandingPage=n,this._isPostedPage="Post"===i,this._statusOperation=new t.SessionStatusOperation(e,(function(){o._operationExpire()}),(function(){o._operationExpiredByInactivity()}),(function(){o._operationExpiredByLogout()}),(function(){o._statusOperationExpiring()})),this._timerOperation=new t.SessionExpiringTimerOperation(e,(function(){o._operationExpire()}),(function(){o._operationExpiredByInactivity()}),(function(){o._operationExpiredByLogout()}),(function(){o._timerOperationKeepAlive()})),window.setTimeout((function(){o._clearWorkspaceUrls()}),1e4),this._localStorageKeys=new t.LocalStorageKeys,this._dynamicParameterDictionaryParameterName="model",this._restoreWorkspaceKeyParameterName="restoreworkspacekey"}return e.prototype.extend=function(){autotask.localStorageManagement.__setItem(this._localStorageKeys.isContinuedKey,"1")},e.prototype.__initialize=function(){this.extend(),this._timerOperation.initialize(),this._statusOperation.start()},e.prototype._clearWorkspaceUrls=function(){for(var t=[],e=0;e<window.localStorage.length;e++){null!==(o=window.localStorage.key(e))&&o.substring(0,this._localStorageKeys.workspaceUrlKeyPrefix.length)===this._localStorageKeys.workspaceUrlKeyPrefix&&t.push(o)}for(var n=0,i=t;n<i.length;n++){var o=i[n];autotask.localStorageManagement.__removeItem(o)}},e.prototype._getRelativeUrl=function(){return window.location.pathname+window.location.search},e.prototype._getWorkspaceUrl=function(){return autotask.findPage().acquireWorkspaceUrl()},e.prototype._navigateToExpireSessionClosePage=function(){autotask.sessionExpirationNavigation.__expireSessionClosePage.open(null)},e.prototype._navigateToExpireSessionRestorePage=function(){var t=new AutotaskRequestDataSystem.RequestData,e=new AutotaskRequestDataSystem.RequestDataDictionary;this._isLandingPage&&(this._storeWorkspaceUrl(),e.addString(this._restoreWorkspaceKeyParameterName,this._id)),t.addDataDictionary(this._dynamicParameterDictionaryParameterName,e),autotask.sessionExpirationNavigation.__expireSessionRestorePage.applyDynamicRequestData(t),autotask.sessionExpirationNavigation.__expireSessionRestorePage.open(this._getRelativeUrl())},e.prototype._navigateToSessionExpiredByInactivityPage=function(){var t=new AutotaskRequestDataSystem.RequestData,e=new AutotaskRequestDataSystem.RequestDataDictionary;this._isLandingPage&&(this._storeWorkspaceUrl(),e.addString(this._restoreWorkspaceKeyParameterName,this._id)),t.addDataDictionary(this._dynamicParameterDictionaryParameterName,e),autotask.sessionExpirationNavigation.__sessionExpiredByInactivityPage.applyDynamicRequestData(t),autotask.sessionExpirationNavigation.__sessionExpiredByInactivityPage.open(this._getRelativeUrl())},e.prototype._navigateToSessionExpiredByLogoutPage=function(){var t=new AutotaskRequestDataSystem.RequestData,e=new AutotaskRequestDataSystem.RequestDataDictionary;this._isLandingPage&&(this._storeWorkspaceUrl(),e.addString(this._restoreWorkspaceKeyParameterName,this._id)),t.addDataDictionary(this._dynamicParameterDictionaryParameterName,e),autotask.sessionExpirationNavigation.__sessionExpiredByLogoutPage.applyDynamicRequestData(t),autotask.sessionExpirationNavigation.__sessionExpiredByLogoutPage.open(this._getRelativeUrl())},e.prototype._operationExpire=function(){this._isPostedPage?this._navigateToExpireSessionClosePage():this._navigateToExpireSessionRestorePage()},e.prototype._operationExpiredByInactivity=function(){this._isPostedPage?window.close():this._navigateToSessionExpiredByInactivityPage()},e.prototype._operationExpiredByLogout=function(){this._isPostedPage?window.close():this._navigateToSessionExpiredByLogoutPage()},e.prototype._statusOperationExpiring=function(){this._timerOperation.start()},e.prototype._storeWorkspaceUrl=function(){var t=this._getWorkspaceUrl();if(null!==t){var e=this._localStorageKeys.workspaceUrlKeyPrefix+this._id;autotask.localStorageManagement.__setItem(e,t)}},e.prototype._timerOperationKeepAlive=function(){this._statusOperation.start()},e}();t.SessionExpirationManagement=e}(AutotaskSessionExpirationSystem||(AutotaskSessionExpirationSystem={})),function(t){var e=function(){function e(e,n,i,o){this._id=e,this._expiredByInactivityHandler=i,this._expiredByLogoutHandler=o,this._expireHandler=n,this._localStorageKeys=new t.LocalStorageKeys,this._isExpiredChangedPointerKey=null,this._isLoggedOutChangedPointerKey=null,this._masterIdChangedPointerKey=null}return Object.defineProperty(e.prototype,"localStorageKeys",{get:function(){return this._localStorageKeys},enumerable:!1,configurable:!0}),e.prototype.start=function(){this.assumeSubordinateRole(),this._addIsLoggedOutChangedPointer(),this._addIsExpiredChangedPointer(),this._addMasterIdChangedPointer()},e.prototype.cleanUpLocalStorage=function(){autotask.localStorageManagement.__removeItem(this._localStorageKeys.expiredTimeKey),autotask.localStorageManagement.__removeItem(this._localStorageKeys.expiringTimeKey),autotask.localStorageManagement.__removeItem(this._localStorageKeys.isContinuedKey),autotask.localStorageManagement.__removeItem(this._localStorageKeys.isExpiredKey),autotask.localStorageManagement.__removeItem(this._localStorageKeys.isExpiringKey),autotask.localStorageManagement.__removeItem(this._localStorageKeys.isInitializedKey),autotask.localStorageManagement.__removeItem(this._localStorageKeys.isLoggedOutKey),autotask.localStorageManagement.__removeItem(this._localStorageKeys.masterIdKey),autotask.localStorageManagement.__removeItem(this._localStorageKeys.staleMasterActivityTimeKey)},e.prototype.forceActiveMasterActivityTime=function(){autotask.localStorageManagement.__removeItem(this._localStorageKeys.staleMasterActivityTimeKey)},e.prototype.forceStaleMasterActivityTime=function(){autotask.localStorageManagement.__setItem(this._localStorageKeys.staleMasterActivityTimeKey,(0).toString())},e.prototype.getUtcNow=function(){var t=new Date;return Date.now()+60*t.getTimezoneOffset()*1e3},e.prototype.initializeExpirationTimes=function(){var t=this.getUtcNow(),e=t+264e5;autotask.localStorageManagement.__setItem(this._localStorageKeys.expiringTimeKey,e.toString());var n=t+3e4+285e5;autotask.localStorageManagement.__setItem(this._localStorageKeys.expiredTimeKey,n.toString())},e.prototype.initializeLocalStorage=function(){this.cleanUpLocalStorage(),autotask.localStorageManagement.__setItem(this._localStorageKeys.isInitializedKey,"1"),this.initializeExpirationTimes()},e.prototype.isLocalStorageInitialized=function(){return null!==autotask.localStorageManagement.__getItem(this._localStorageKeys.isInitializedKey)},e.prototype.isMaster=function(){return autotask.localStorageManagement.__getItem(this._localStorageKeys.masterIdKey)===this._id},e.prototype.isMasterActive=function(){var t=!0,e=autotask.localStorageManagement.__getItem(this._localStorageKeys.staleMasterActivityTimeKey);return null!==e&&(t=this.getUtcNow()<window.autotask.convert.stringToInteger(e)),t},e.prototype.isSessionContinued=function(){return null!==autotask.localStorageManagement.__getItem(this._localStorageKeys.isContinuedKey)},e.prototype.isSessionExpired=function(){var t=!0,e=autotask.localStorageManagement.__getItem(this._localStorageKeys.expiredTimeKey);return null!==e&&(t=this.getUtcNow()>window.autotask.convert.stringToInteger(e)),t},e.prototype.makeMaster=function(){autotask.localStorageManagement.__setItem(this._localStorageKeys.masterIdKey,this._id)},e.prototype.onExpire=function(){this._expireHandler()},e.prototype.onSessionExpiredByInactivity=function(){this._expiredByInactivityHandler()},e.prototype.storeStaleMasterActivityTime=function(){var t=this.getUtcNow()+this.staleActivityMillisecondsThreshold;autotask.localStorageManagement.__setItem(this._localStorageKeys.staleMasterActivityTimeKey,t.toString())},e.prototype._addIsExpiredChangedPointer=function(){var t=this;null===this._isExpiredChangedPointerKey&&(this._isExpiredChangedPointerKey=autotask.localStorageManagement.__addStorageChangedHandler((function(e,n){t._isExpiredChanged(e,n)})))},e.prototype._addIsLoggedOutChangedPointer=function(){var t=this;null===this._isLoggedOutChangedPointerKey&&(this._isLoggedOutChangedPointerKey=autotask.localStorageManagement.__addStorageChangedHandler((function(e,n){t._isLoggedOutChanged(e,n)})))},e.prototype._addMasterIdChangedPointer=function(){var t=this;null===this._masterIdChangedPointerKey&&(this._masterIdChangedPointerKey=autotask.localStorageManagement.__addStorageChangedHandler((function(e,n){t._masterIdChanged(e,n)})))},e.prototype._isExpiredChanged=function(t,e){t===this._localStorageKeys.isExpiredKey&&null!==e&&(this.stop(),this.onSessionExpiredByInactivity())},e.prototype._isLoggedOutChanged=function(t,e){t===this._localStorageKeys.isLoggedOutKey&&null!==e&&(this.stop(),this._onSessionExpiredByLogout())},e.prototype._masterIdChanged=function(t,e){t===this._localStorageKeys.masterIdKey&&e!==this._id&&(this.abandonMasterRole(),this.assumeSubordinateRole())},e.prototype._onSessionExpiredByLogout=function(){this._expiredByLogoutHandler()},e.prototype._removeIsExpiredChangedPointer=function(){null!==this._isExpiredChangedPointerKey&&(autotask.localStorageManagement.__removeStorageChangedPointer(this._isExpiredChangedPointerKey),this._isExpiredChangedPointerKey=null)},e.prototype._removeIsLoggedOutChangedPointer=function(){null!==this._isLoggedOutChangedPointerKey&&(autotask.localStorageManagement.__removeStorageChangedPointer(this._isLoggedOutChangedPointerKey),this._isLoggedOutChangedPointerKey=null)},e.prototype._removeMasterIdChangedPointer=function(){null!==this._masterIdChangedPointerKey&&(autotask.localStorageManagement.__removeStorageChangedPointer(this._masterIdChangedPointerKey),this._masterIdChangedPointerKey=null)},e.prototype.stop=function(){this._removeMasterIdChangedPointer(),this._removeIsExpiredChangedPointer(),this._removeIsLoggedOutChangedPointer(),autotask.localStorageManagement.__removeItem(this._localStorageKeys.masterIdKey)},e}();t.SessionExpirationOperation=e}(AutotaskSessionExpirationSystem||(AutotaskSessionExpirationSystem={})),function(t){var e=function(t){function e(e,n,i,o,a){var r=t.call(this,e,n,i,o)||this;return r._keepAliveHandler=a,r._countdownIntervalId=null,r._dialog=null,r._intervalId=null,r._isKeepingAliveChangedPointerKey=null,r}return __extends(e,t),Object.defineProperty(e.prototype,"staleActivityMillisecondsThreshold",{get:function(){return 300},enumerable:!1,configurable:!0}),e.prototype.initialize=function(){var t=this,e=autotask.find("SessionNoticeDialog");e.set_keepAlivePointer((function(){t._expiringDialogKeepAlive()})),this._dialog=e},e.prototype.start=function(){var e=this;t.prototype.start.call(this),this._showExpiringDialog(),this._addIsKeepingAliveChangedPointer(),this._interval(),null===this._intervalId&&(this._intervalId=window.setInterval((function(){e._interval()}),100))},e.prototype.abandonMasterRole=function(){this._clearCountdownInterval()},e.prototype.assumeSubordinateRole=function(){},e.prototype.stop=function(){null!==this._intervalId&&(window.clearInterval(this._intervalId),this._intervalId=null),this._clearCountdownInterval(),t.prototype.stop.call(this),this._removeIsKeepingAliveChangedPointer()},e.prototype._addIsKeepingAliveChangedPointer=function(){var t=this;null===this._isKeepingAliveChangedPointerKey&&(this._isKeepingAliveChangedPointerKey=autotask.localStorageManagement.__addStorageChangedHandler((function(e,n){t._isKeepingAliveChanged(e,n)})))},e.prototype._assumeMasterRole=function(){this.makeMaster(),this.storeStaleMasterActivityTime(),this._startCountdownInterval()},e.prototype._clearCountdownInterval=function(){null!==this._countdownIntervalId&&(window.clearInterval(this._countdownIntervalId),this._countdownIntervalId=null)},e.prototype._createTimerText=function(t){var e="0:01";if(t>1){var n=Math.floor(t/60),i=t%60,o=i<10?"0"+i.toString():i.toString();e=n.toString()+":"+o}return e},e.prototype._countdownInterval=function(){var t=this._getCountdownSeconds();autotask.localStorageManagement.__setItem(this.localStorageKeys.timerTextKey,this._createTimerText(t)),0===t&&(this.forceActiveMasterActivityTime(),this.stop(),this.cleanUpLocalStorage(),autotask.localStorageManagement.__setItem(this.localStorageKeys.isExpiredKey,"1"),this.onExpire())},e.prototype._getCountdownSeconds=function(){var t,e=this.getUtcNow(),n=autotask.localStorageManagement.__getItem(this.localStorageKeys.countdownEndTimeKey);if(null===n){t=e+18e5;var i=autotask.localStorageManagement.__getItem(this.localStorageKeys.expiredTimeKey);if(null!==i){var o=window.autotask.convert.stringToInteger(i);t>o&&(t=o)}n=t.toString(),autotask.localStorageManagement.__setItem(this.localStorageKeys.countdownEndTimeKey,n)}else t=window.autotask.convert.stringToInteger(n);var a=t-e;return Math.floor(a/1e3)},e.prototype._getDialog=function(){return null===this._dialog?autotask.throwException("The dialog is not set."):this._dialog},e.prototype._getTimerText=function(){var t=autotask.localStorageManagement.__getItem(this.localStorageKeys.timerTextKey);if(null===t){var e=this._getCountdownSeconds();t=this._createTimerText(e),autotask.localStorageManagement.__setItem(this.localStorageKeys.timerTextKey,t)}return t},e.prototype._hideExpiringDialog=function(){this._getDialog().hide()},e.prototype._expiringDialogKeepAlive=function(){var t=this;this.forceActiveMasterActivityTime(),this.stop(),(new JsonGetRouteCreator).createJsonGetRoute(autotask.sessionExpirationNavigation.__keepAliveUrl).makeRequest(null,(function(){t._keepAliveSuccess()}))},e.prototype._interval=function(){var t=this._getDialog(),e=this._getTimerText();t.updateTimerText(e),this.isMaster()?this.isSessionContinued()?this._keepAlive():this.isSessionExpired()?(this.forceActiveMasterActivityTime(),this.stop(),this.cleanUpLocalStorage(),autotask.localStorageManagement.__setItem(this.localStorageKeys.isExpiredKey,"1"),this.onExpire()):this.storeStaleMasterActivityTime():this.isMasterActive()||this._assumeMasterRole()},e.prototype._isKeepingAliveChanged=function(t,e){t===this.localStorageKeys.isKeepingAliveKey&&null!==e&&(this.stop(),this._hideExpiringDialog(),this._onKeepAlive())},e.prototype._keepAlive=function(){this._hideExpiringDialog(),this.cleanUpLocalStorage(),autotask.localStorageManagement.__setItem(this.localStorageKeys.isKeepingAliveKey,"1"),this.forceStaleMasterActivityTime(),this._onKeepAlive()},e.prototype._keepAliveSuccess=function(){this._keepAlive()},e.prototype._onKeepAlive=function(){this._keepAliveHandler()},e.prototype._removeIsKeepingAliveChangedPointer=function(){null!==this._isKeepingAliveChangedPointerKey&&(autotask.localStorageManagement.__removeStorageChangedPointer(this._isKeepingAliveChangedPointerKey),this._isKeepingAliveChangedPointerKey=null)},e.prototype._showExpiringDialog=function(){this._getDialog().show()},e.prototype._startCountdownInterval=function(){var t=this;this._countdownInterval(),null===this._countdownIntervalId&&(this._countdownIntervalId=window.setInterval((function(){t._countdownInterval()}),100))},e}(t.SessionExpirationOperation);t.SessionExpiringTimerOperation=e}(AutotaskSessionExpirationSystem||(AutotaskSessionExpirationSystem={})),function(t){var e=function(t){function e(e,n,i,o,a){var r=t.call(this,e,n,i,o)||this;return r._expiringHandler=a,r._intervalId=null,r._isExpiringChangedPointerKey=null,r}return __extends(e,t),Object.defineProperty(e.prototype,"staleActivityMillisecondsThreshold",{get:function(){return 6e3},enumerable:!1,configurable:!0}),e.prototype.start=function(){var e=this;t.prototype.start.call(this),this._interval(),null===this._intervalId&&(this._intervalId=window.setInterval((function(){e._interval()}),5e3))},e.prototype.abandonMasterRole=function(){},e.prototype.assumeSubordinateRole=function(){this._addIsExpiringChangedPointer()},e.prototype.stop=function(){null!==this._intervalId&&(window.clearInterval(this._intervalId),this._intervalId=null),t.prototype.stop.call(this),this._removeIsExpiringChangedPointer()},e.prototype._abandonSubordinateRole=function(){this._removeIsExpiringChangedPointer()},e.prototype._addIsExpiringChangedPointer=function(){var t=this;null===this._isExpiringChangedPointerKey&&(this._isExpiringChangedPointerKey=autotask.localStorageManagement.__addStorageChangedHandler((function(e,n){t._isExpiringChanged(e,n)})))},e.prototype._assumeMasterRole=function(){this.makeMaster(),this.storeStaleMasterActivityTime()},e.prototype._interval=function(){this.isLocalStorageInitialized()?this.isMaster()?this.isSessionContinued()?(autotask.localStorageManagement.__removeItem(this.localStorageKeys.isContinuedKey),this.initializeExpirationTimes()):this._isSessionExpiring()?(this.forceActiveMasterActivityTime(),this.isSessionExpired()?(this.stop(),this.cleanUpLocalStorage(),autotask.localStorageManagement.__setItem(this.localStorageKeys.isExpiredKey,"1"),this.onExpire()):(this.stop(),autotask.localStorageManagement.__removeItem(this.localStorageKeys.countdownEndTimeKey),autotask.localStorageManagement.__removeItem(this.localStorageKeys.isKeepingAliveKey),autotask.localStorageManagement.__removeItem(this.localStorageKeys.timerTextKey),autotask.localStorageManagement.__setItem(this.localStorageKeys.isExpiringKey,"1"),this.forceStaleMasterActivityTime(),this._onExpiring())):this.storeStaleMasterActivityTime():this.isMasterActive()||(this._abandonSubordinateRole(),this._assumeMasterRole()):(this._abandonSubordinateRole(),this.initializeLocalStorage(),this._assumeMasterRole())},e.prototype._isExpiringChanged=function(t,e){t===this.localStorageKeys.isExpiringKey&&null!==e&&(this.stop(),this._abandonSubordinateRole(),this._onExpiring())},e.prototype._isSessionExpiring=function(){var t=!0,e=autotask.localStorageManagement.__getItem(this.localStorageKeys.expiringTimeKey);return null!==e&&(t=this.getUtcNow()>window.autotask.convert.stringToInteger(e)),t},e.prototype._onExpiring=function(){this._expiringHandler()},e.prototype._removeIsExpiringChangedPointer=function(){null!==this._isExpiringChangedPointerKey&&(autotask.localStorageManagement.__removeStorageChangedPointer(this._isExpiringChangedPointerKey),this._isExpiringChangedPointerKey=null)},e}(t.SessionExpirationOperation);t.SessionStatusOperation=e}(AutotaskSessionExpirationSystem||(AutotaskSessionExpirationSystem={})),function(t){var e=function(){function t(t){if(this._data="",this._dictionary={},this._delimiter="|",null!==t){this._data=t;for(var e=t.split(this._delimiter),n=0;n<e.length;n+=2)this._dictionary[e[n]]=e[n+1]}}return Object.defineProperty(t.prototype,"workspaceUrlData",{get:function(){return this._data},enumerable:!1,configurable:!0}),t.prototype.add=function(t,e){this._dictionary[t]=e,this._syncData()},t.prototype.find=function(t){var e=null;return void 0!==this._dictionary[t]&&(e=this._dictionary[t]),e},t.prototype.remove=function(t){void 0!==this._dictionary[t]&&(delete this._dictionary[t],this._syncData())},t.prototype._syncData=function(){var t="",e=0;for(var n in this._dictionary)this._dictionary.hasOwnProperty(n)&&(e>0&&(t+=this._delimiter),t+=n,t+=this._delimiter,t+=this._dictionary[n],e++);this._data=t},t}();t.WorkspaceUrlDictionary=e}(AutotaskSessionExpirationSystem||(AutotaskSessionExpirationSystem={})),function(t){var e=function(t){function e(e){var n=t.call(this,e)||this;return n._saveCoordinator=new AutotaskSaveCoordinatorSystem.SimpleEntityDetailSaveCoordinator,n}return __extends(e,t),Object.defineProperty(e.prototype,"saveCoordinator",{get:function(){return this._saveCoordinator},enumerable:!1,configurable:!0}),e}(Autotask.LifecycleObject);t.SimpleEntityDetailShellContent=e}(AutotaskShellContent||(AutotaskShellContent={})),function(t){var e=function(t){function e(e,n){var i=t.call(this,e)||this;i._postedContainerElement=AutotaskDomSystem.Document.getElementById(n);var o=new PostedContainerValidationCreator;return i._postedContainerValidation=o.createValidation(i._postedContainerElement),i._saveCoordinator=new AutotaskSaveCoordinatorSystem.SimpleEntityEditSaveCoordinator((function(){return i._validatingHandler()}),(function(t){i._submittingHandler(t)})),i._immutableData=[],i._notificationSlideOut=null,i._submittedHandler=null,i}return __extends(e,t),Object.defineProperty(e.prototype,"saveCoordinator",{get:function(){return this._saveCoordinator},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"submittedHandler",{set:function(t){this._submittedHandler=t},enumerable:!1,configurable:!0}),e.prototype.generateFieldData=function(){for(var t=new AutotaskRequestDataSystem.SerializedRequestData([this._postedContainerElement]),e=0,n=this._immutableData;e<n.length;e++){var i=n[e];t.__addImmutableData(i)}return t},e.prototype.prepareValidation=function(t){var e=this;t.__addValidationFailed((function(){e._validationFailedHandler()})),this._postedContainerValidation.__registerValidationSummary(t),this._postedContainerValidation.__parse()},e.prototype.resetValidation=function(){this._postedContainerValidation.__reset()},e.prototype.validate=function(t){var e=this._postedContainerValidation.__validate();return e||this._postedContainerValidation.__validationFailed(),this._postedContainerValidation.__validationCompleted(e,t),e},e.prototype.__addImmutableData=function(t){this._immutableData.push(t)},e.prototype.__setNotificationSlideOut=function(t){this._notificationSlideOut=t},e.prototype.__validateEditor=function(t){var e;return(e="function"==typeof t.validate?t.validate():this._postedContainerValidation.__validateLegacyEditor(t.__get_id(),!1))||this._postedContainerValidation.__validationFailed(),this._postedContainerValidation.__validationCompleted(e,!1),e},e.prototype._raiseSubmittedEvent=function(t){null!==this._submittedHandler&&this._submittedHandler(t)},e.prototype._submittingHandler=function(t){var e=this;if(null!==this._notificationSlideOut){var n=this._notificationSlideOut.get_panel();t.data.addFieldData(n.__get_postingModelParameterName(),n.__createSerializedRequestData())}(new DeprecatedSubmitRouteCreator).createDeprecatedSubmitRoute(t.url).makeRequest(t.data,(function(n){e._submitSuccessHandler(n,t.successHandler)}))},e.prototype._submitSuccessHandler=function(t,e){this._raiseSubmittedEvent(t.customValidationMessages);var n={};n.validationFailure=t.customValidationMessages.length>0,n.value=t.value,e(n)},e.prototype._validatingHandler=function(){return this.validate(!1)},e.prototype._validationFailedHandler=function(){null!==this._notificationSlideOut&&this._notificationSlideOut.hide()},e}(Autotask.LifecycleObject);t.SimpleEntityEditShellContent=e}(AutotaskShellContent||(AutotaskShellContent={})),function(t){var e=function(t){function e(e,n){var i=t.call(this,e)||this;i._postedContainerElement=AutotaskDomSystem.Document.getElementById(n);var o=new PostedContainerValidationCreator;return i._postedContainerValidation=o.createValidation(i._postedContainerElement),i._saveCoordinator=new AutotaskSaveCoordinatorSystem.SimpleEntityNewSaveCoordinator((function(){return i._validatingHandler()}),(function(t){i._submittingHandler(t)})),i._immutableData=[],i._notificationSlideOut=null,i._submittedHandler=null,i}return __extends(e,t),Object.defineProperty(e.prototype,"saveCoordinator",{get:function(){return this._saveCoordinator},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"submittedHandler",{set:function(t){this._submittedHandler=t},enumerable:!1,configurable:!0}),e.prototype.generateFieldData=function(){for(var t=new AutotaskRequestDataSystem.SerializedRequestData([this._postedContainerElement]),e=0,n=this._immutableData;e<n.length;e++){var i=n[e];t.__addImmutableData(i)}return t},e.prototype.prepareValidation=function(t){var e=this;t.__addValidationFailed((function(){e._validationFailedHandler()})),this._postedContainerValidation.__registerValidationSummary(t),this._postedContainerValidation.__parse()},e.prototype.resetValidation=function(){this._postedContainerValidation.__reset()},e.prototype.validate=function(t){var e=this._postedContainerValidation.__validate();return e||this._postedContainerValidation.__validationFailed(),this._postedContainerValidation.__validationCompleted(e,t),e},e.prototype.__addImmutableData=function(t){this._immutableData.push(t)},e.prototype.__setNotificationSlideOut=function(t){this._notificationSlideOut=t},e.prototype.__validateEditor=function(t){var e;return(e="function"==typeof t.validate?t.validate():this._postedContainerValidation.__validateLegacyEditor(t.__get_id(),!1))||this._postedContainerValidation.__validationFailed(),this._postedContainerValidation.__validationCompleted(e,!1),e},e.prototype._raiseSubmittedEvent=function(t){null!==this._submittedHandler&&this._submittedHandler(t)},e.prototype._submittingHandler=function(t){var e=this;if(null!==this._notificationSlideOut){var n=this._notificationSlideOut.get_panel();t.data.addFieldData(n.__get_postingModelParameterName(),n.__createSerializedRequestData())}(new DeprecatedSubmitRouteCreator).createDeprecatedSubmitRoute(t.url).makeRequest(t.data,(function(n){e._submitSuccessHandler(n,t.successHandler)}))},e.prototype._submitSuccessHandler=function(t,e){this._raiseSubmittedEvent(t.customValidationMessages);var n={};n.validationFailure=t.customValidationMessages.length>0,n.value=t.value,e(n)},e.prototype._validatingHandler=function(){return this.validate(!1)},e.prototype._validationFailedHandler=function(){null!==this._notificationSlideOut&&this._notificationSlideOut.hide()},e}(Autotask.LifecycleObject);t.SimpleEntityNewShellContent=e}(AutotaskShellContent||(AutotaskShellContent={})),function(t){var e=function(t){function e(e,n,i,o,a){var r=t.call(this,e)||this;return r._kaseyaOnePageBehavior=n,r._menuRoute=o,r._usageTrackingRoute=i,r._menuOverlayId=a,r._buttonElement=AutotaskDomSystem.Document.getElementById(e),r._iconElement=r._buttonElement.firstElementChild,r._isOverlayAvailable=!1,r._menuOverlay=null,r}return __extends(e,t),e.prototype.__initialize=function(){var t=this;new AutotaskButtonSystem.EventsManagement((function(){t._clickEventHandler()}),(function(){}),(function(){}),(function(){}),(function(){})).registerElement(this._buttonElement),null!==this._menuOverlayId&&(this._menuOverlay=autotask.find(this._menuOverlayId)),this._requestMenu()},e.prototype._clickEventHandler=function(){var t,e,n;this._isOverlayAvailable?(null===(t=this._menuOverlay)||void 0===t?void 0:t.isVisible)?null===(e=this._menuOverlay)||void 0===e||e.__hideWithoutDelay():null===(n=this._menuOverlay)||void 0===n||n.show(this._buttonElement):(this._kaseyaOnePageBehavior.open(null),this._usageTrackingRoute.__makeRequest())},e.prototype._enableWaffleMenu=function(){this._isOverlayAvailable=!0,this._iconElement.classList.add("Waffle")},e.prototype._requestMenu=function(){var t=this;null!==this._menuRoute&&this._menuRoute.__makeRequest((function(e){t._requestMenuResponseHandler(e)}),(function(e){t._requestMenuErrorHandler(e)}))},e.prototype._requestMenuErrorHandler=function(t){var e;null===(e=this._menuOverlay)||void 0===e||e.applyErrorMessage(t),this._enableWaffleMenu()},e.prototype._requestMenuResponseHandler=function(t){var e;t.isMenuAvailable&&void 0!==t.html&&void 0!==t.javaScript&&(null===(e=this._menuOverlay)||void 0===e||e.applyMenuHtml(t.html,t.javaScript),this._enableWaffleMenu())},e}(Autotask.LifecycleObject);t.ApplicationLauncherButton=e}(AutotaskSiteNavigationSystem||(AutotaskSiteNavigationSystem={})),function(t){var e=function(t){function e(e,n){var i=t.call(this,e,!1)||this;return i._defaultStyleCoordinator=new AutotaskOverlaySystem.DefaultStyleCoordinator(i._overlayElementStyleApplicator),i._instanceTracker=new Autotask.InstanceTracker(n,n),i._menuContainerElement=AutotaskDomSystem.Document.getElementById(n),i._activeCssClass="Active",i._errorCssClass="Error",i}return __extends(e,t),e.prototype.applyErrorMessage=function(t){this._menuContainerElement.classList.add(this._errorCssClass),this._instanceTracker.__loadError(t)},e.prototype.applyMenuHtml=function(t,e){this._instanceTracker.__loadHtmlAndJavaScript(t,e)},e.prototype.show=function(t){this._show(t)},Object.defineProperty(e.prototype,"_delayBeforeHiding",{get:function(){return 150},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_delayBeforeShowing",{get:function(){return window.autotask.deviceDetection.isTouch()?0:150},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_styleCoordinator",{get:function(){return this._defaultStyleCoordinator},enumerable:!1,configurable:!0}),e.prototype._createPositionCoordinator=function(t){var e=new AutotaskOverlaySystem.PositionCoordinator,n=new AutotaskPositionSystem.BottomAlignedRight(5,-41),i=new AutotaskPositionApplicatorSystem.Default(this._defaultStyleCoordinator,t,null,this._activeCssClass);return e.addPositionAndApplicator(n,i),e},e}(AutotaskOverlaySystem.ContextOverlay);t.ApplicationLauncherMenuOverlay=e}(AutotaskSiteNavigationSystem||(AutotaskSiteNavigationSystem={})),function(t){var e=function(t){function e(e,n){var i=t.call(this,e)||this;return i._usageTrackingRoute=n,i._buttonElement=AutotaskDomSystem.Document.getElementById(e),i}return __extends(e,t),e.prototype.__initialize=function(){var t=this;new AutotaskButtonSystem.EventsManagement((function(){t._clickEventHandler()}),(function(){}),(function(){}),(function(){}),(function(){})).registerElement(this._buttonElement)},e.prototype._clickEventHandler=function(){window.autotask.contextOverlayManagement.__hideVisibleContextOverlays(),this._usageTrackingRoute.__makeRequest()},e}(Autotask.LifecycleObject);t.KaseyaOneButton=e}(AutotaskSiteNavigationSystem||(AutotaskSiteNavigationSystem={})),function(t){var e=function(t){function e(e,n){var i=t.call(this,e)||this;i._clickHandler=n;var o=AutotaskDomSystem.Document.getElementById(e);return i._logoElement=AutotaskDomSystem.Document.getChildElementByClassName(o,"AutotaskLogoImage"),i}return __extends(e,t),e.prototype.__initialize=function(){new AutotaskButtonSystem.EventsManagement(this._clickHandler,(function(){}),(function(){}),(function(){}),(function(){})).registerElement(this._logoElement)},e}(Autotask.LifecycleObject);t.LogoButton=e}(AutotaskSiteNavigationSystem||(AutotaskSiteNavigationSystem={})),function(t){var e=function(t){function e(e,n){var i=t.call(this,e)||this;return i._usageTrackingRoute=n,i._buttonElement=AutotaskDomSystem.Document.getElementById(e),i}return __extends(e,t),e.prototype.__initialize=function(){var t=this;new AutotaskButtonSystem.EventsManagement((function(){t._clickEventHandler()}),(function(){}),(function(){}),(function(){}),(function(){})).registerElement(this._buttonElement)},e.prototype._clickEventHandler=function(){window.autotask.contextOverlayManagement.__hideVisibleContextOverlays(),this._usageTrackingRoute.__makeRequest()},e}(Autotask.LifecycleObject);t.ProductButton=e}(AutotaskSiteNavigationSystem||(AutotaskSiteNavigationSystem={})),function(t){var e=function(t){function e(e,n){var i=t.call(this,e)||this;return i._menuOverlayId=n,i._searchBoxElement=AutotaskDomSystem.Document.getElementById(e),i._searchBoxElement.addEventListener("click",(function(){i._searchBoxClickListener()})),i._searchBoxElement.addEventListener("mouseenter",(function(){i._searchBoxMouseEnterListener()})),i._searchBoxElement.addEventListener("mouseleave",(function(){i._searchBoxMouseLeaveListener()})),i._inputElement=i._searchBoxElement.children[0],i._inputElement.addEventListener("blur",(function(){i._inputBlurListener()})),i._inputElement.addEventListener("click",(function(){i._inputClickListener()})),i._inputElement.addEventListener("focus",(function(){i._inputFocusListener()})),i._inputElement.addEventListener("keyup",(function(t){i._inputKeyUpListener(t)})),i._searchBoxElement.children[1].addEventListener("click",(function(){i._searchButtonClickListener()})),i._isFocused=!1,i._isHovered=!1,i._menuOverlay=null,i._searchByEnterKeyDelegate=null,i}return __extends(e,t),Object.defineProperty(e.prototype,"searchText",{get:function(){return this._inputElement.value.length>0?this._inputElement.value:null},set:function(t){this._inputElement.value=null===t?"":t},enumerable:!1,configurable:!0}),e.prototype.configure=function(t){this._searchByEnterKeyDelegate=t},e.prototype.focusSearchBox=function(){this._inputElement.focus(),this._setFocusedState(),this._showMenuOverlay()},e.prototype.getSearchTypeRadioButton=function(t){return this._menuOverlay.getSearchTypeRadioButton(t)},e.prototype.getSelectedSearchTypeRadioButton=function(){return this._menuOverlay.getSelectedSearchTypeRadioButton()},e.prototype.hideMenuOverlay=function(){var t;null===(t=this._menuOverlay)||void 0===t||t.hide()},e.prototype.selectSearchBoxText=function(){this._inputElement.select()},e.prototype.showMenuOverlay=function(){this._showMenuOverlay()},e.prototype.__initialize=function(){this._menuOverlay=autotask.find(this._menuOverlayId),this._menuOverlay.configure(this._searchBoxElement)},e.prototype._clearFocusedState=function(){this._isFocused&&(this._isFocused=!1,this._searchBoxElement.classList.remove("FocusedState"))},e.prototype._clearHoverState=function(){this._isHovered&&(this._isHovered=!1,this._searchBoxElement.classList.remove("HoverState"))},e.prototype._inputBlurListener=function(){this._clearFocusedState()},e.prototype._inputClickListener=function(){this._showMenuOverlay()},e.prototype._inputFocusListener=function(){this._setFocusedState(),this._showMenuOverlay()},e.prototype._inputKeyUpListener=function(t){AutotaskDomSystem.KeyCode.isEnter(t.keyCode)?(null!==this._searchByEnterKeyDelegate&&this._searchByEnterKeyDelegate(),autotask.navigation.searchCoordinator.search()):this._showMenuOverlay()},e.prototype._searchBoxClickListener=function(){this._isFocused||(this._inputElement.focus(),this._setFocusedState(),this._showMenuOverlay())},e.prototype._searchBoxMouseEnterListener=function(){var t;this._isFocused||this._setHoverState(),(null===(t=this._menuOverlay)||void 0===t?void 0:t.isVisible)&&this._showMenuOverlay()},e.prototype._searchBoxMouseLeaveListener=function(){var t;this._isFocused?null===(t=this._menuOverlay)||void 0===t||t.hide():this._clearHoverState()},e.prototype._searchButtonClickListener=function(){this._isFocused||(this._inputElement.focus(),this._setFocusedState()),autotask.navigation.searchCoordinator.search()},e.prototype._setFocusedState=function(){this._isFocused||(this._isFocused=!0,this._searchBoxElement.classList.add("FocusedState"),this._clearHoverState())},e.prototype._setHoverState=function(){this._isHovered||(this._isHovered=!0,this._searchBoxElement.classList.add("HoverState"))},e.prototype._showMenuOverlay=function(){var t;null===(t=this._menuOverlay)||void 0===t||t.show()},e}(Autotask.LifecycleObject);t.SearchBox=e}(AutotaskSiteNavigationSystem||(AutotaskSiteNavigationSystem={})),function(t){var e=function(){function t(){this._emptySearchErrorMessage=null,this._searchBox=null}return t.prototype.focus=function(){var t;null===(t=this._searchBox)||void 0===t||t.focusSearchBox()},t.prototype.performRecentSearch=function(t,e,n){if(null!==this._searchBox){this._searchBox.searchText=t;var i=this._searchBox.getSearchTypeRadioButton(e);null==i||i.search(t,n)}},t.prototype.search=function(){var t=this;if(null!==this._searchBox){var e=this._searchBox.searchText;if(this._searchBox.hideMenuOverlay(),null!==e&&e.length>0){var n=this._searchBox.getSelectedSearchTypeRadioButton();null==n||n.search(e,!1)}else{var i=new Autotask.AlertDialogOptions;i.set_description(this._emptySearchErrorMessage),i.set_okayPointer((function(){var e;null===(e=t._searchBox)||void 0===e||e.focusSearchBox()})),autotask.alertDialog.show(i)}}},t.prototype.__initialize=function(t,e){this._searchBox=autotask.find(t),this._emptySearchErrorMessage=e},t}();t.SearchCoordinator=e}(AutotaskSiteNavigationSystem||(AutotaskSiteNavigationSystem={})),function(t){var e=function(t){function e(e,n){var i=t.call(this,e,!0)||this;return i._defaultStyleCoordinator=new AutotaskOverlaySystem.DefaultStyleCoordinator(i._overlayElementStyleApplicator),i._searchBoxElement=null,i._menuContainerElement=AutotaskDomSystem.Document.getElementById(n),i}return __extends(e,t),e.prototype.configure=function(t){this._searchBoxElement=t},e.prototype.getSearchTypeRadioButton=function(t){for(var e=this._menuContainerElement.querySelectorAll("[data-search-menu-system]"),n=0;n<e.length;n++){var i=autotask.find(e[n].id);if(i.get_searchType()===t)return i}return null},e.prototype.getSelectedSearchTypeRadioButton=function(){for(var t=this._menuContainerElement.querySelectorAll("[data-search-menu-system]"),e=0;e<t.length;e++){var n=autotask.find(t[e].id);if(n.isSelected())return n}return null},e.prototype.show=function(){this._show(this._searchBoxElement)},Object.defineProperty(e.prototype,"_delayBeforeHiding",{get:function(){return 150},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_delayBeforeShowing",{get:function(){return window.autotask.deviceDetection.isTouch()?0:150},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_styleCoordinator",{get:function(){return this._defaultStyleCoordinator},enumerable:!1,configurable:!0}),e.prototype._createPositionCoordinator=function(t){var e=new AutotaskOverlaySystem.PositionCoordinator,n=new AutotaskPositionSystem.BottomAlignedLeft(0,0),i=new AutotaskPositionApplicatorSystem.Default(this._defaultStyleCoordinator,t,null,"Active");return e.addPositionAndApplicator(n,i),e},e}(AutotaskOverlaySystem.ContextOverlay);t.SearchMenuOverlay=e}(AutotaskSiteNavigationSystem||(AutotaskSiteNavigationSystem={})),function(t){var e=function(){function t(t){this._slideOutManagement=t}return t.prototype.set_taskWorkListRefreshUrl=function(t){this._slideOutManagement.set_taskWorkListRefreshUrl(t)},t.prototype.set_ticketWorkListRefreshUrl=function(t){this._slideOutManagement.set_ticketWorkListRefreshUrl(t)},t.prototype.set_taskWorkListSettingsDialogUrl=function(t){this._slideOutManagement.set_taskWorkListSettingsDialogUrl(t)},t.prototype.set_ticketWorkListSettingsDialogUrl=function(t){this._slideOutManagement.set_ticketWorkListSettingsDialogUrl(t)},t.prototype.get_ticketHandleElement=function(){return this._slideOutManagement.get_ticketHandleElement()},t.prototype.get_taskHandleElement=function(){return this._slideOutManagement.get_taskHandleElement()},t.prototype.get_slideOutElement=function(){return this._slideOutManagement.get_slideOutElement()},t.prototype.initialize=function(t,e,n,i){this._slideOutManagement.initialize(t,e,n,i)},t}();t.InternalPageFacade=e}(AutotaskSlideOutSystem||(AutotaskSlideOutSystem={})),function(t){var e=function(){function t(t){this._slideOutManagement=t}return t.prototype.get_popupWindow=function(){return this._slideOutManagement.get_popupWindow()},t.prototype.set_popupWindow=function(t){return this._slideOutManagement.set_popupWindow(t)},t.prototype.get_state=function(){return this._slideOutManagement.get_state()},t.prototype.get_workListBadgeCounts=function(){return this._slideOutManagement.get_workListBadgeCounts()},t.prototype.get_workListItemsScrollPosition=function(){return this._slideOutManagement.get_workListItemsScrollPosition()},t.prototype.set_workListItemsScrollPosition=function(t){this._slideOutManagement.set_workListItemsScrollPosition(t)},t.prototype.get_workListType=function(){return this._slideOutManagement.get_workListType()},t.prototype.set_workListType=function(t){this._slideOutManagement.set_workListType(t)},t.prototype.get_workListRefreshUrl=function(){return this._slideOutManagement.get_workListRefreshUrl()},t.prototype.get_workListSettingsDialogUrl=function(){return this._slideOutManagement.get_workListSettingsDialogUrl()},t.prototype.canRefreshWorkList=function(){return this._slideOutManagement.canRefreshWorkList()},t.prototype.canRefreshWorkListBadges=function(){return this._slideOutManagement.canRefreshWorkListBadges()},t.prototype.canRefreshWorkListPopup=function(){return this._slideOutManagement.canRefreshWorkListPopup()},t.prototype.refresh=function(){this._slideOutManagement.refresh()},t.prototype.set_slideOutStateDisabled=function(t){this._slideOutManagement.set_slideOutStateDisabled(t)},t.prototype.set_slideOutStateIn=function(){this._slideOutManagement.set_slideOutStateIn()},t.prototype.set_slideOutStateOut=function(){this._slideOutManagement.set_slideOutStateOut()},t.prototype.toggle=function(){this._slideOutManagement.toggle()},t}();t.PageFacade=e}(AutotaskSlideOutSystem||(AutotaskSlideOutSystem={})),function(t){var e=function(){function t(){this.SlideOutState={None:"None",In:"In",Out:"Out",Disabled:"Disabled"},this.WorkListType={Ticket:"1",Task:"2"},this._state=this.SlideOutState.In,this._dashboardOnlyUserCssClass="IsDashboardOnlyUser",this._workListType=this.WorkListType.Ticket,this._popupWindow=null,this._ticketHandleElement=AutotaskDomSystem.Document.getElementById("TicketSlideOutHandle"),this._slideOutElement=AutotaskDomSystem.Document.getElementById("SlideOut"),this._workspaceContainerElement=AutotaskDomSystem.Document.getElementById("WorkspaceContainer"),this._taskHandleElement=document.getElementById("TaskSlideOutHandle")}return t.prototype.get_popupWindow=function(){return this._popupWindow},t.prototype.set_popupWindow=function(t){this._popupWindow=t},t.prototype.get_state=function(){return this._state},t.prototype.get_workListBadgeCounts=function(){var t=this._ticketHandleElement.querySelector("#TicketCountBadge"),e=t?t.textContent:"0",n=null;if(null!==this._taskHandleElement){var i=this._taskHandleElement.querySelector("#TaskCountBadge");null!==i&&(n=i.textContent)}return{taskCount:n,ticketCount:e}},t.prototype.get_workListItemsScrollPosition=function(){return this._workListItemsScrollPosition},t.prototype.set_workListItemsScrollPosition=function(t){this._workListItemsScrollPosition=t},t.prototype.get_workListType=function(){return this._workListType},t.prototype.set_workListType=function(t){this._workListType=t},t.prototype.get_workListRefreshUrl=function(){var t="";return this._workListType===this.WorkListType.Ticket?t=this._ticketWorkListRefreshUrl:this._workListType===this.WorkListType.Task&&(t=this._taskWorkListRefreshUrl),t},t.prototype.get_workListSettingsDialogUrl=function(){var t="";return this._workListType===this.WorkListType.Ticket?t=this._ticketWorkListSettingsDialogUrl:this._workListType===this.WorkListType.Task&&(t=this._taskWorkListSettingsDialogUrl),t},t.prototype.set_taskWorkListRefreshUrl=function(t){this._taskWorkListRefreshUrl=t},t.prototype.set_ticketWorkListRefreshUrl=function(t){this._ticketWorkListRefreshUrl=t},t.prototype.set_taskWorkListSettingsDialogUrl=function(t){this._taskWorkListSettingsDialogUrl=t},t.prototype.set_ticketWorkListSettingsDialogUrl=function(t){this._ticketWorkListSettingsDialogUrl=t},t.prototype.get_ticketHandleElement=function(){return this._ticketHandleElement},t.prototype.get_taskHandleElement=function(){return this._taskHandleElement},t.prototype.get_slideOutElement=function(){return this._slideOutElement},t.prototype._onSlideOutTicketHandleClick=function(){if(this._ticketHandleElement.classList.remove("Selected"),null!==this._taskHandleElement&&this._taskHandleElement.classList.remove("Selected"),this._state===this.SlideOutState.Out&&this._workListType===this.WorkListType.Task)this._ticketHandleElement.classList.add("Selected"),this._workListType=this.WorkListType.Ticket,this.refresh();else if(this._state===this.SlideOutState.Disabled&&this._workListType===this.WorkListType.Task){this._workListType=this.WorkListType.Ticket;var t=this.get_popupWindow();null!==t&&t.refresh()}else this._workListType=this.WorkListType.Ticket,this._onSlideOutHandleClick()},t.prototype._onSlideOutTaskHandleClick=function(){if(null!==this._taskHandleElement)if(this._ticketHandleElement.classList.remove("Selected"),this._taskHandleElement.classList.remove("Selected"),this._state===this.SlideOutState.Out&&this._workListType===this.WorkListType.Ticket)this._taskHandleElement.classList.add("Selected"),this._workListType=this.WorkListType.Task,this.refresh();else if(this._state===this.SlideOutState.Disabled&&this._workListType===this.WorkListType.Ticket){this._workListType=this.WorkListType.Task;var t=this.get_popupWindow();null!==t&&t.refresh()}else this._workListType=this.WorkListType.Task,this._onSlideOutHandleClick()},t.prototype._onSlideOutHandleClick=function(){if(this._state===this.SlideOutState.Disabled)this._popupWindow&&!this._popupWindow.closed?this._popupWindow.focus():(this._popupWindow=null,this.set_slideOutStateDisabled(!1),this.toggle());else{var t=autotask.instanceTrackerManagement.__findInstanceTracker("SlideOutKey");t&&t.__clear(),this.toggle()}},t.prototype._onUnload=function(){var t=this.get_popupWindow();null!==t&&t.close()},t.prototype.canRefreshWorkList=function(){return this.get_state()===this.SlideOutState.Out&&!this._isDragInProgress()},t.prototype.canRefreshWorkListBadges=function(){return!0},t.prototype.canRefreshWorkListPopup=function(){return!(this.get_state()!==this.SlideOutState.Disabled||!this._popupWindow||this._popupWindow.closed)&&!this._isDragInProgress()},t.prototype.refresh=function(){window.autotask.siteNavigation.refreshWorkList()},t.prototype.set_slideOutStateDisabled=function(t){t?(this.get_state()===this.SlideOutState.Out&&this.toggle(),this._state=this.SlideOutState.Disabled):this._state=this.SlideOutState.In},t.prototype.set_slideOutStateIn=function(){this._state=this.SlideOutState.In},t.prototype.set_slideOutStateOut=function(){this._state=this.SlideOutState.Out},t.prototype.toggle=function(){this.get_state()!==this.SlideOutState.Disabled&&(this._ticketHandleElement.classList.toggle("Active"),null!==this._taskHandleElement&&this._taskHandleElement.classList.toggle("Active"),this._slideOutElement.classList.toggle("Active"),this._workspaceContainerElement.classList.toggle("WorkListActive"),this._ticketHandleElement.classList.contains("Active")||null!==this._taskHandleElement&&this._taskHandleElement.classList.contains("Active")?(this._workListType===this.WorkListType.Ticket&&(null!==this._taskHandleElement&&this._taskHandleElement.classList.remove("Selected"),this._ticketHandleElement.classList.add("Selected")),this._workListType===this.WorkListType.Task&&(this._ticketHandleElement.classList.remove("Selected"),null!==this._taskHandleElement&&this._taskHandleElement.classList.add("Selected")),this.set_slideOutStateOut()):this.set_slideOutStateIn(),this.refresh())},t.prototype.initialize=function(t,e,n,i){this._registerHandlers();var o=window.autotask.workspaceLocator.__get_securityManagement();o&&o.get_isDashboardOnlyUser()&&(this._ticketHandleElement.classList.add(this._dashboardOnlyUserCssClass),null!==this._taskHandleElement&&this._taskHandleElement.classList.add(this._dashboardOnlyUserCssClass)),this.set_taskWorkListRefreshUrl(t),this.set_ticketWorkListRefreshUrl(e),this.set_taskWorkListSettingsDialogUrl(n),this.set_ticketWorkListSettingsDialogUrl(i)},t.prototype._isDragInProgress=function(){var t=autotask.find("WorkList");return void 0!==t&&t.__get_isDragInProgress()},t.prototype._registerHandlers=function(){this._ticketHandleElement.addEventListener("click",this._onSlideOutTicketHandleClick.bind(this)),null!==this._taskHandleElement&&this._taskHandleElement.addEventListener("click",this._onSlideOutTaskHandleClick.bind(this)),window.addEventListener("unload",this._onUnload.bind(this))},t}();t.SlideOutManagement=e}(AutotaskSlideOutSystem||(AutotaskSlideOutSystem={})),function(t){var e=function(){function t(t,e){this._key=t,this._isCollapsed=e}return Object.defineProperty(t.prototype,"isCollapsed",{get:function(){return this._isCollapsed},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"key",{get:function(){return this._key},enumerable:!1,configurable:!0}),t}();t.CollapsedStateChangedHandlerEventArgs=e}(AutotaskSummaryPages||(AutotaskSummaryPages={})),function(t){var e=function(t){function e(e,n){var i=t.call(this,e)||this,o=AutotaskDomSystem.Document.getElementById(e).firstElementChild.firstElementChild;return i._validationSummaryElement=o.firstElementChild,i._gridId=n,i._resizeHandler=function(){i._windowResizeHandler()},window.addEventListener("resize",i._resizeHandler),i._submittingHandlers=[],i._customValidationSummaryInstance=null,i._grid=null,i._notificationSlideOut=null,i}return __extends(e,t),Object.defineProperty(e.prototype,"customValidationSummary",{get:function(){return this._customValidationSummaryInstance},enumerable:!1,configurable:!0}),e.prototype.addSubmitting=function(t){this._submittingHandlers.push(t)},e.prototype.ajaxSubmit=function(t,e){var n=this,i=new AutotaskRequestDataSystem.RequestData;if(this._raiseSubmittingEvent(i),null!==this._notificationSlideOut){var o=this._notificationSlideOut.get_panel();i.addFieldData(o.__get_postingModelParameterName(),o.__createSerializedRequestData())}(new DeprecatedSubmitRouteCreator).createDeprecatedSubmitRoute(t).makeRequest(i,(function(t){n._submitSuccessHandler(t,e)}))},e.prototype.__dispose=function(){window.removeEventListener("resize",this._resizeHandler)},e.prototype.__initialize=function(){var t=this,e=autotask.find(this._validationSummaryElement.id);e.__addValidationFailed((function(){t._validationFailedHandler()})),this._customValidationSummaryInstance=e.__get_customValidationSummary(),this._grid=autotask.find(this._gridId)},e.prototype.__setNotificationSlideOut=function(t){this._notificationSlideOut=t},e.prototype._raiseSubmittingEvent=function(t){for(var e=0,n=this._submittingHandlers;e<n.length;e++){(0,n[e])(t)}},e.prototype._submitSuccessHandler=function(t,e){this._customValidationSummaryInstance.clearMessages();for(var n=0,i=0,o=t.customValidationMessages;i<o.length;i++){var a=o[i];this._customValidationSummaryInstance.addMessage(n.toString(),a),n++}if(null!==e){var r={};r.validationFailure=t.customValidationMessages.length>0,r.value=t.value,e(r)}},e.prototype._windowResizeHandler=function(){this._grid.__refreshLayout()},e.prototype._validationFailedHandler=function(){null!==this._notificationSlideOut&&this._validationFailedHandler()},e}(Autotask.LifecycleObject);t.GridContent=e}(AutotaskSummaryPages||(AutotaskSummaryPages={})),function(t){var e=function(t){function e(e,n,i){var o=t.call(this,e)||this;return o._menuElement=AutotaskDomSystem.Document.getElementById(e),o._menuItemIds=n,o._selectedMenuItemId=i,o._menuItemGroups=[],o._menuItems=[],o._selectedMenuItem=null,o}return __extends(e,t),Object.defineProperty(e.prototype,"collapsedMenuKeys",{get:function(){for(var t=[],e=0,n=this._menuItemGroups;e<n.length;e++){var i=n[e];i.isCollapsed&&t.push(i.key)}return t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"selectedKey",{get:function(){return this._selectedMenuItem.key},enumerable:!1,configurable:!0}),e.prototype.collapse=function(t){for(var e,n=0,i=this._menuItemGroups;n<i.length;n++){var o=i[n];(e=t.indexOf(o.key))>=0&&(t.splice(e,1),o.collapse())}},e.prototype.select=function(t){for(var e=0,n=this._menuItems;e<n.length;e++){var i=n[e];if(i.key===t){null!==this._selectedMenuItem&&this._selectedMenuItem.toggleSelected(),i.select(),this._selectedMenuItem=i;break}}},e.prototype.__initialize=function(){for(var t=this,e=0,n=this._menuItemIds;e<n.length;e++){var i=n[e],o=autotask.find(i);o.selectedHandler=function(e){t._menuItemSelectedHandler(e)},this._menuItems.push(o)}this._selectedMenuItem=autotask.find(this._selectedMenuItemId);for(var a=0,r=AutotaskDomSystem.Document.getChildElementsByClassName(this._menuElement,"SummaryMenuItemGroup1");a<r.length;a++){var s=r[a];this._menuItemGroups.push(autotask.find(s.id))}},e.prototype._menuItemSelectedHandler=function(t){null!==this._selectedMenuItem&&this._selectedMenuItem.toggleSelected(),this._selectedMenuItem=t},e}(Autotask.LifecycleObject);t.Menu=e}(AutotaskSummaryPages||(AutotaskSummaryPages={})),function(t){var e=function(t){function e(e,n,i,o){var a=t.call(this,e)||this;return a._element=AutotaskDomSystem.Document.getElementById(e),a._element.addEventListener("click",(function(){a._clickHandler()})),a._key=n,a._behavior=i,a._isSelected=o,a._selectedCssClass="Selected",a._selectedHandler=null,a}return __extends(e,t),Object.defineProperty(e.prototype,"key",{get:function(){return this._key},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"selectedHandler",{set:function(t){this._selectedHandler=t},enumerable:!1,configurable:!0}),e.prototype.select=function(){this._isSelected=!0,this._element.classList.add(this._selectedCssClass)},e.prototype.toggleSelected=function(){this._isSelected=!this._isSelected,this._element.classList.toggle(this._selectedCssClass)},e.prototype._clickHandler=function(){this._isSelected||(this._behavior(),this.toggleSelected(),this._raiseSelectedEvent())},e.prototype._raiseSelectedEvent=function(){null!==this._selectedHandler&&this._selectedHandler(this)},e}(Autotask.LifecycleObject);t.MenuItem=e}(AutotaskSummaryPages||(AutotaskSummaryPages={})),function(t){var e=function(e){function n(t,n,i){var o=e.call(this,t)||this;return o._primaryElement=AutotaskDomSystem.Document.getElementById(t),o._primaryElement.firstElementChild.addEventListener("click",(function(){o._clickListener()})),o._key=n,o._collapsedStateChangedHandler=i,o._collapsedCssClass="Collapsed",o}return __extends(n,e),Object.defineProperty(n.prototype,"isCollapsed",{get:function(){return this._primaryElement.classList.contains(this._collapsedCssClass)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"key",{get:function(){return this._key},enumerable:!1,configurable:!0}),n.prototype.collapse=function(){this._primaryElement.classList.add(this._collapsedCssClass)},n.prototype._clickListener=function(){this._toggleCollapsed(),this._raiseCollapsedStateChangedEvent()},n.prototype._toggleCollapsed=function(){this._primaryElement.classList.toggle(this._collapsedCssClass)},n.prototype._raiseCollapsedStateChangedEvent=function(){if(null!==this._collapsedStateChangedHandler){var e=new t.CollapsedStateChangedHandlerEventArgs(this._key,this.isCollapsed);this._collapsedStateChangedHandler(e)}},n}(Autotask.LifecycleObject);t.MenuItemGroup=e}(AutotaskSummaryPages||(AutotaskSummaryPages={})),function(t){var e=function(t){function e(e,n){var i=t.call(this,e)||this,o=AutotaskDomSystem.Document.getElementById(e).firstElementChild,a=o.firstElementChild;i._validationSummaryElement=a.firstElementChild,o.children[1].addEventListener("scroll",(function(){i._scrollListener()})),i._fieldContainerElement=AutotaskDomSystem.Document.getElementById(n);var r=new PostedContainerValidationCreator;return i._postedContainerValidation=r.createValidation(i._fieldContainerElement),i._immutableData=[],i._submittingHandlers=[],i._customValidationSummaryInstance=null,i._notificationSlideOut=null,i._validationSummaryInstance=null,i}return __extends(e,t),Object.defineProperty(e.prototype,"customValidationSummary",{get:function(){return this._customValidationSummaryInstance},enumerable:!1,configurable:!0}),e.prototype.addSubmitting=function(t){this._submittingHandlers.push(t)},e.prototype.ajaxSubmit=function(t,e){if(this.validate()){var n=new Autotask.DeprecatedRequestData;if(this._raiseSubmittingEvent(n),null!==this._notificationSlideOut){var i=this._notificationSlideOut.get_panel();n.addFieldData(i.__get_postingModelParameterName(),i.__createSerializedRequestData())}var o=this.customValidationSummary;(new SubmitRouteCreator).createSubmitRoute(t).makeRequest(n,(function(t){o.clearMessages();for(var n=0;n<t.customValidationMessages.length;n++)o.addMessage(n.toString(),t.customValidationMessages[n]);var i={};i.validationFailure=t.customValidationMessages.length>0,i.responseData=t.responseData,null!==e&&e(i)}))}},e.prototype.deprecatedAjaxSubmit=function(t,e){var n=this;if(this.validate()){var i=new Autotask.DeprecatedRequestData;if(this._raiseSubmittingEvent(i),null!==this._notificationSlideOut){var o=this._notificationSlideOut.get_panel();i.addFieldData(o.__get_postingModelParameterName(),o.__createSerializedRequestData())}(new DeprecatedSubmitRouteCreator).createDeprecatedSubmitRoute(t).makeRequest(i,(function(t){n._submitSuccessHandler(t,e)}))}},e.prototype.generateFieldData=function(){for(var t=new AutotaskRequestDataSystem.SerializedRequestData([this._fieldContainerElement]),e=0,n=this._immutableData;e<n.length;e++){var i=n[e];t.__addImmutableData(i)}return t},e.prototype.validate=function(){return this._validate(!1)},e.prototype.__addImmutableData=function(t){this._immutableData.push(t)},e.prototype.__dispose=function(){autotask.findPage().__removeResetValidationHandler(this.id)},e.prototype.__finalize=function(){this._postedContainerValidation.__registerValidationSummary(this._validationSummaryInstance),this._postedContainerValidation.__parse()},e.prototype.__initialize=function(){var t=this;this._validationSummaryInstance=autotask.find(this._validationSummaryElement.id),this._validationSummaryInstance.__addValidationFailed((function(){t._validationFailedHandler()})),this._customValidationSummaryInstance=this._validationSummaryInstance.__get_customValidationSummary(),autotask.findPage().__addResetValidationHandler(this.id,(function(){t._resetValidationHandler()}))},e.prototype.__setNotificationSlideOut=function(t){this._notificationSlideOut=t},e.prototype._raiseSubmittingEvent=function(t){for(var e=0,n=this._submittingHandlers;e<n.length;e++){(0,n[e])(t)}},e.prototype._resetValidationHandler=function(){var t;this._postedContainerValidation.__reset(),(null===(t=this._validationSummaryInstance)||void 0===t?void 0:t.__get_isActive())&&this._validate(!0)},e.prototype._scrollListener=function(){window.autotask.contextOverlayManagement.__hideVisibleContextOverlays()},e.prototype._submitSuccessHandler=function(t,e){this._customValidationSummaryInstance.clearMessages();for(var n=0,i=0,o=t.customValidationMessages;i<o.length;i++){var a=o[i];this._customValidationSummaryInstance.addMessage(n.toString(),a),n++}if(null!==e){var r={};r.validationFailure=t.customValidationMessages.length>0,r.value=t.value,e(r)}},e.prototype._validate=function(t){var e=this._postedContainerValidation.__validate();return e||this._postedContainerValidation.__validationFailed(),this._postedContainerValidation.__validationCompleted(e,t),e},e.prototype._validationFailedHandler=function(){null!==this._notificationSlideOut&&this._notificationSlideOut.hide()},e}(Autotask.LifecycleObject);t.NormalContent=e}(AutotaskSummaryPages||(AutotaskSummaryPages={})),function(t){var e=function(t){function e(e,n,i){var o=t.call(this,e)||this;return o._helpButtonId=n,o._helpButton=null,o._helpId=i,o}return __extends(e,t),e.prototype.replaceHelpId=function(t){this._helpButton.replaceHelpId(t)},e.prototype.__initialize=function(){this._helpButton=autotask.find(this._helpButtonId),this._helpButton.replaceHelpId(this._helpId)},e}(Autotask.LifecycleObject);t.TitleBar=e}(AutotaskSummaryPages||(AutotaskSummaryPages={})),function(t){var e=function(t){function e(e,n){var i=t.call(this,e)||this;return i._element=AutotaskDomSystem.Document.getElementById(e),i._currentThemeCssClassName=n,i}return __extends(e,t),e.prototype.changeTheme=function(t){this._element.classList.add(t),this._element.classList.remove(this._currentThemeCssClassName),this._currentThemeCssClassName=t},e}(Autotask.LifecycleObject);t.ThemePreview=e}(AutotaskThemeSystem||(AutotaskThemeSystem={})),function(t){var e=function(){function e(e,n,i,o,a){this._timeBlockElements=e,this._timeCalculator=new t.TimeCalculator,this._timelineStartDateTime=n,this._timelineEndDateTime=i,this._timelineStartIndex=1,this._timelineEndIndex=this._timeBlockElements.length-2,this._timeEntryStartDateTime=null!==o?o:null,this._timeEntryEndDateTime=null!==a?a:null,this._markedTimelineStartDateTime=new Date(n.getTime()),this._markedTimelineStartDateTime.setMinutes(60),this._markedTimelineStartDateTime.setSeconds(0),this._markedTimelineStartDateTime.setMilliseconds(0),this._markedTimelineEndDateTime=new Date(i.getTime()),this._markedTimelineEndDateTime.setMinutes(0),this._markedTimelineEndDateTime.setSeconds(0),this._markedTimelineEndDateTime.setMilliseconds(0),this._isDraggingStartBound=!1,this._isDraggingEndBound=!1,this._timeEntryStartIndex=null,this._timeEntryEndIndex=null;var r=this._determineTimeEntryIndexes();null!==r&&(this._timeEntryStartIndex=r.startIndex,this._timeEntryEndIndex=r.endIndex)}return Object.defineProperty(e.prototype,"currentTimeEntryStartDateTime",{get:function(){var t=null;return null!==this._timeEntryStartDateTime&&(t=new Date(this._timeEntryStartDateTime.getTime())),t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentTimeEntryEndDateTime",{get:function(){var t=null;return null!==this._timeEntryEndDateTime&&(t=new Date(this._timeEntryEndDateTime.getTime())),t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isDraggingInProgress",{get:function(){return this._isDraggingStartBound||this._isDraggingEndBound},enumerable:!1,configurable:!0}),e.prototype.setTimeEntry=function(t,e){var n=new Date(this._markedTimelineStartDateTime.getTime());n.setMinutes(this._markedTimelineStartDateTime.getMinutes()-7,this._markedTimelineStartDateTime.getSeconds()-30);var i=new Date(this._markedTimelineEndDateTime.getTime());if(i.setMinutes(this._markedTimelineEndDateTime.getMinutes()+7,this._markedTimelineEndDateTime.getSeconds()+30),t>=n&&t<=i||e>=n&&e<=i){this._setTimeEntryWithoutUpdatingIndexes(t,e);var o=this._determineTimeEntryIndexes();null!==o&&(this._timeEntryStartIndex=o.startIndex,this._timeEntryEndIndex=o.endIndex)}else this._removeDisplayForTimeEntry(),this._timeEntryStartDateTime=t,this._timeEntryStartIndex=null,this._timeEntryEndDateTime=e,this._timeEntryEndIndex=null},e.prototype.setCurrentTimeEntryFromDragging=function(t){var e=this._timeBlockElements.indexOf(t);e>=this._timelineStartIndex&&e<=this._timelineEndIndex&&(this._isDraggingStartBound?this._setTimeEntryFromDraggingStartBound(e):this._isDraggingEndBound&&this._setTimeEntryFromDraggingEndBound(e),this._removeDragIndicator(),t.classList.add("DragIndicator"))},e.prototype.startDragging=function(t){var e=this._timeBlockElements.indexOf(t),n=this._determineDistanceFromTimeEntryStart(e),i=this._determineDistanceFromTimeEntryEnd(e);if(null!==n&&null!==i&&null!==this._timeEntryStartDateTime&&null!==this._timeEntryEndDateTime)if(this._timeEntryStartDateTime>this._markedTimelineEndDateTime||this._timelineEndDateTime<this._markedTimelineStartDateTime)this._timeEntryStartIndex=e,this._timeEntryEndIndex=e,this._timeEntryStartDateTime=null,this._timeEntryEndDateTime=null,this._isDraggingEndBound=!0;else if(i<n){this._timeEntryEndIndex=e;var o=this._determineDateTimeFromIndex(e);this._setTimeEntryWithoutUpdatingIndexes(this._timeEntryStartDateTime,o),this._isDraggingEndBound=!0}else{this._timeEntryStartIndex=e;var a=this._determineDateTimeFromIndex(e);this._setTimeEntryWithoutUpdatingIndexes(a,this._timeEntryEndDateTime),this._isDraggingStartBound=!0}else this._startDraggingWithoutPriorVisualRepresentation(e,n,i);t.classList.add("DragIndicator")},e.prototype.stopDragging=function(){this._isDraggingStartBound=!1,this._isDraggingEndBound=!1,null===this._timeEntryStartIndex&&null!==this._timeEntryEndIndex?(this._timeEntryEndIndex=null,this._timeEntryEndDateTime=null):null===this._timeEntryEndIndex&&null!==this._timeEntryStartIndex&&(this._timeEntryStartIndex=null,this._timeEntryStartDateTime=null),this._removeDragIndicator()},e.prototype._continueEndBound=function(t,e,n){var i=null===this._timeEntryStartDateTime?this._determineDateTimeFromIndex(n):this._timeEntryStartDateTime,o=e;this._timeEntryEndIndex=t,this._setTimeEntryWithoutUpdatingIndexes(i,o)},e.prototype._continueStartBound=function(t,e,n){var i=e,o=null===this._timeEntryEndDateTime?this._determineDateTimeFromIndex(n):this._timeEntryEndDateTime;this._timeEntryStartIndex=t,this._setTimeEntryWithoutUpdatingIndexes(i,o)},e.prototype._determineDateTimeFromIndex=function(t){var e=new Date(this._markedTimelineStartDateTime.getTime()),n=15*(t-1);return e.setMinutes(e.getMinutes()+n),e},e.prototype._determineDistanceFromTimeEntryEnd=function(t){var e=null;if(null!==this._timeEntryEndIndex&&null!==this._timeEntryEndDateTime){var n=this._timeEntryEndDateTime>this._markedTimelineEndDateTime?this._markedTimelineEndDateTime:this._timeEntryEndDateTime,i=this._determineDateTimeFromIndex(t);e=Math.abs(i.getTime()-n.getTime())}return e},e.prototype._determineDistanceFromTimeEntryStart=function(t){var e=null;if(null!==this._timeEntryStartIndex&&null!==this._timeEntryStartDateTime){var n=this._timeEntryStartDateTime<this._markedTimelineStartDateTime?this._markedTimelineStartDateTime:this._timeEntryStartDateTime,i=this._determineDateTimeFromIndex(t);e=Math.abs(i.getTime()-n.getTime())}return e},e.prototype._determineTimeEntryIndexes=function(){var t=null;if(null!==this._timeEntryStartDateTime&&null!==this._timeEntryEndDateTime){var e=new Date(this._markedTimelineStartDateTime.getTime());e.setMinutes(e.getMinutes()-7,e.getSeconds()-30);var n=(this._timeEntryStartDateTime.getTime()-e.getTime())/6e4,i=Math.max(Math.ceil(n/15),0),o=(this._timeEntryEndDateTime.getTime()-e.getTime())/6e4;t={startIndex:i,endIndex:Math.min(Math.ceil(o/15),this._timelineEndIndex)}}return t},e.prototype._removeDisplayForTimeEntry=function(){for(var t=0,e=this._timeBlockElements;t<e.length;t++){var n=e[t],i=AutotaskDomSystem.Document.getChildElementByClassName(n,"Current");i.className="",i.classList.add("TimeEntry"),i.classList.add("Current"),i.classList.add("Empty")}},e.prototype._removeDragIndicator=function(){for(var t=0,e=this._timeBlockElements;t<e.length;t++){var n=e[t];if(n.classList.contains("DragIndicator")){n.classList.remove("DragIndicator");break}}},e.prototype._setTimeEntryForTimeBlock=function(t,e,n,i,o){var a=AutotaskDomSystem.Document.getChildElementByClassName(t,"Current");if(a.className="",a.classList.add("TimeEntry"),a.classList.add("Current"),i>n||o<e)a.classList.add("Empty");else{if(i<e)a.classList.add("Start0");else{var r="Start"+this._timeCalculator.determinePositionIndexForCssClass(e,i);a.classList.add(r),a.classList.add("RoundStart")}if(o>n)a.classList.add("End4");else{r="End"+this._timeCalculator.determinePositionIndexForCssClass(e,o);a.classList.add(r),a.classList.add("RoundEnd")}}},e.prototype._setTimeEntryFromDraggingEndBound=function(t){if(null!==this._timeEntryStartIndex&&null!==this._timeEntryEndIndex){var e=this._determineDateTimeFromIndex(t);null!==this._timeEntryStartDateTime?this._timeEntryStartDateTime.getTime()===e.getTime()?(this._timeEntryStartDateTime=null,this._timeEntryEndDateTime=null,this._timeEntryEndIndex=t,this._removeDisplayForTimeEntry()):e.getTime()>this._timeEntryStartDateTime.getTime()?this._continueEndBound(t,e,this._timeEntryStartIndex):this._switchToStartBound(t,e,this._timeEntryStartIndex):t>this._timeEntryStartIndex?this._continueEndBound(t,e,this._timeEntryStartIndex):this._switchToStartBound(t,e,this._timeEntryStartIndex)}},e.prototype._setTimeEntryFromDraggingStartBound=function(t){if(null!==this._timeEntryStartIndex&&null!==this._timeEntryEndIndex){var e=this._determineDateTimeFromIndex(t);null!==this._timeEntryEndDateTime?this._timeEntryEndDateTime.getTime()===e.getTime()?(this._timeEntryStartDateTime=null,this._timeEntryEndDateTime=null,this._timeEntryStartIndex=t,this._removeDisplayForTimeEntry()):e.getTime()<this._timeEntryEndDateTime.getTime()?this._continueStartBound(t,e,this._timeEntryEndIndex):this._switchToEndBound(t,e,this._timeEntryEndIndex):t<this._timeEntryEndIndex?this._continueStartBound(t,e,this._timeEntryEndIndex):this._switchToEndBound(t,e,this._timeEntryEndIndex)}},e.prototype._setTimeEntryWithoutUpdatingIndexes=function(t,e){var n=this._timeCalculator.roundToNearestFiveMinutes(t),i=this._timeCalculator.roundToNearestFiveMinutes(e);if(this._timeEntryStartDateTime=new Date(t.getTime()),this._timeEntryEndDateTime=new Date(e.getTime()),n<this._timelineEndDateTime&&i>this._timelineStartDateTime){var o=new Date(this._timelineStartDateTime.getTime()),a=new Date(o.getTime());a.setMinutes(a.getMinutes()+15);for(var r=0,s=this._timeBlockElements;r<s.length;r++){var l=s[r];this._setTimeEntryForTimeBlock(l,o,a,n,i),o.setMinutes(o.getMinutes()+15),a.setMinutes(a.getMinutes()+15)}}},e.prototype._startDraggingWithoutPriorVisualRepresentation=function(t,e,n){null===e&&null===n&&null!==this._timeEntryStartDateTime&&null!==this._timeEntryEndDateTime?(this._timeEntryStartIndex=t,this._timeEntryEndIndex=t,this._timeEntryStartDateTime=null,this._timeEntryEndDateTime=null,this._isDraggingEndBound=!0):(this._timeEntryStartIndex=t,this._timeEntryEndIndex=t,this._isDraggingEndBound=!0)},e.prototype._switchToEndBound=function(t,e,n){this._isDraggingStartBound=!1,this._isDraggingEndBound=!0;var i=null===this._timeEntryEndDateTime?this._determineDateTimeFromIndex(n):this._timeEntryEndDateTime,o=e;this._timeEntryStartIndex=this._timeEntryEndIndex,this._timeEntryEndIndex=t,this._setTimeEntryWithoutUpdatingIndexes(i,o)},e.prototype._switchToStartBound=function(t,e,n){this._isDraggingEndBound=!1,this._isDraggingStartBound=!0;var i=e,o=null===this._timeEntryStartDateTime?this._determineDateTimeFromIndex(n):this._timeEntryStartDateTime;this._timeEntryEndIndex=this._timeEntryStartIndex,this._timeEntryStartIndex=t,this._setTimeEntryWithoutUpdatingIndexes(i,o)},e}();t.CurrentTimeEntry=e}(AutotaskTimeEntryTimelineSystem||(AutotaskTimeEntryTimelineSystem={})),function(t){var e=function(){function t(t,e){this._currentTimeEntryStartDateTime=null===t?null:new Date(t.getTime()),this._currentTimeEntryEndDateTime=null===e?null:new Date(e.getTime())}return Object.defineProperty(t.prototype,"currentTimeEntryStartDateTime",{get:function(){return this._currentTimeEntryStartDateTime},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currentTimeEntryEndDateTime",{get:function(){return this._currentTimeEntryEndDateTime},enumerable:!1,configurable:!0}),t}();t.ImmediateChangeEventArgs=e}(AutotaskTimeEntryTimelineSystem||(AutotaskTimeEntryTimelineSystem={})),function(t){var e=function(){function t(t,e){this._currentTimeEntryStartDateTime=null===t?null:new Date(t.getTime()),this._currentTimeEntryEndDateTime=null===e?null:new Date(e.getTime())}return Object.defineProperty(t.prototype,"currentTimeEntryStartDateTime",{get:function(){return this._currentTimeEntryStartDateTime},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currentTimeEntryEndDateTime",{get:function(){return this._currentTimeEntryEndDateTime},enumerable:!1,configurable:!0}),t}();t.RefreshedEventArgs=e}(AutotaskTimeEntryTimelineSystem||(AutotaskTimeEntryTimelineSystem={})),function(t){var e=function(){function t(t,e,n,i){this._numberOfHoursOnTimeline=t,this._currentTimeEntryStartDateTime=null===e?null:new Date(e.getTime()),this._currentTimeEntryEndDateTime=null===n?null:new Date(n.getTime()),this._requestedTimelineStartDate=null===i?null:new Date(i.getTime()),this._requestData=new Autotask.DeprecatedRequestData}return Object.defineProperty(t.prototype,"currentTimeEntryStartDateTime",{get:function(){return this._currentTimeEntryStartDateTime},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currentTimeEntryEndDateTime",{get:function(){return this._currentTimeEntryEndDateTime},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"numberOfHoursOnTimeline",{get:function(){return this._numberOfHoursOnTimeline},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"requestData",{get:function(){return this._requestData},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"requestedTimelineStartDate",{get:function(){return this._requestedTimelineStartDate},enumerable:!1,configurable:!0}),t}();t.RefreshingEventArgs=e}(AutotaskTimeEntryTimelineSystem||(AutotaskTimeEntryTimelineSystem={})),function(t){var e=function(){function t(t){this._requestedTimelineStartDate=new Date(t.getTime())}return Object.defineProperty(t.prototype,"requestedTimelineStartDate",{get:function(){return this._requestedTimelineStartDate},enumerable:!1,configurable:!0}),t}();t.StartDateChangeRequestedEventArgs=e}(AutotaskTimeEntryTimelineSystem||(AutotaskTimeEntryTimelineSystem={})),function(t){var e=function(){function t(){}return t.prototype.determinePositionIndexForCssClass=function(t,e){var n="3",i=new Date(t.getTime());i.setSeconds(i.getSeconds()+150);var o=new Date(i.getTime());return o.setMinutes(o.getMinutes()+5),e.getTime()===i.getTime()?n="1":e.getTime()===o.getTime()&&(n="2"),n},t.prototype.roundToNearestFiveMinutes=function(t){var e=3e5,n=Math.round(t.getTime()/e)*e;return new Date(n)},t}();t.TimeCalculator=e}(AutotaskTimeEntryTimelineSystem||(AutotaskTimeEntryTimelineSystem={})),function(t){var e=function(e){function n(i,o,a,r,s,l,u,c,d){var h=e.call(this,i)||this;h._currentDateTime=o,h._startDateTime=a,h._endDateTime=r,h._numberOfHours=s,h._immediateChangeHandler=c,h._timeCalculationIntervalId=window.setInterval((function(){h._calculateTime()}),5e3),h._currentClientMilliseconds=Date.now(),h._windowMouseUpListener=function(){h._windowMouseUp()},h._timeCalculator=new t.TimeCalculator;var _=AutotaskDomSystem.Document.getElementById(i);if(null!==d){var p=AutotaskDomSystem.Document.getChildElementByClassName(_,"TimelineButtonContainer");h._buttonContainer=new t.TimelineButtonContainer(o,a,p,d)}else h._buttonContainer=null;var m=AutotaskDomSystem.Document.getChildElementByClassName(_,"TimelineContainer");h._timelineElement=AutotaskDomSystem.Document.getChildElementByClassName(m,"Timeline"),h._timeBlockElements=n._createTimeBlockElements(h._timelineElement);for(var f=0,y=h._timeBlockElements;f<y.length;f++){var g=y[f];g.addEventListener("mousedown",(function(t){h._timeBlockMouseDownListener(t)})),g.addEventListener("mouseenter",(function(t){h._timeBlockMouseEnterListener(t)}))}return h._currentTimeEntry=new t.CurrentTimeEntry(h._timeBlockElements,a,r,l,u),h}return __extends(n,e),Object.defineProperty(n.prototype,"currentTimeEntryStartDateTime",{get:function(){return this._currentTimeEntry.currentTimeEntryStartDateTime},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"currentTimeEntryEndDateTime",{get:function(){return this._currentTimeEntry.currentTimeEntryEndDateTime},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isButtonSetVisible",{get:function(){return null!==this._buttonContainer},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"numberOfHours",{get:function(){return this._numberOfHours},enumerable:!1,configurable:!0}),n.prototype.setCurrentTimeEntry=function(t,e){this._currentTimeEntry.setTimeEntry(t,e)},n.prototype.setStartDateChangeRequestedHandler=function(t){null!==this._buttonContainer&&this._buttonContainer.setStartDateChangeRequestedHandler(t)},n.prototype.__dispose=function(){window.clearInterval(this._timeCalculationIntervalId)},n._createTimeBlockElements=function(t){for(var e=[],n=t.children,i=0;i<n.length;i++)e.push(n[i]);return e},n.prototype._calculateTime=function(){var t=this._timeCalculator.roundToNearestFiveMinutes(this._currentDateTime),e=this._currentClientMilliseconds;this._currentClientMilliseconds=Date.now();var n=this._currentClientMilliseconds-e;this._currentDateTime.setMilliseconds(this._currentDateTime.getMilliseconds()+n);var i=this._timeCalculator.roundToNearestFiveMinutes(this._currentDateTime);if(i.getTime()!==t.getTime()){var o=this._timelineElement.querySelector(".CurrentTime.Active");if(null!==o&&(o.className="",o.classList.add("VerticalIndicator"),o.classList.add("CurrentTime")),i>this._startDateTime&&i<this._endDateTime){var a=new Date(this._startDateTime.getTime()),r=new Date(a.getTime());r.setMinutes(r.getMinutes()+15);for(var s=0,l=this._timeBlockElements;s<l.length;s++){var u=l[s];if(this._setCurrentTimeForTimeBlock(u,a,r,i))break;a.setMinutes(a.getMinutes()+15),r.setMinutes(r.getMinutes()+15)}}}},n.prototype._setCurrentTimeForTimeBlock=function(t,e,n,i){var o=AutotaskDomSystem.Document.getChildElementByClassName(t,"CurrentTime"),a=!1;if(i>e&&i<n){var r="Position"+this._timeCalculator.determinePositionIndexForCssClass(e,i);o.classList.add(r),o.classList.add("Active"),a=!0}return a},n.prototype._timeBlockMouseDownListener=function(e){if(null!==e.currentTarget){this._timelineElement.classList.add("Dragging");var n=e.currentTarget;(n.classList.contains("M60")||n.classList.contains("M30")||n.classList.contains("M15"))&&(e.stopPropagation(),e.preventDefault(),window.addEventListener("mouseup",this._windowMouseUpListener),this._currentTimeEntry.startDragging(n),null!==this._immediateChangeHandler&&this._immediateChangeHandler(new t.ImmediateChangeEventArgs(this._currentTimeEntry.currentTimeEntryStartDateTime,this._currentTimeEntry.currentTimeEntryEndDateTime)))}},n.prototype._timeBlockMouseEnterListener=function(e){if(this._currentTimeEntry.isDraggingInProgress&&null!==e.currentTarget){var n=e.currentTarget;e.stopPropagation(),e.preventDefault(),this._currentTimeEntry.setCurrentTimeEntryFromDragging(n),null!==this._immediateChangeHandler&&this._immediateChangeHandler(new t.ImmediateChangeEventArgs(this._currentTimeEntry.currentTimeEntryStartDateTime,this._currentTimeEntry.currentTimeEntryEndDateTime))}},n.prototype._windowMouseUp=function(){window.removeEventListener("mouseup",this._windowMouseUpListener),this._currentTimeEntry.stopDragging(),this._timelineElement.classList.remove("Dragging")},n}(Autotask.LifecycleObject);t.Timeline=e}(AutotaskTimeEntryTimelineSystem||(AutotaskTimeEntryTimelineSystem={})),function(t){var e=function(){function e(t,e,n,i){var o=this;this._currentDateForButtons=new Date(t.getTime()),this._startDateTime=e,this._settingButtonClickHandler=i,this._startDateChangeRequestedHandler=null,this._dateButtonElements=AutotaskDomSystem.Document.getChildElementsByClassName(n,"Button");for(var a=0,r=this._dateButtonElements;a<r.length;a++){var s=r[a];s.classList.contains("Selected")||s.addEventListener("click",(function(t){o._dateButtonClickListener(t)}))}this._calendarButtonElement=AutotaskDomSystem.Document.getChildElementByClassName(n,"CalendarButton"),this._calendarButtonElement.addEventListener("click",(function(){o._calendarButtonClickListener()})),this._calendarButtonElement.addEventListener("mouseout",(function(){o._calendarButtonMouseOutListener()})),AutotaskDomSystem.Document.getChildElementByClassName(n,"SettingsButton").addEventListener("click",(function(){o._settingsButtonClickListener()}))}return e.prototype.setStartDateChangeRequestedHandler=function(t){this._startDateChangeRequestedHandler=t},e.prototype._calendarButtonClickListener=function(){var t=this,e=new Date(this._startDateTime.getTime());e.setMinutes(e.getMinutes()+22),e.setSeconds(e.getSeconds()+30),this._calendarButtonElement.classList.add("HoverState"),autotask.globalCalendarOverlayManagement.__show(this._calendarButtonElement,e,[-7,-14],(function(e){t._calendarOverlayDateSelected(e)}),(function(){t._calendarOverlayHidden()}))},e.prototype._calendarButtonMouseOutListener=function(){autotask.globalCalendarOverlayManagement.__hide()},e.prototype._calendarOverlayDateSelected=function(t){this._requestStartDateChange(t)},e.prototype._calendarOverlayHidden=function(){this._calendarButtonElement.classList.remove("HoverState")},e.prototype._dateButtonClickListener=function(t){for(var e=this._dateButtonElements.length-1,n=0,i=this._dateButtonElements;n<i.length;n++){if(i[n]===t.currentTarget)break;e--}var o=new Date(this._currentDateForButtons);o.setDate(o.getDate()-e),this._requestStartDateChange(o)},e.prototype._requestStartDateChange=function(e){if(null!==this._startDateChangeRequestedHandler){var n=new t.StartDateChangeRequestedEventArgs(e);this._startDateChangeRequestedHandler(n)}},e.prototype._settingsButtonClickListener=function(){this._settingButtonClickHandler()},e}();t.TimelineButtonContainer=e}(AutotaskTimeEntryTimelineSystem||(AutotaskTimeEntryTimelineSystem={})),function(t){var e=function(e){function n(t,n,i,o,a,r,s){var l=e.call(this,t)||this;return l._shellElement=AutotaskDomSystem.Document.getElementById(t),l._timelineId=n,l._refreshRoute=a,l._refreshingHandler=r,l._refreshedHandler=s,l._ajaxRequestCanceler=null,l._instanceTracker=new Autotask.InstanceTracker(o,i),l._timeoutDuration=300,l._refreshTimeoutId=null,l._loadingCssClass="Loading",l}return __extends(n,e),n.prototype.refreshAfterDelay=function(t){var e=this;this._cancelRefreshTimer(),this._cancelRefreshRequest(),this._refreshTimeoutId=window.setTimeout((function(){e._timeoutHandler(t)}),this._timeoutDuration)},n.prototype.setCurrentTimeEntryOnTimeline=function(t,e){autotask.find(this._timelineId).setCurrentTimeEntry(t,e)},n.prototype.__dispose=function(){this._cancelRefreshTimer(),this._cancelRefreshRequest()},n.prototype.__initialize=function(){var t=this,e=autotask.find(this._timelineId);e.isButtonSetVisible&&e.setStartDateChangeRequestedHandler((function(n){t._timelineStartDateChangeRequested(e,n.requestedTimelineStartDate)}))},n.prototype._timelineStartDateChangeRequested=function(e,n){var i=new t.RefreshingEventArgs(e.numberOfHours,e.currentTimeEntryStartDateTime,e.currentTimeEntryEndDateTime,n);this._refresh(i)},n.prototype._cancelRefreshRequest=function(){null!==this._ajaxRequestCanceler&&(this._ajaxRequestCanceler.__cancelRequest(),this._ajaxRequestCanceler=null)},n.prototype._cancelRefreshTimer=function(){null!==this._refreshTimeoutId&&(window.clearTimeout(this._refreshTimeoutId),this._refreshTimeoutId=null)},n.prototype._refresh=function(t){var e=this;this._refreshingHandler(t),this._shellElement.classList.add(this._loadingCssClass),this._ajaxRequestCanceler=this._refreshRoute.refresh(t.requestData.__data,(function(t,n,i){return e._refreshSuccessHandler(t,n,i)}))},n.prototype._refreshSuccessHandler=function(e,n,i){var o=this;this._ajaxRequestCanceler=null,this._instanceTracker.__loadHtmlAndJavaScript(n,i),this._timelineId=e;var a=autotask.find(this._timelineId);if(a.isButtonSetVisible&&a.setStartDateChangeRequestedHandler((function(t){o._timelineStartDateChangeRequested(a,t.requestedTimelineStartDate)})),null!==this._refreshedHandler){var r=new t.RefreshedEventArgs(a.currentTimeEntryStartDateTime,a.currentTimeEntryEndDateTime);this._refreshedHandler(r)}this._shellElement.classList.remove(this._loadingCssClass)},n.prototype._timeoutHandler=function(e){this._refreshTimeoutId=null;var n=autotask.find(this._timelineId),i=new t.RefreshingEventArgs(n.numberOfHours,n.currentTimeEntryStartDateTime,n.currentTimeEntryEndDateTime,e);this._refresh(i)},n}(Autotask.LifecycleObject);t.TimelineShell=e}(AutotaskTimeEntryTimelineSystem||(AutotaskTimeEntryTimelineSystem={})),function(t){var e=function(t){function e(e,n){var i=t.call(this,e)||this;i._helpPage=n;var o=AutotaskDomSystem.Document.getElementById(e);return i._buttonElement=o.children[0],i._buttonElement.addEventListener("click",(function(){i._buttonClickListener()})),i}return __extends(e,t),e.prototype._buttonClickListener=function(){this._helpPage.open(null)},e}(Autotask.LifecycleObject);t.HelpToolBarHalf=e}(AutotaskToolBarSystem||(AutotaskToolBarSystem={})),function(t){var e=function(){function t(t){this._workListBadgeManagement=t}return t.prototype.initialize=function(){this._workListBadgeManagement.initialize()},t}();t.InternalPageFacade=e}(AutotaskWorkListBadgeSystem||(AutotaskWorkListBadgeSystem={})),function(t){var e=function(){function t(t){this._workListBadgeManagement=t}return t.prototype.updateCounts=function(t,e){this._workListBadgeManagement.updateCounts(t,e)},t}();t.PageFacade=e}(AutotaskWorkListBadgeSystem||(AutotaskWorkListBadgeSystem={})),function(t){var e=function(){function t(){this._dashboardOnlyUserCssClass="IsDashboardOnlyUser",this._workListBadgesTotalTicketCountElement=AutotaskDomSystem.Document.getElementById("TicketCountBadge"),this._workListBadgesTotalTaskCountElement=document.getElementById("TaskCountBadge")}return t.prototype.updateCounts=function(t,e){this._workListBadgesTotalTicketCountElement.textContent=t.toString(),null!==this._workListBadgesTotalTaskCountElement&&null!==e&&(this._workListBadgesTotalTaskCountElement.textContent=e.toString())},t.prototype.initialize=function(){autotask.findPage().security.get_isDashboardOnlyUser()&&(this._workListBadgesTotalTicketCountElement.classList.add(this._dashboardOnlyUserCssClass),null!==this._workListBadgesTotalTaskCountElement&&this._workListBadgesTotalTaskCountElement.classList.add(this._dashboardOnlyUserCssClass))},t}();t.WorkListBadgeManagement=e}(AutotaskWorkListBadgeSystem||(AutotaskWorkListBadgeSystem={})),function(t){var e=function(){function t(t){this._workspaceManagement=t}return t.prototype.get_pageFrameCurrentUrl=function(){return this._workspaceManagement.get_pageFrameCurrentUrl()},t.prototype.get_pageFrameDefaultUrl=function(){return this._workspaceManagement.get_pageFrameDefaultUrl()},t.prototype.set_pageFrameDefaultUrl=function(t){this._workspaceManagement.set_pageFrameDefaultUrl(t)},t.prototype.activateAndRefreshDashboard=function(){this._workspaceManagement.activateAndRefreshDashboard()},t.prototype.activateDashboard=function(t){this._workspaceManagement.activateDashboard(t)},t.prototype.initialize=function(t){this._workspaceManagement.initialize(t)},t.prototype.isDashboardActive=function(){return this._workspaceManagement.isDashboardActive()},t.prototype.isDashboardAvailable=function(){return this._workspaceManagement.isDashboardAvailable()},t.prototype.navigate=function(t){this._workspaceManagement.navigate(t)},t.prototype.onBeginPageLoading=function(t){this._workspaceManagement.onBeginPageLoading(t)},t.prototype.onPageLoaded=function(t){this._workspaceManagement.onPageLoaded(t)},t}();t.InternalPageFacade=e}(AutotaskWorkspaceSystem||(AutotaskWorkspaceSystem={})),function(t){var e=function(){function t(){this._activeCssClass="Active",this._pageActiveCssClass="PageActive",this._isPageLoading=!1,this._dashboardContainerElement=AutotaskDomSystem.Document.getElementById("DashboardContainer"),this._pageContainerElement=AutotaskDomSystem.Document.getElementById("PageContainer"),this._pageContainerFrameElement=AutotaskDomSystem.Document.getElementById("PageContainerFrame"),this._workspaceContainerElement=AutotaskDomSystem.Document.getElementById("WorkspaceContainer")}return t.prototype.get_pageFrameCurrentUrl=function(){return this._pageContainerFrameElement.src},t.prototype.get_pageFrameDefaultUrl=function(){return this._pageFrameDefaultUrl},t.prototype.set_pageFrameDefaultUrl=function(t){this._pageFrameDefaultUrl=t},t.prototype.activateAndRefreshDashboard=function(){var t=autotask.findPage();t.__preventDashboardWidgetShellsFromRefreshing(),this._activateDashboardContainer(),t.refreshDashboard()},t.prototype.activateDashboard=function(t){var e=autotask.findPage();t&&e.__preventDashboardWidgetShellsFromRefreshing(),this._activateDashboardContainer(),t&&e.refreshWidgets()},t.prototype.initialize=function(t){this.set_pageFrameDefaultUrl(t)},t.prototype.isDashboardActive=function(){return!!this._dashboardContainerElement&&this._dashboardContainerElement.classList.contains(this._activeCssClass)},t.prototype.isDashboardAvailable=function(){return null!==this._dashboardContainerElement},t.prototype.navigate=function(t){this._pageContainerFrameElement.src=t,this._activatePageContainer()},t.prototype.onBeginPageLoading=function(t){t.get_isLoadingIndicatorEnabled()&&(this._isPageLoading=!0,autotask.overlayManagement.__showLoadingIndicator())},t.prototype.onPageLoaded=function(t){this._isPageLoading&&(this._isPageLoading=!1,autotask.overlayManagement.__hideLoadingIndicator()),!1===t&&this._pageContainerFrameElement.contentWindow&&this._pageContainerFrameElement.contentWindow.focus()},t.prototype._activateDashboardContainer=function(){this._pageContainerElement.classList.remove(this._activeCssClass),this._dashboardContainerElement.classList.add(this._activeCssClass),this._workspaceContainerElement.classList.remove(this._pageActiveCssClass),this._setPageFramesDefaultUrl(),autotask.findPage().__set_isDashboardActive(!0)},t.prototype._activatePageContainer=function(){this._dashboardContainerElement.classList.remove(this._activeCssClass),this._pageContainerElement.classList.add(this._activeCssClass),this._workspaceContainerElement.classList.add(this._pageActiveCssClass),autotask.findPage().__set_isDashboardActive(!1)},t.prototype._setPageFramesDefaultUrl=function(){if(this._pageFrameDefaultUrl){var t=this._pageContainerFrameElement.src;(void 0===typeof t||0===t.length||t.toLowerCase().indexOf(this._pageFrameDefaultUrl.toLowerCase())<0)&&(this._pageContainerFrameElement.src=this._pageFrameDefaultUrl)}},t}();t.WorkspaceManagement=e}(AutotaskWorkspaceSystem||(AutotaskWorkspaceSystem={}));


!function(){"use strict";window.autotask.inherit=function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n},window.autotask.proxy=function(t,e){null!=t&&null!=e||autotask.throwException("The autotask.proxy method requires a function pointer and a this argument.");var i=Array.prototype.slice.call(arguments,2),n=function(){var n=Array.prototype.slice.call(arguments);return t.apply(e,i.concat(n))};return n}}(),window.Autotask.TypeSpecificInstanceManagement=function(){"use strict";function t(){this._ids=[],this._isExceptionGenerationEnabled=!1}return t.prototype._ids=null,t.prototype._isExceptionGenerationEnabled=null,t.prototype.__enableExceptionGeneration=function(){this._isExceptionGenerationEnabled=!0},t.prototype.__findInstances=function(){for(var t=null,e=[],i=autotask.instanceManagement.__findInstances(),n=0;n<this._ids.length;n++)(t=i[this._ids[n]])&&e.push(t);return e},t.prototype.__registerInstance=function(t,e){this._isExceptionGenerationEnabled&&(-1!==this._ids.indexOf(e)&&window.autotask.throwException('Duplicate ids for a specific type of framework instance have been detected with a value of "'+e+'".'));autotask.instanceManagement.__addRegistrationKey(t,e),this._ids.push(e)},t.prototype.__unregisterInstance=function(t){var e=this._ids.indexOf(t);this._ids.splice(e,1)},t}(),Autotask.BrowserDetection=function(){"use strict";function t(){this._browsers=[{string:window.navigator.userAgent,subString:"Chrome",identity:"Chrome"},{string:window.navigator.userAgent,subString:"MSIE",identity:"Explorer"},{string:window.navigator.userAgent,subString:"Firefox",identity:"Firefox"},{string:window.navigator.userAgent,subString:"Safari",identity:"Safari"},{string:window.navigator.userAgent,subString:"Opera",identity:"Opera"},{string:window.navigator.userAgent,subString:"Trident",identity:"Explorer (Trident)"}]}return t.prototype._browserName=null,t.prototype._browserVersion=null,t.prototype._browsers=null,t.prototype.isFirefox=function(){return"Firefox"==this._browserName},t.prototype.isInternetExplorer=function(){return"Explorer"==this._browserName||"Explorer (Trident)"==this._browserName},t.prototype.isSafari=function(){return"Safari"==this._browserName},t.prototype.isWebkit=function(){return"Chrome"==this._browserName||"Safari"==this._browserName},t.prototype.__initialize=function(){var t=this._initializeBrowserName();this._initializeBrowserVersion(t)},t.prototype._initializeBrowserName=function(){var t=this._browsers,e=null;this._browserName="Other";for(var i=0;i<t.length;i++){var n=t[i].string;if(e=t[i].subString,-1!=n.indexOf(t[i].subString))return this._browserName=t[i].identity,e}},t.prototype._initializeBrowserVersion=function(t){var e=window.navigator.userAgent,i=e.indexOf(t);-1!=i||-1!=(i=(e=window.navigator.appVersion).indexOf(t))?this._browserVersion=parseFloat(e.substring(i+t.length+1)):this._browserVersion="Unknown"},t}(),function(){"use strict";Autotask.DeviceDetection=function(){this._isTouch="ontouchend"in document,this._isPointer=window.navigator.pointerEnabled||window.navigator.msPointerEnabled||!1},Autotask.DeviceDetection.prototype={_isPointer:null,_isTouch:null,isPointer:function(){return this._isPointer},isTouch:function(){return this._isTouch}}}(),Autotask.InstanceLifeCycleManagement=function(){"use strict";function t(){}return t.prototype.__executeLifeCycle=function(t){null!==t&&(this._initialize(t),this._registerHandlers(t),this._finalize(t))},t.prototype.__executeLifeCycleCompleteEvent=function(t){if(null!==t)for(var e in t)t.hasOwnProperty(e)&&t[e].__complete&&t[e].__complete()},t.prototype.__executeLifeCycleFindViewInstancesEvent=function(t){if(null!==t)for(var e in t)t.hasOwnProperty(e)&&t[e].__findViewInstances&&t[e].__findViewInstances()},t.prototype._initialize=function(t){for(var e in t)t.hasOwnProperty(e)&&t[e].__initialize&&t[e].__initialize()},t.prototype._finalize=function(t){for(var e in t)t.hasOwnProperty(e)&&t[e].__finalize&&t[e].__finalize()},t.prototype._registerHandlers=function(t){for(var e in t)t.hasOwnProperty(e)&&t[e].__registerHandlers&&t[e].__registerHandlers()},t}(),Autotask.LifeCycleManagement=function(){"use strict";function t(){this._firstInitializationDelegates=[],this._intermediateInitializationDelegates=[],this._finalInitializationDelegates=[]}return t.prototype._finalInitializationDelegates=null,t.prototype._firstInitializationDelegates=null,t.prototype._intermediateInitializationDelegates=null,t.prototype.__frameworkInstances=null,t.prototype.__addFinalInitializationDelegate=function(t){this._finalInitializationDelegates.push(t)},t.prototype.__addFirstInitializationDelegate=function(t){this._firstInitializationDelegates.push(t)},t.prototype.__addIntermediateInitializationDelegate=function(t){this._intermediateInitializationDelegates.push(t)},t.prototype._createFrameworkInstances=function(t){null!==t&&autotask.instanceTrackerManagement.__startTrackingInstances(t);var e=null;return null!==this.__frameworkInstances&&(e=this.__frameworkInstances()),null!==t&&autotask.instanceTrackerManagement.__stopTrackingInstances(t.__key),this.__frameworkInstances=null,e},t.prototype._finalInitialization=function(){this._executeInitializationDelegates(this._finalInitializationDelegates),this._finalInitializationDelegates=[]},t.prototype._firstInitialization=function(){this._executeInitializationDelegates(this._firstInitializationDelegates),this._firstInitializationDelegates=[]},t.prototype._executeInitializationDelegates=function(t){for(var e=0;e<t.length;e++)t[e]()},t.prototype._intermediateInitialization=function(){this._executeInitializationDelegates(this._intermediateInitializationDelegates),this._intermediateInitializationDelegates=[]},t}(),window.ChartDataGenerator=function(){"use strict";function t(t,e,i,n,o,r,a,s,l,u){this._chartType=t,this._colorOptions=e,this._xAxisOptions=i,this._yAxisOptions=n,this._secondaryYAxisOptions=o,this._legendOptions=r,this._dataSeriesList=a,this._trendLineOptionsList=s,this._dataPointDrilldownHandler=l,this._dataSeriesDrilldownHandler=u}return t.prototype._chartType=null,t.prototype._colorOptions=null,t.prototype._dataSeriesList=null,t.prototype._dataPointDrilldownHandler=null,t.prototype._dataSeriesDrilldownHandler=null,t.prototype._legendOptions=null,t.prototype._secondaryYAxisOptions=null,t.prototype._trendLineOptionsList=null,t.prototype._xAxisOptions=null,t.prototype._yAxisOptions=null,t.prototype.__generate=function(){var t={};return t.pieDoughnutBorderColor="#"+this._colorOptions.pieBorderColor,t.pieDoughnutTotalTextColor="#"+this._colorOptions.textColor,t.axisX=this._createXAxisData(this._xAxisOptions,this._colorOptions),null!==this._yAxisOptions&&(t.axisY=this._createYAxisData(this._yAxisOptions,this._colorOptions)),null!==this._secondaryYAxisOptions&&(t.axisY2=this._createYAxisData(this._secondaryYAxisOptions,this._colorOptions)),null!==this._legendOptions&&(t.legend=this._createLegendData(this._legendOptions,this._colorOptions)),t.data=this._createDataSeriesListData(this._dataSeriesList,this._trendLineOptionsList),t},t.prototype._createDataPointsData=function(t){for(var e=[],i=t.dataPointFullLabels,n=t.dataPointLabels,o=t.dataPointLegendText,r=t.dataPointNames,a=t.dataPointXValues,s=t.dataPointYValues,l=t.dataPointYValuesFormatted,u=t.dataPointHasPrimaryGroupByValue,p=t.dataPointPrimaryGroupByValues,c=t.dataPointHasSecondaryGroupByValue,_=t.dataPointSecondaryGroupByValues,d=t.reportOnFieldOptionId,h=this,y=null,f=function(t,e){h._dataPointDrilldownHandler(t,e,e.dataPoint.primaryGroupByValue,e.dataPoint.secondaryGroupByValue,e.dataPoint.reportOnFieldOptionId)},g=0;g<s.length;g++)y={},null!==this._dataPointDrilldownHandler&&(y.click=f,y.hasPrimaryGroupByValue=u[g],y.primaryGroupByValue=p[g],y.hasSecondaryGroupByValue=c[g],y.secondaryGroupByValue=_[g],y.reportOnFieldOptionId=d),y.cursor="pointer",null!==i&&(y.fullLabel=i[g]),null!==n&&(y.label=n[g]),null!==o&&(y.legendText=o[g]),null!==r&&(y.name=r[g]),null!==t.totalText?y.total=t.totalText:y.total="",null!==a&&(y.x=a[g]),y.y=s[g],y.yFormatted=l[g],e.push(y);return e},t.prototype._createDataSeriesData=function(t){var e={};if(e.type=this._chartType,t.isSecondary&&(e.axisYType="secondary"),null!==this._legendOptions&&(e.showInLegend=!0),null!==t.legendText&&(e.legendText=t.legendText),null!==t.name&&(e.name=t.name),null!==this._dataSeriesDrilldownHandler){var i=this;e.click=function(t,e){i._dataSeriesDrilldownHandler(t,e)},e.hasPrimaryGroupByValue=t.hasPrimaryGroupByValue,e.primaryGroupByValue=t.primaryGroupByValue,e.hasSecondaryGroupByValue=t.hasSecondaryGroupByValue,e.secondaryGroupByValue=t.secondaryGroupByValue,e.reportOnFieldOptionId=t.reportOnFieldOptionId}return e.dataPoints=this._createDataPointsData(t),e},t.prototype._createDataSeriesListData=function(t,e){for(var i=[],n=0;n<t.length;n++)i.push(this._createDataSeriesData(t[n]));if(null!==e)for(var o=0;o<e.length;o++)i.push(this._createTrendLineData(e[o]));return i},t.prototype._createLegendData=function(t,e){var i={cursor:"pointer"};return null!==t.fontSize&&(i.fontSize=t.fontSize),i.fontColor="#"+e.textColor,t.isClickAssociatedWithDataPoint?i.itemclick=function(t,e){e.dataPoint.click(t,e)}:i.itemclick=function(t,e){e.dataSeries.click(t,e)},t.isCenteredVertically&&(i.verticalAlign="center"),t.isRightAlignedHorizontally&&(i.horizontalAlign="right"),i},t.prototype._createTrendLineData=function(t){for(var e={},i=t.dataPointXValues,n=t.dataPointYValues,o=[],r=0;r<n.length;r++){var a={isTrendLine:!0};a.x=i[r],a.y=n[r],o.push(a)}return e.dataPoints=o,e.lineThickness=1,e.markerType="none",e.type="line",e},t.prototype._createXAxisData=function(t,e){var i={};return i.gridColor="#"+e.gridColor,i.labelFontColor="#"+e.textColor,i.lineColor="#"+e.axisColor,null!==t&&(i.title=t.title),i.titleFontColor="#"+e.textColor,i},t.prototype._createYAxisData=function(t,e){var i={};return i.gridColor="#"+e.gridColor,i.interval=t.interval,i.maximum=t.maxValue,i.labelAngle=t.labelAngle,i.labelFontColor="#"+e.textColor,i.lineColor="#"+e.axisColor,i.minimum=t.minValue,null!==t.prefix&&(t.isSecondary?i.secondaryPrefix=t.prefix:i.prefix=t.prefix),null!==t.suffix&&(t.isSecondary?i.secondarySuffix=t.suffix:i.suffix=t.suffix),null!==t.title&&(i.title=t.title),i.titleFontColor="#"+e.textColor,i},t}();


!function(){"use strict";var t=Autotask.LifeCycleManagement.prototype;Autotask.LifeCycleManagement=function(){this._firstInitializationDelegates=[],this._intermediateInitializationDelegates=[],this._finalInitializationDelegates=[],this._viewInstanceVariableNames={},this._openRequestCount=0,this._performanceTrackingKey=null},Autotask.LifeCycleManagement.prototype=t,Autotask.LifeCycleManagement.prototype._openRequestCount=null,Autotask.LifeCycleManagement.prototype._viewInstanceVariableNames=null,Autotask.LifeCycleManagement.prototype._performanceTrackingKey=null,Autotask.LifeCycleManagement.prototype.__viewInstances=null,Autotask.LifeCycleManagement.prototype.__viewInstanceVariableNameRegistration=null,Autotask.LifeCycleManagement.prototype.__addViewInstanceNames=function(t,e){this._viewInstanceVariableNames[t]=e},Autotask.LifeCycleManagement.prototype.__performanceTrackingInitialization=function(t){this._performanceTrackingKey=t},Autotask.LifeCycleManagement.prototype.__executeLifeCycle=function(t,e){const i=new AutotaskPerformanceInstrumentationSystem.FrameworkLifeCycleLog(this._performanceTrackingKey);i.__markFirstInitializationStart(),this._firstInitialization(),i.__markFirstInitializationEnd(),i.__markCreateFrameworkInstancesStart();var n=this._createFrameworkInstances(e);i.__markCreateFrameworkInstancesEnd(),i.__markIntermediateInitializationStart(),this._intermediateInitialization(),i.__markIntermediateInitializationEnd(),i.__markExecuteLifeCycleStart(),autotask.instanceLifeCycleManagement.__executeLifeCycle(n),i.__markExecuteLifeCycleEnd(),i.__markFinalInitializationStart(),this._finalInitialization(),i.__markFinalInitializationEnd(),i.__markCreateAndInitializeViewInstancesStart(),this._createAndInitializeViewInstances(e),i.__markCreateAndInitializeViewInstancesEnd(),i.__markExecuteLifeCycleCompleteEventStart(),autotask.instanceLifeCycleManagement.__executeLifeCycleCompleteEvent(n),i.__markExecuteLifeCycleCompleteEventEnd(),i.__markNotifyWorkspaceStart(),this._notifyWorkspace(t),i.__markNotifyWorkspaceEnd(),i.__markRaiseFrameworkLoadedStart(),this._raiseFrameworkLoaded(t),i.__markRaiseFrameworkLoadedEnd(),autotask.performanceInstrumentationManagement.__addFrameworkLifeCycleLog(i)},Autotask.LifeCycleManagement.prototype._associateViewInstanceVariableNames=function(t,e){for(var i in this._viewInstanceVariableNames)this._viewInstanceVariableNames.hasOwnProperty(i)&&(i===t?null!==e&&e.__addViewInstanceVariableNames(this._viewInstanceVariableNames[i]):autotask.instanceTrackerManagement.__findInstanceTracker(i).__addViewInstanceVariableNames(this._viewInstanceVariableNames[i]));this._viewInstanceVariableNames={}},Autotask.LifeCycleManagement.prototype._createAndInitializeViewInstances=function(t){null!==this.__viewInstances&&this.__viewInstances(),null!==this.__viewInstanceVariableNameRegistration&&this.__viewInstanceVariableNameRegistration(),this._associateViewInstanceVariableNames("DefaultInstanceTracker",t),this.__viewInstances=null,this.__viewInstanceVariableNameRegistration=null},Autotask.LifeCycleManagement.prototype._notifyWorkspace=function(t){if(!t){var e=autotask.workspaceLocator.__get_workspace(!0);if(e){var i=!(window.top.autotask&&window.top.autotask.isLandingPage);e.onPageLoaded(i)}}},Autotask.LifeCycleManagement.prototype._raiseFrameworkLoaded=function(t){var e=this,i=null;if(!t){i=window.setInterval((function(){0===e._openRequestCount&&(window.clearInterval(i),window.autotask.walkMeIntegration.isEnabled()&&window.autotask.walkMeIntegration.start(),window.autotask.cooperBotIntegration.isEnabled&&window.autotask.cooperBotIntegration.start())}),100)}}}(),function(){"use strict";var t=Autotask.InstanceTracker.prototype;Autotask.InstanceTracker=function(t,e){this._trackerKey=t,this._isHtmlManipulationEnabled=!1,this._container=null,this._transition=null,null!==e&&(this._container=AutotaskDomSystem.Document.getElementById(e),this._isHtmlManipulationEnabled=!0),this._instanceIds=[],this._viewInstanceVariableNames=[]},Autotask.InstanceTracker.prototype=t,Autotask.InstanceTracker.prototype._viewInstanceVariableNames=null,Autotask.InstanceTracker.prototype.__addViewInstanceVariableNames=function(t){for(var e=0;e<t.length;e++)this._viewInstanceVariableNames.push(t[e])},Autotask.InstanceTracker.prototype._disposeOfViewInstances=function(){for(var t=this._viewInstanceVariableNames.shift();t;){var e=!1,i=window[t];void 0===i&&(t=t.split(".")[1],i=window.autotask[t],e=!0),i.dispose&&i.dispose(),e?delete window.autotask[t]:delete window[t],t=this._viewInstanceVariableNames.shift()}}}(),window.refresh=function(t,e){"use strict";var i="The parameters for the global refresh method in MVC must be of type string.",n=null,o=null;null!=t&&("string"==typeof t?n=t:autotask.throwException(i)),null!=e&&("string"==typeof e?o=e:autotask.throwException(i)),window.autotask.windowManagement.refresh(n,o)},window.Autotask.ConversationQuickNote=function(){"use strict";function t(t,e,i,n,o,a,s){autotask.instanceManagement.__addRegistrationKey(this,t),this._quickNoteElement=document.getElementById(t),this._quickNoteElement.addEventListener("keydown",(function(t){AutotaskDomSystem.KeyCode.isTab(t.which)&&t.preventDefault()})),this._saveRoute=e,this._textAreaId=i,this._minutesBoxId=n,this._saveButtonId=o,this._cancelConfirmationMessage=a,this._modelParameterName=s,this._deactivatingHandlers=[],this._tabbingAwayHandlers=[],this._isActive=!1;var r=this._quickNoteElement.querySelector(".ButtonBar");this._buttonBarTabbingSystem=new AutotaskTabbingSystem.TabbingSystem(r,autotask.proxy(this._buttonBarTabbingAwayHandler,this));var l=this._quickNoteElement.querySelector(".OptionBar");this._optionBarTabbingSystem=new AutotaskTabbingSystem.TabbingSystem(l,autotask.proxy(this._optionBarTabbingAwayHandler,this))}return t.prototype._buttonBarTabbingSystem=null,t.prototype._cancelConfirmationMessage=null,t.prototype._deactivatingHandlers=null,t.prototype._isActive=null,t.prototype._minutesBox=null,t.prototype._minutesBoxId=null,t.prototype._modelParameterName=null,t.prototype._optionBarTabbingSystem=null,t.prototype._quickNoteElement=null,t.prototype._saveButton=null,t.prototype._saveButtonId=null,t.prototype._savePointer=null,t.prototype._saveRoute=null,t.prototype._tabbingAwayHandlers=null,t.prototype._textArea=null,t.prototype._textAreaId=null,t.prototype._validation=null,Object.defineProperty(t.prototype,"isEnabled",{get:function(){return this._isActive}}),t.prototype.__set_savePointer=function(t){this._savePointer=t},t.prototype.__get_isActive=function(){return this._textArea.value.length>0},t.prototype.___get_quickNoteElement=function(){return this._quickNoteElement},t.prototype.___get_textArea=function(){return this._textArea},t.prototype._onConfirmCancel=function(){this.__deactivate()},t.prototype.addTabbingAwayHandler=function(t){this._tabbingAwayHandlers.push(t),this._buttonBarTabbingSystem.isEnabled||(this._buttonBarTabbingSystem.reset(),this._optionBarTabbingSystem.reset(),this._buttonBarTabbingSystem.isEnabled=!0,this._optionBarTabbingSystem.isEnabled=!0)},t.prototype.focus=function(){this._textArea.focus()},t.prototype.focusEnd=function(){this._optionBarTabbingSystem.hasFocusableParticipants?this._optionBarTabbingSystem.focusLastParticipant():this._buttonBarTabbingSystem.focusLastParticipant()},t.prototype.focusStart=function(){this.focus()},t.prototype.__addDeactivating=function(t){this._deactivatingHandlers.push(t)},t.prototype.__cancel=function(){if(this._textArea.isDirty){var t=new Autotask.ConfirmationDialogOptions;t.set_confirmPointer(autotask.proxy(this._onConfirmCancel,this)),t.set_description(this._cancelConfirmationMessage),autotask.confirmationDialog.show(t)}else this.__deactivate()},t.prototype.__finalize=function(){this._validation.__parse()},t.prototype.__initialize=function(){this._textArea=autotask.find(this._textAreaId),this._textArea.addDirtyStateChangeHandler(autotask.proxy(this._textAreaDirtyStateChangeHandler,this)),this._textArea.addTabbingAwayHandler(autotask.proxy(this._textAreaTabbingAwayHandler,this)),null!==this._minutesBoxId&&(this._minutesBox=autotask.find(this._minutesBoxId),this._minutesBox.addActivatedHandler(autotask.proxy(this._minutesBoxActivatedHandler,this)),this._minutesBox.addTabbingAwayHandler(autotask.proxy(this._minutesBoxTabbingAwayHandler,this))),this._saveButton=autotask.find(this._saveButtonId),this._validation=new Autotask.PostedContainerValidation(this._quickNoteElement);var t=autotask.validationSummaryManagement.__findValidationSummary(this._quickNoteElement);this._validation.__registerValidationSummary(t)},t.prototype.__save=function(){if(this.__validate()&&null!==this._savePointer){var t=new AutotaskRequestDataSystem.SerializedRequestData([this._quickNoteElement]),e=this.___createEventArgs(this._saveRoute,t,this._modelParameterName);this._savePointer(e)}},t.prototype.__validate=function(){var t=this._validation.__validate();return t||this._validation.__validationFailed(),this._validation.__validationCompleted(t,!1),t},t.prototype.__activate=function(){null!==this._minutesBox&&(this._minutesBox.isActive=!0),this._isActive=!0},t.prototype.__deactivate=function(){this._textArea.clearValue(),null!==this._minutesBox&&(this._minutesBox.clearValue(),this._minutesBox.isActive=!1),this._saveButton.isEnabled=!1,this.__validate(),this._onDeactivating(),this._isActive=!1},t.prototype.___createEventArgs=function(t,e,i){return new Autotask.QuickNoteSaveEventArgs(t,e,i)},t.prototype._buttonBarTabbingAwayHandler=function(t){t?null!==this._minutesBox?this._minutesBox.focusEnd():this._textArea.focusEnd():this._optionBarTabbingSystem.hasFocusableParticipants?this._optionBarTabbingSystem.focusFirstParticipant():this._raiseTabbingAwayEvent(t)},t.prototype._minutesBoxActivatedHandler=function(){this.__activate(),this._minutesBox.focus()},t.prototype._minutesBoxTabbingAwayHandler=function(t){t.cancel(),t.isShiftKeyPressed?this._textArea.focusEnd():this._buttonBarTabbingSystem.focusFirstParticipant()},t.prototype._optionBarTabbingAwayHandler=function(t){t?this._buttonBarTabbingSystem.focusLastParticipant():this._raiseTabbingAwayEvent(t)},t.prototype._textAreaDirtyStateChangeHandler=function(t){this._saveButton.isEnabled=t.isDirty},t.prototype._textAreaTabbingAwayHandler=function(t){t.cancel(),t.isShiftKeyPressed?this._raiseTabbingAwayEvent(t.isShiftKeyPressed):null!==this._minutesBox?this._minutesBox.focusStart():this._buttonBarTabbingSystem.focusFirstParticipant()},t.prototype._onDeactivating=function(){for(var t=new Autotask.QuickNoteDeactivatingEventArgs(this.___get_quickNoteElement()),e=0;e<this._deactivatingHandlers.length;e++)this._deactivatingHandlers[e](t)},t.prototype._raiseTabbingAwayEvent=function(t){if(this._tabbingAwayHandlers.length>0){var e=new AutotaskTabbingSystem.TabbingAwayEventArgs(this.id,t,(function(){}));for(let t=0;t<this._tabbingAwayHandlers.length;t++)this._tabbingAwayHandlers[t](e)}},t}(),Autotask.QuickNoteSaveEventArgs=function(){"use strict";function t(t,e,i){this._route=t,this._serializedRequestData=e,this._serializedRequestDataParameterName=i}return t.prototype._route=null,t.prototype._serializedRequestData=null,t.prototype._serializedRequestDataParameterName=null,t.prototype.__get_route=function(){return this._route},t.prototype.__get_serializedRequestData=function(){return this._serializedRequestData},t.prototype.__get_serializedRequestDataParameterName=function(){return this._serializedRequestDataParameterName},t}(),window.Autotask.AjaxSender=function(){"use strict";function t(t,e,i,n){this._successDelegate=n;var o="POST"===t;this._requestData=new Autotask.AjaxRequestData(i,o),this._requestCoordinator=new Autotask.AjaxRequestCoordinator(t,e)}return t.prototype._requestCoordinator=null,t.prototype._requestData=null,t.prototype._successDelegate=null,t.prototype.___executeSuccessDelegate=function(t){var e=!1;return void 0!==this._successDelegate&&null!==this._successDelegate&&(this._successDelegate(t),e=!0),e},t.prototype.___mergeData=function(t,e){this._requestData.__mergeData(t,e)},t.prototype.___sendRequest=function(t,e,i,n){var o=this._requestData.__serialize();this._requestCoordinator.__sendRequest(o,e,n,i,t)},t.prototype.__setPipelineExecutionDelegate=function(t){this._requestCoordinator.__setPipelineExecutionDelegate(t)},t.prototype.__cancelRequest=function(){this._requestCoordinator.__cancelRequest()},t}(),Autotask.ButtonCore=function(){"use strict";function t(t){autotask.buttonInstanceManagement.__registerInstance(this,t),this._disabledButtonStateCssClass="DisabledState",this._hoverButtonStateCssClass="HoverState",this._normalButtonStateCssClass="NormalState",this._currentStateCssClass=this._normalButtonStateCssClass,this._buttonElement=document.getElementById(t),this._clickPointers=[],this._keyDownPointers=[],this._mouseEnterPointers=[],this._mouseLeavePointers=[],this._id=t,this._isClickProtectionActive=!1,this._isClickProtectionCircumvented=!1,this._isEnabled=!0}return t.prototype._buttonElement=null,t.prototype._clickPointers=null,t.prototype._currentStateCssClass=null,t.prototype._disabledButtonStateCssClass=null,t.prototype._hoverButtonStateCssClass=null,t.prototype._id=null,t.prototype._isClickProtectionActive=null,t.prototype._isClickProtectionCircumvented=null,t.prototype._isEnabled=null,t.prototype._keyDownPointers=null,t.prototype._mouseEnterPointers=null,t.prototype._mouseLeavePointers=null,t.prototype._normalButtonStateCssClass=null,t.prototype._pressedButtonStateCssClass=null,t.prototype._primaryClickPointer=null,t.prototype.get_enabled=function(){return this._isEnabled},t.prototype.set_enabled=function(t){this._isEnabled!==t&&(this._isEnabled=t,this.___calibratePermenantStates())},t.prototype.get_title=function(){var t=null;return this._buttonElement.hasAttribute("title")&&(t=this._buttonElement.getAttribute("title")),t},t.prototype.set_title=function(t){this._buttonElement.setAttribute("title",t)},t.prototype.__get_id=function(){return this._id},t.prototype.___get_buttonElement=function(){return this._buttonElement},t.prototype.___set_isClickProtectionCircumvented=function(t){this._isClickProtectionCircumvented=t},t.prototype.___set_primaryClickPointer=function(t){this._primaryClickPointer=t},t.prototype.__onClick=function(t){var e=!0;return this._isEnabled&&!this._isClickProtectionActive&&(this.___determineIfClickProtectionShouldBeActivated()&&autotask.buttonInstanceManagement.__activateClickProtection(),e=this._executeClickPointers(t),this.___determineIfContextOverlayShouldBeHidden()&&autotask.contextOverlayManagement.__hideVisibleContextOverlays(),this.___determineIfClickProtectionShouldBeDeactivated(e)&&autotask.buttonInstanceManagement.__deactivateClickProtection()),e},t.prototype._onKeyDown=function(t){for(var e=0;e<this._keyDownPointers.length;e++)this._keyDownPointers[e](t)},t.prototype.__onMouseEnter=function(t){autotask.eventManagement.__executeHandlers(t,this._mouseEnterPointers,autotask.proxy(this.___mouseEnter,this))},t.prototype.__onMouseLeave=function(t){autotask.eventManagement.__executeHandlers(t,this._mouseLeavePointers,autotask.proxy(this.___mouseLeave,this))},t.prototype.__activateClickProtection=function(){this._isClickProtectionActive=!0},t.prototype.__addClick=function(t){this._clickPointers.push(t)},t.prototype.__addKeyDown=function(t){this._keyDownPointers.push(t)},t.prototype.__addMouseEnter=function(t){this._mouseEnterPointers.push(t)},t.prototype.__addMouseLeave=function(t){this._mouseLeavePointers.push(t)},t.prototype.__applyHoverState=function(){this.get_enabled()&&this.___modifyCssClass(this._hoverButtonStateCssClass)},t.prototype.__deactivateClickProtection=function(){this._isClickProtectionActive&&(this._isClickProtectionActive=!1)},t.prototype.__dispose=function(){autotask.buttonInstanceManagement.__unregisterInstance(this._id)},t.prototype.__initialize=function(){this.___calibratePermenantStates()},t.prototype.__registerHandlers=function(){var t=this;this._buttonElement.addEventListener("keydown",(function(e){t._onKeyDown(e)}))},t.prototype.__removeHoverState=function(){this.get_enabled()&&this.___modifyCssClass(this._normalButtonStateCssClass)},t.prototype.___calibratePermenantStates=function(){this.get_enabled()?this.___modifyCssClass(this._normalButtonStateCssClass):this.___modifyCssClass(this._disabledButtonStateCssClass)},t.prototype.___determineIfClickProtectionShouldBeActivated=function(){return!this._isClickProtectionCircumvented},t.prototype.___determineIfClickProtectionShouldBeDeactivated=function(t){return!this._isClickProtectionCircumvented},t.prototype.___determineIfContextOverlayShouldBeHidden=function(){return autotask.contextOverlayManagement.__determineIfElementIsWithinContextOverlay(this._buttonElement)},t.prototype.___executeOperationFollowingClick=function(t){return t},t.prototype.___modifyCssClass=function(t){this._buttonElement.classList.remove(this._currentStateCssClass),this._buttonElement.classList.add(t),this._currentStateCssClass=t},t.prototype.___mouseEnter=function(t){return this.__applyHoverState(),!0},t.prototype.___mouseLeave=function(t){return this.__removeHoverState(),!0},t.prototype._createClickEventArgs=function(t){var e=!1;null!==t&&(e=t.__ctrlKey);var i=new Autotask.ButtonClickEventArgs;return i.clientInstance=this,i.__ctrlKey=e,i.__id=this.__get_id(),i},t.prototype._createEnterEventArgs=function(t){var e=new Autotask.ButtonMouseEnterEventArgs;return e.__currentTarget=t.__currentTarget,e},t.prototype._createLeaveEventArgs=function(t){return new Autotask.ButtonMouseLeaveEventArgs},t.prototype._executeClickPointers=function(t){for(var e=!0,i=this._createClickEventArgs(t),n=0;n<this._clickPointers.length&&!1!==(e=this._clickPointers[n](i));n++);return e&&null!==this._primaryClickPointer&&(e=this._primaryClickPointer(i)),e=this.___executeOperationFollowingClick(e)},t}(),Autotask.AnchorButton=function(t){"use strict";function e(e,i,n,o){t.call(this,e),this.set_enabled(n),this.___set_isClickProtectionCircumvented(o),this.___set_primaryClickPointer(i)}return autotask.inherit(e,t),e.prototype._onKeyUp=function(t){"13"==t.keyCode&&(t.stopPropagation(),this.__onClick(null))},e.prototype.__focus=function(){this.___get_buttonElement().focus()},e.prototype.__registerHandlers=function(){t.prototype.__registerHandlers.call(this),autotask.findPage().__buttonEvents.registerButton(this.___get_buttonElement()),this.___get_buttonElement().addEventListener("keyup",autotask.proxy(this._onKeyUp,this))},e.prototype.___mouseEnter=function(e){e.__isMouseEvent?t.prototype.___mouseEnter.call(this,e):t.prototype.__onClick.call(this,e)},e}(Autotask.ButtonCore),Autotask.LinkButton=function(t){"use strict";function e(e,i,n,o,a){t.call(this,e,i,n,o),this._contextOverlayRoute=a}return autotask.inherit(e,t),e.prototype._contextOverlay=null,e.prototype._contextOverlayRoute=null,e.prototype.get_text=function(){return this.___get_buttonElement().textContent},e.prototype.set_text=function(t){this.___get_buttonElement().textContent=t},e.prototype._contextOverlayShowing=function(){this._contextOverlayRoute.__makeRequest(null,autotask.proxy(this._contextOverlayShowingSuccess,this))},e.prototype._contextOverlayShowingSuccess=function(t,e){this._contextOverlay.__loadHtmlAndJavaScript(t,e)},e.prototype._mouseEnter=function(t){t.__isMouseEvent&&(this._contextOverlay.clearShowingHandlers(),this._contextOverlay.addShowingHandler(autotask.proxy(this._contextOverlayShowing,this)),this._contextOverlay.show(t.__currentTarget))},e.prototype._mouseLeave=function(){this._contextOverlay.hide()},e.prototype.__initialize=function(){t.prototype.__initialize.call(this),this._contextOverlay=autotask.tooltipContextOverlayLocator.contextOverlay},e.prototype.__registerHandlers=function(){t.prototype.__registerHandlers.call(this),null!==this._contextOverlayRoute&&(this.__addMouseEnter(autotask.proxy(this._mouseEnter,this)),this.__addMouseLeave(autotask.proxy(this._mouseLeave,this)))},e}(Autotask.AnchorButton),Autotask.DefaultButton=function(t){"use strict";function e(e,i,n,o,a){t.call(this,e,i,n,o),this._selectedButtonStateCssClass="SelectedState",this._mouseDownPointers=[],this._mouseUpPointers=[],this._isSelected=a}return autotask.inherit(e,t),e.prototype._isSelected=null,e.prototype._selectedButtonStateCssClass=null,e.prototype.get_selected=function(){return this._isSelected},e.prototype.set_selected=function(t){this._isSelected!==t&&(this._isSelected=t,this.___calibratePermenantStates())},e.prototype.get_text=function(){var t=this._get_text();return null!==t?t.innerText:null},e.prototype.set_text=function(t){var e=this._get_text();null!==e&&(e.innerText=t)},e.prototype._get_text=function(){return this.___get_buttonElement().querySelector(".Text, .Text1")},e.prototype.__onMouseDown=function(t){autotask.eventManagement.__executeHandlers(t,this._mouseDownPointers,autotask.proxy(this._mouseDown,this))},e.prototype.__onMouseUp=function(t){autotask.eventManagement.__executeHandlers(t,this._mouseUpPointers,autotask.proxy(this._mouseUp,this))},e.prototype.__addMouseDown=function(t){this._mouseDownPointers.push(t)},e.prototype.__addMouseUp=function(t){this._mouseUpPointers.push(t)},e.prototype.__applyHoverState=function(){this.get_selected()||t.prototype.__applyHoverState.call(this)},e.prototype.__registerHandlers=function(){t.prototype.__registerHandlers.call(this),this.___get_buttonElement().addEventListener("mousedown",autotask.proxy(this.__onMouseDown,this)),this.___get_buttonElement().addEventListener("mouseup",autotask.proxy(this.__onMouseUp,this))},e.prototype.__removeHoverState=function(){this.get_selected()||t.prototype.__removeHoverState.call(this)},e.prototype.___calibratePermenantStates=function(){this.get_enabled()&&this.get_selected()?this.___modifyCssClass(this._selectedButtonStateCssClass):t.prototype.___calibratePermenantStates.call(this)},e.prototype._mouseDown=function(t){return!0},e.prototype._mouseUp=function(t){return!0},e}(Autotask.AnchorButton),Autotask.TitleBarButton=function(t){"use strict";function e(e,i,n,o){t.call(this,e),this._clickPointer=i,this._page=n,this.set_enabled(o),this.___set_primaryClickPointer(autotask.proxy(this._onClick,this))}return autotask.inherit(e,t),e.prototype._clickPointer=null,e.prototype._page=null,e.prototype.__registerHandlers=function(){t.prototype.__registerHandlers.call(this),autotask.findPage().__buttonEvents.registerButton(this.___get_buttonElement())},e.prototype.___mouseEnter=function(e){e.__isMouseEvent?t.prototype.___mouseEnter.call(this,e):t.prototype.__onClick.call(this,e)},e.prototype._onClick=function(t){null!==this._clickPointer?this._clickPointer(t):this._page.__open(null)},e}(Autotask.ButtonCore),window.Autotask.StandardDialog=function(){"use strict";function t(t,e){autotask.instanceManagement.__addRegistrationKey(this,t),this._dialog=document.getElementById(t),this._title=this._dialog.querySelector(".TitleBar"),this._titleText=this._title.querySelector(".Text"),this._areEventsRegistered=!1,this._cssClassActive="Active",this._disableFocus=!1,this._gridIds=[],this._hideFinishedPointers=[],this._hidePointer=e,this._isDraggingActive=!1,this._isVisible=!1,this._lockHide=!1,this._persistHtml=!0}return t.prototype._dialog=null,t.prototype._registeredHtml=null,t.prototype._title=null,t.prototype._titleText=null,t.prototype._areEventsRegistered=null,t.prototype._cssClassActive=null,t.prototype._dragLeftOffset=null,t.prototype._dragTopOffset=null,t.prototype._disableFocus=null,t.prototype._gridIds=null,t.prototype._headingHeight=null,t.prototype._hidePointer=null,t.prototype._hideFinishedPointers=null,t.prototype._idealWidth=null,t.prototype._instanceTracker=null,t.prototype._isDraggingActive=null,t.prototype._isVisible=null,t.prototype._lockHide=null,t.prototype._persistHtml=null,t.prototype.get_title=function(){return null!==this._titleText?this._titleText.textContent:""},t.prototype.set_title=function(t){null!==this._titleText&&(this._title.classList.add(this._cssClassActive),this._titleText.textContent=t)},t.prototype.__get_dialog=function(){return this._dialog},t.prototype.__get_isVisible=function(){return this._isVisible},t.prototype.__set_registeredHtml=function(t){this._registeredHtml=t},t.prototype._tabCapableElementKeyDown=function(t){if(AutotaskDomSystem.KeyCode.isTab(t.keyCode)){var e=0,i=0;t.preventDefault(),t.stopPropagation();for(var n=0;n<this._tabCapableElements.length;n++)if(this._tabCapableElements[n]==t.currentTarget){e=n;break}i=this._findNextTabCapableElementIndex(e,t.shiftKey);for(var o=this._tabCapableElements[i],a=0;o.disabled&&a<this._tabCapableElements.length;)i=this._findNextTabCapableElementIndex(i,t.shiftKey),o=this._tabCapableElements[i],a++;o.focus()}return!0},t.prototype._windowResize=function(){this._updateSizeAndLocation()},t.prototype.hide=function(){this.__hide(!1)},t.prototype.show=function(){autotask.globalValidationOverlay.hide(null),this._dialog.classList.add("ShowingHack"),null===this._idealWidth&&(this._idealWidth=AutotaskDomSystem.Other.getComputedStyle(this._dialog).width),this._managePrintCapabilities(!0),this._updateSizeAndLocation(!0),this.__alignDialog(),this._dialog.classList.remove("ShowingHack"),autotask.overlayManagement.__pushDialogOnStack(this._dialog),this.___initializeLayout(),this._areEventsRegistered||(this._setupTabbing(),this._areEventsRegistered=!0),!0!==this._disableFocus&&this._focusOnFirstElement(),this._isVisible=!0},t.prototype.__addHideFinished=function(t){this._hideFinishedPointers.push(t)},t.prototype.__alignDialog=function(t){if(!this._dialog.classList.contains("Maximum")){var e=Math.round(AutotaskDomSystem.Other.getComputedStyle(this._dialog).width/2);this._dialog.style.marginLeft="-"+e+"px"}if(null!==t&&t&&!this._dialog.classList.contains("VerticalMaximum")){var i=Math.round(AutotaskDomSystem.Other.getComputedStyle(this._dialog).height/2);this._dialog.style.marginTop="-"+i+"px"}},t.prototype.__disableFocusWhenShown=function(){this._disableFocus=!0},t.prototype.__hide=function(t){if(!this._lockHide&&this._isVisible){autotask.globalValidationOverlay.hide(null),this._lockHide=!0,this._managePrintCapabilities(!1),null===this._hidePointer||t||this._hidePointer(),autotask.overlayManagement.__pullDialogOffStack(this._dialog),this._persistHtml||(this._dialog.remove(),null!==this._registeredHtml&&this._registeredHtml.remove(),null!==this._instanceTracker&&this._instanceTracker.__dispose()),this._lockHide=!1,this._isVisible=!1;for(var e=0;e<this._hideFinishedPointers.length;e++)this._hideFinishedPointers[e]()}},t.prototype.__initialize=function(){},t.prototype.__registerGrid=function(t){this._gridIds.push(t)},t.prototype.__registerHandlers=function(){window.addEventListener("resize",autotask.proxy(this._windowResize,this))},t.prototype.__turnOnUnselectable=function(){for(var t=this._dialog.querySelectorAll("*"),e=0;e<t.length;e++)t[e].setAttribute("unselectable","on");this._dialog.setAttribute("unselectable","on"),autotask.overlayManagement.__turnOnUnselectable()},t.prototype.__turnOffPersistence=function(t){this._persistHtml=!1,this._instanceTracker=t},t.prototype.__unregisterGrid=function(t){var e=this._gridIds.indexOf(t);e>0&&this._gridIds.splice(e,1)},t.prototype.___initializeLayout=function(){this._initializeGridLayouts()},t.prototype._findNextTabCapableElementIndex=function(t,e){return e?0===t?this._tabCapableElements.length-1:t-1:t===this._tabCapableElements.length-1?0:t+1},t.prototype._findTabCapableElements=function(){return this._dialog.querySelectorAll('a[tabindex="0"],input:not([type="hidden"]),select,textarea,div[class~="TabIndexHack"]')},t.prototype._focusOnFirstElement=function(){var t=Array.from(this._findTabCapableElements()),e=t.filter((function(t){return"INPUT"===t.nodeName&&!t.disabled||"SELECT"===t.nodeName&&!t.disabled||"TEXTAREA"===t.nodeName&&!t.disabled||"DIV"===t.nodeName&&t.classList.contains("TabIndexHack")}));e.length?e[0].focus():this._tabCapableElements.length&&(t.length>1&&t[0].classList.contains("CancelDialog")?t[1].focus():t[0].focus())},t.prototype._initializeGridLayouts=function(){for(var t=0;t<this._gridIds.length;t++)autotask.find(this._gridIds[t]).__initializeLayout()},t.prototype._managePrintCapabilities=function(t){for(var e=this._dialog.parentElement.children,i=0;i<e.length;i++)e[i]!==this._dialog&&"SCRIPT"!==e[i].nodeName&&(t?e[i].classList.add("Print"):e[i].classList.remove("Print"))},t.prototype._setupTabbing=function(){this._tabCapableElements=this._findTabCapableElements();for(var t=0;t<this._tabCapableElements.length;t++)this._tabCapableElements[t].addEventListener("keydown",autotask.proxy(this._tabCapableElementKeyDown,this))},t.prototype._updateSizeAndLocation=function(t){var e=document.body.clientWidth-10,i=!1;e<this._idealWidth?(this._dialog.style.width=e.toString()+"px",i=!0):AutotaskDomSystem.Other.getComputedStyle(this._dialog).width<this._idealWidth&&(this._dialog.style.width=this._idealWidth.toString()+"px",i=!0),(i||null!==t&&t)&&this.__alignDialog(t)},t}(),window.Autotask.ValidatingDialog=function(t){"use strict";function e(e,i){t.call(this,e,i);var n=document.getElementById(e);this._headingElement=n.querySelector(".DialogHeadingContainer")}return autotask.inherit(e,t),e.prototype._headingElement=null,e.prototype._validationSummary=null,e.prototype.get_customValidationSummary=function(){return this._validationSummary.__get_customValidationSummary()},e.prototype.___get_validationSummary=function(){return this._validationSummary},e.prototype.__initialize=function(){t.prototype.__initialize.call(this),this._validationSummary=autotask.validationSummaryManagement.__findValidationSummary(this._headingElement)},e}(Autotask.StandardDialog),window.Autotask.MultipleItemSelectionDialog=function(t){"use strict";function e(e,i,n,o){t.call(this,e,i),this._gridId=n,this._chipListContainerElement=document.getElementById(o),this._activeCssClass="Active"}return autotask.inherit(e,t),e.prototype._activeCssClass=null,e.prototype._chipListContainerElement=null,e.prototype._grid=null,e.prototype._gridId=null,e.prototype._maximumSelectionCount=null,e.prototype._maximumSelectionCountExceededMessage=null,e.prototype.get_selectedValues=function(){autotask.throwException("This property should act like the JavaScript equivalent of a C# abstract property and should never be called.")},e.prototype.___get_grid=function(){return this._grid},e.prototype.___get_chipList=function(){autotask.throwException("This property should act like the JavaScript equivalent of a C# abstract property and should never be called.")},e.prototype.removeSelection=function(t){this.___removeRowKeys([t]),this._grid.unselectValues([t])},e.prototype.___enableMaximumSelection=function(t,e){this._maximumSelectionCount=t,this._maximumSelectionCountExceededMessage=e},e.prototype.___addRowKeys=function(t){autotask.throwException("This method should act like the JavaScript equivalent of a C# abstract method and should never be called.")},e.prototype.___clearSelections=function(){autotask.throwException("This method should act like the JavaScript equivalent of a C# abstract method and should never be called.")},e.prototype.___findRowKey=function(t){autotask.throwException("This method should act like the JavaScript equivalent of a C# abstract method and should never be called.")},e.prototype.___raiseSelectedEvent=function(){autotask.throwException("This method should act like the JavaScript equivalent of a C# abstract method and should never be called.")},e.prototype.___removeRowKeys=function(t){autotask.throwException("This method should act like the JavaScript equivalent of a C# abstract method and should never be called.")},e.prototype.__initialize=function(){t.prototype.__initialize(),this.___get_chipList().addChipRemovingHandler(autotask.proxy(this._chipListChipRemoving,this)),this.___get_chipList().addChipRemovedHandler(autotask.proxy(this._chipListChipRemoved,this)),this._grid=autotask.find(this._gridId),this._grid.addSelectionChanged(autotask.proxy(this._gridSelectionChanged,this)),this._grid.addSelectionChanging(autotask.proxy(this._gridSelectionChanging,this))},e.prototype.__saveAndClose=function(){this.___raiseSelectedEvent(),this.hide()},e.prototype._chipListChipRemoved=function(t){this._updateChipListVisibility()},e.prototype._chipListChipRemoving=function(t){var e=this.___findRowKey(t.value);null!==e&&this._grid.unselectValues([e])},e.prototype._gridSelectionChanged=function(t){0===t.get_selectionCount()?this.___clearSelections():(this.___addRowKeys(t.get_keyFieldValueAdditions()),this.___removeRowKeys(t.get_keyFieldValueSubtractions())),this._updateChipListVisibility()},e.prototype._gridSelectionChanging=function(t){if(null!==this._maximumSelectionCount&&t.get_expectedSelectionCount()>this._maximumSelectionCount){t.cancel();var e=new Autotask.AlertDialogOptions;e.set_operation(Autotask.AlertDialogOptions.Operation.Information),e.set_description(this._maximumSelectionCountExceededMessage),autotask.alertDialog.show(e)}},e.prototype._updateChipListVisibility=function(){this.___get_chipList().count>0?this._chipListContainerElement.classList.add(this._activeCssClass):this._chipListContainerElement.classList.remove(this._activeCssClass)},e}(Autotask.StandardDialog),window.Autotask.SingleItemSelectionDialog=function(t){function e(e,i,n){t.call(this,e,i),this._gridId=n}return autotask.inherit(e,t),e.prototype._grid=null,e.prototype._gridId=null,e.prototype.___get_grid=function(){return this._grid},e.prototype.___raiseSelectedEvent=function(t){autotask.throwException("This method should act like the JavaScript equivalent of a C# abstract method and should never be called.")},e.prototype.__initialize=function(){t.prototype.__initialize.call(this),this._grid=autotask.find(this._gridId),this._grid.addRowClick(autotask.proxy(this._gridRowClick,this))},e.prototype._gridRowClick=function(t){this.___raiseSelectedEvent(t.get_keyFieldValue()),this.hide()},e}(Autotask.StandardDialog),window.AutotaskGridSystem.ImmutableData=function(){"use strict";function t(t,e){this._bindingPropertyName=t,this._value=e}return t.prototype._bindingPropertyName=null,t.prototype._value=null,t.prototype.__get_requestData=function(){return this.___createRequestData(this._bindingPropertyName,this._value)},t.prototype.___createRequestData=function(t,e){var i={};return i[t]=e,i},t}(),Autotask.GridConfirmationEventArgs=function(){"use strict";function t(){this._isConfirmationEnabled=!1}return t.prototype._confirmationMessage=null,t.prototype._isConfirmationDialogEnabled=null,t.prototype.__get_confirmationDialogOptions=function(t,e){var i=null;return this._isConfirmationDialogEnabled&&((i=new Autotask.ConfirmationDialogOptions).set_confirmPointer(t),i.set_denyPointer(e),i.set_description(this._confirmationMessage),i.set_operation(Autotask.ConfirmationDialogOptions.Operation.Warning)),i},t.prototype.__get_isConfirmationDialogEnabled=function(){return this._isConfirmationDialogEnabled},t.prototype.showConfirmation=function(t){this._enableConfirmationDialog(t)},t.prototype._enableConfirmationDialog=function(t){this._confirmationMessage=t,this._isConfirmationDialogEnabled=!0},t}(),Autotask.GridChangeEventArgs=function(){"use strict";function t(){this._filters={}}return t.prototype._filters=null,t.prototype.__get_data=function(){return this._filters},t.prototype.add=function(t,e){this._filters[t]=e},t.prototype.__applyValues=function(t){var e={};if(null!==t)for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);if("string"==typeof t)autotask.throwException("Data must be an associative array.");else for(var i in this._filters)this._filters.hasOwnProperty(i)&&(e[i]=this._filters[i]);return e},t}(),window.Autotask.ValueFiltering=function(){"use strict";function t(t,e,i){autotask.instanceManagement.__addRegistrationKey(this,t),this._editorId=e,this._gridId=i,this._isFiltering=!1}return t.prototype._editor=null,t.prototype._editorId=null,t.prototype._grid=null,t.prototype._gridId=null,t.prototype._isFiltering=null,t.prototype.___get_editor=function(){return this._editor},t.prototype._editorBroadcastKeyUp=function(t){t.isEnter&&this._grid.__isFilterDirty()&&(this._grid.__stopFilterTimer(),this._grid.__executeFilterRequest())},t.prototype._editorKeyUp=function(t){AutotaskDomSystem.KeyCode.isEnter(t.which)&&this._grid.__isFilterDirty()&&(this._grid.__stopFilterTimer(),this._grid.__executeFilterRequest())},t.prototype._editorImmediateChange=function(){this.___triggerFilterTimer()},t.prototype.__initialize=function(){this._editor=autotask.find(this._editorId),this._grid=autotask.find(this._gridId)},t.prototype.__registerHandlers=function(){"function"==typeof this._editor.addImmediateChangeHandler?this._editor.addImmediateChangeHandler(autotask.proxy(this._editorImmediateChange,this)):this._editor.__addImmediateChange(autotask.proxy(this._editorImmediateChange,this)),"function"==typeof this._editor.addBroadcastKeyUpHandler&&this._editor.addBroadcastKeyUpHandler(autotask.proxy(this._editorBroadcastKeyUp,this)),"function"==typeof this._editor.__addKeyUp&&this._editor.__addKeyUp(autotask.proxy(this._editorKeyUp,this))},t.prototype.___triggerImmediateExecution=function(){this._grid.__executeFilterRequest()},t.prototype.___triggerFilterTimer=function(){this._grid.__isFilterDirty()?(this._grid.__startFilterTimer(),this._isFiltering=!0):this.___stopFilterTimer()},t.prototype.___stopFilterTimer=function(){this._grid.__stopFilterTimer(),this._isFiltering=!1},t}(),window.AutotaskItemSelectionSystem.IconGenerator=function(){"use strict";function t(){}return t.prototype.___get_cssClasses=function(){autotask.throwException('The "IconGenerator__generate" method acts like an abstract internal method and must be overridden.')},t.prototype.generateIconElement=function(){var t=document.createElement("div");t.className=this.___get_cssClasses();var e=this.___generateNestedElement();return null!==e&&t.appendChild(e),t},t.prototype.___generateColorCssClasses=function(t){return"ColorSwatch ColorSample "+("Color"+t)},t.prototype.___generateNestedElement=function(){return null},t}(),Autotask.FormTemplateApplicator=function(){"use strict";function t(t,e,i){this._participant=autotask.find(e),this.participantToken=t,this.participantId=e,this.sortIndex=i}return Object.defineProperty(t.prototype,"isParticipantEnabled",{get:function(){return this.___get_isParticipantEnabled()}}),t.prototype.participantId=null,t.prototype.participantToken=null,t.prototype.sortIndex=null,t.prototype.___get_isParticipantEnabled=function(){autotask.throwException('The "___get_isParticipantEnabled" method on Autotask.FormTemplateApplicator is an "abstract" method.')},t.prototype.___get_participant=function(){return this._participant},t.prototype._participant=null,t.prototype.___validateParticipant=function(){this._editor.get_isDirty()&&this._editor.__validate()},t}(),Autotask.Section=function(){"use strict";var t="Collapsed",e="Expanded";function i(t,e,i){autotask.instanceManagement.__addRegistrationKey(this,t),this._collapsibleState=e,this._collapsedCssClass="Collapsed",this._collapsibleStateManager=i,this._section=document.getElementById(t),this._sectionHeaderText=this._section.querySelector(".Heading > .Left > .TextContent > .Text"),this._sectionHeaderSecondaryText=this._section.querySelector(".Heading > .Left > .TextContent > .SecondaryText"),this._sectionDescription=this._section.querySelector(":scope > .DescriptionText"),this._toggle=this._section.querySelector(".Heading > .Toggle"),this._registerHandlers(),this._collapsedPointers=[],this._expandedPointers=[],this._gridIds=[]}return i.prototype._section=null,i.prototype._sectionDescription=null,i.prototype._sectionHeaderSecondaryText=null,i.prototype._sectionHeaderText=null,i.prototype._toggle=null,i.prototype._collapsedCssClass=null,i.prototype._collapsedPointers=null,i.prototype._collapsibleState=null,i.prototype._expandedPointers=null,i.prototype._gridIds=null,i.prototype._collapsibleStateManager=null,i.prototype.get_isCollapsed=function(){return this._collapsibleState===t},i.prototype.___get_section=function(){return this._section},i.prototype._toggleClick=function(i){this._collapsibleState===e?this.collapse():this._collapsibleState===t&&this.expand()},i.prototype.applyHeaderSecondaryText=function(t){null!==this._sectionHeaderSecondaryText&&(this._sectionHeaderSecondaryText.innerText=t)},i.prototype.collapse=function(){this._collapsibleState===e&&this.___collapse()},i.prototype.expand=function(){this._collapsibleState===t&&this.___expand(!0)},i.prototype.expandWithoutScrollingAdjustment=function(){this.___expand(!1)},i.prototype.moveAfterNextSection=function(){var t=!1,e=this._section.nextElementSibling;return null!==e&&e.classList.contains("Section")&&(e.after(this._section),t=!0),t},i.prototype.moveBeforePreviousSection=function(){var t=!1,e=this._section.previousElementSibling;return null!==e&&e.classList.contains("Section")&&(e.before(this._section),t=!0),t},i.prototype.addCollapsedHandler=function(t){this._collapsedPointers.push(t)},i.prototype.addExpandedHandler=function(t){this._expandedPointers.push(t)},i.prototype.__addCollapsed=function(t){this._collapsedPointers.push(t)},i.prototype.__addExpanded=function(t){this._expandedPointers.push(t)},i.prototype.__initialize=function(){},i.prototype.__registerGrid=function(t){this._gridIds.push(t)},i.prototype.__unregisterGrid=function(t){var e=this._gridIds.indexOf(t);e>0&&this._gridIds.splice(e,1)},i.prototype.___collapse=function(){autotask.globalValidationOverlay.hide(null),null!==this._toggle&&(this._toggle.classList.remove("Collapse"),this._toggle.classList.add("Expand")),this._section.classList.add(this._collapsedCssClass),this._collapsibleState=t,this._saveCollapseState();for(var e=0;e<this._collapsedPointers.length;e++)this._collapsedPointers[e]()},i.prototype.___expand=function(t){autotask.globalValidationOverlay.hide(null),null!==this._toggle&&(this._toggle.classList.remove("Expand"),this._toggle.classList.add("Collapse")),this._section.classList.remove(this._collapsedCssClass),this._initializeGridLayouts(),t&&autotask.scrolling.__scrollUntilVisible([this._section],0,!0),this._collapsibleState=e,this._saveCollapseState();for(var i=0;i<this._expandedPointers.length;i++)this._expandedPointers[i]()},i.prototype._initializeGridLayouts=function(){for(var t=0;t<this._gridIds.length;t++)autotask.find(this._gridIds[t]).__initializeLayout()},i.prototype._registerHandlers=function(){null!==this._toggle&&this._toggle.addEventListener("click",autotask.proxy(this._toggleClick,this)),null!==this._sectionHeaderText&&this._sectionHeaderText.addEventListener("click",autotask.proxy(this._toggleClick,this))},i.prototype._saveCollapseState=function(){null!==this._collapsibleStateManager&&this._collapsibleStateManager.__saveState(this._collapsibleState===t)},i}(),window.Autotask.CollapsibleContainer=function(){"use strict";function t(t,e,i){autotask.instanceManagement.__addRegistrationKey(this,t),this._isCollapsed=i,this._container=document.getElementById(t),this._title=this._container.querySelector(":scope > .Title"),this._collapsibleStateManager=e}return t.prototype._container=null,t.prototype._title=null,t.prototype._isCollapsed=null,t.prototype._collapsibleStateManager=null,t.prototype.___get_container=function(){return this._container},t.prototype._onTitleClick=function(){this._toggleCollapsed()},t.prototype.__expand=function(){this._isCollapsed&&this._toggleCollapsed()},t.prototype.__registerHandlers=function(){null!==this._title&&this._title.addEventListener("click",autotask.proxy(this._onTitleClick,this))},t.prototype._toggleCollapsed=function(){this._isCollapsed?this._container.classList.remove("Collapsed"):(autotask.globalValidationOverlay.hide(null),this._container.classList.add("Collapsed")),this._isCollapsed=!this._isCollapsed,this._collapsibleStateManager.__saveState(this._isCollapsed)},t}(),window.Autotask.InsightShell=function(t){"use strict";function e(e,i,n){t.call(this,e,i,n)}return autotask.inherit(e,t),e.prototype.__initialize=function(){},e}(Autotask.CollapsibleContainer),Autotask.PageCore=function(){"use strict";function t(t,e,i,n,o){this._pageCode=t,this._url=new Autotask.Url(e),this._url.set_isConcatenationMode(i),this._isConcatenationMode=i,this._primaryParameterName=n,this._defaultPrimaryParameterValue=o,o&&(this._defaultParameters={},this._defaultParameters[n]=o)}return t.prototype._defaultParameters=null,t.prototype._defaultPrimaryParameterValue=null,t.prototype._isConcatenationMode=null,t.prototype._pageCode=null,t.prototype._primaryParameterName=null,t.prototype._requestData=null,t.prototype._url=null,t.prototype.__get_defaultPrimaryParameterValue=function(){return this._defaultPrimaryParameterValue},t.prototype.__get_pageCode=function(){return this._pageCode},t.prototype.applyDynamicParameters=function(t){for(var e in null===this._defaultParameters&&(this._defaultParameters={}),t)t.hasOwnProperty(e)&&null!==t[e]?this._defaultParameters[e]=t[e]:this._defaultParameters[e]=null},t.prototype.applyDynamicRequestData=function(t){for(var e in t instanceof AutotaskRequestDataSystem.RequestData||autotask.throwException("The data must be an instance of AutotaskRequestDataSystem.RequestData."),this._defaultParameters={},this._defaultParameters[this._primaryParameterName]=this._defaultPrimaryParameterValue,t.__data)t.__data.hasOwnProperty(e)&&(this._defaultParameters[e]=t.__data[e])},t.prototype.open=function(t){null===t||null!==this._primaryParameterName&&null===this._defaultPrimaryParameterValue?this.__open(t):autotask.throwException("Please do not provide a primary parameter value when the page does not have a primary parameter name, or when the page already has a primary parameter value.")},t.prototype.__open=function(t){autotask.throwException("This method should act like the JavaScript equivalent of a C# abstract method and should never be called: "+t)},t.prototype.__openInNewWindow=function(t){var e=this.___buildUrl(t);window.open(e,"_blank").focus()},t.prototype.___buildUrl=function(t){var e=this.___createParameters(t,!0);return this.___createUrlString(t,e)},t.prototype.___createParameters=function(t,e){var i={},n=null;if(null!==this._defaultParameters)for(var o in this._defaultParameters)this._defaultParameters.hasOwnProperty(o)&&(void 0===(n=this._defaultParameters[o])&&(n=null),null!==n&&e&&(n=encodeURIComponent(n)),i[o]=n);return this._isConcatenationMode||null==t||(n=t,e&&(n=encodeURIComponent(n)),i[this._primaryParameterName]=n),i},t.prototype.___createUrlString=function(t,e){var i=this._url.toString(e);return this._isConcatenationMode&&t&&(i+=this._primaryParameterName+t),i},t}(),Autotask.StopwatchNotification=function(){"use strict";function t(t,e,i,n,o,a,s,r,l,_){this.timestamp=(new Date).getTime(),this.workListItemId=t,this.syncCode=e,this.stopwatchState=i,this.runningSeconds=n,this.totalRunningSeconds=o,this.totalPausedSeconds=a,this.startTime=s,this.lastPausedTime=r,this.timerStartTimeMs=l,this.timerTimeMs=_}return t.prototype.timestamp=null,t.prototype.notificationEventManagerTimeStamp=null,t.prototype.workListItemId=null,t.prototype.syncCode=null,t.prototype.ticketId=null,t.prototype.stopwatchState=null,t.prototype.runningSeconds=null,t.prototype.totalRunningSeconds=null,t.prototype.totalPausedSeconds=null,t.prototype.startTime=null,t.prototype.lastPausedTime=null,t.prototype.timerStartTimeMs=null,t.prototype.timerTimeMs=null,t}(),Autotask.ContextOverlay=function(){"use strict";function t(t,e){this._isContentLoadedViaAjax=null!==e&&e,this._delayBeforeHiding=300,this._delayBeforeShowing=this._isContentLoadedViaAjax?300:0,this._isAutomatedHidingEnabled=!0,this._isPositioningResetOnHide=!1,this._hidingCompletePointers=[],this._hidingPointers=[],this._positioningPointers=[],this._showingPointers=[],this._showingCompletePointers=[],this._overlayContainerId=t,this._overlayContainer=document.getElementById(t);var i=AutotaskDomSystem.Document.getChildElementByClassName(this._overlayContainer,"ContextOverlay");this._overlayElementAnalyzer=new AutotaskOverlaySystem.ElementAnalyzer(i),this._overlayHtmlManager=new Autotask.ContextOverlayHtmlManager(this._overlayContainer)}return t.prototype._overlayContainer=null,t.prototype._delayBeforeHiding=null,t.prototype._delayBeforeShowing=null,t.prototype._hidingCompletePointers=null,t.prototype._hidingPointers=null,t.prototype._isContentLoadedViaAjax=null,t.prototype._isAutomatedHidingEnabled=null,t.prototype._overlayElementAnalyzer=null,t.prototype._overlayHtmlManager=null,t.prototype._overlayContainerId=null,t.prototype._pendingAssociation=null,t.prototype._positioningPointers=null,t.prototype._showingCompletePointers=null,t.prototype._showingPointers=null,t.prototype._visibleAssociation=null,t.prototype.get_delayBeforeHiding=function(){return this._delayBeforeHiding},t.prototype.set_delayBeforeHiding=function(t){this._delayBeforeHiding=t},t.prototype.get_delayBeforeShowing=function(){return this._delayBeforeShowing},t.prototype.set_delayBeforeShowing=function(t){this._delayBeforeShowing=t},t.prototype.get_isPositioningResetOnHide=function(){return this._isPositioningResetOnHide},t.prototype.set_isPositioningResetOnHide=function(t){this._isPositioningResetOnHide=t},t.prototype.get_overlayContainer=function(){return this._overlayContainer},t.prototype.__get_launchingElement=function(){return this._visibleAssociation?this._visibleAssociation.get_launchingElement():null},t.prototype.__set_isAutomatedHidingEnabled=function(t){this._isAutomatedHidingEnabled=t},t.prototype._defaultHiding=function(t){return this._visibleAssociation.hide(this.get_isPositioningResetOnHide(),this._isContentLoadedViaAjax),this._visibleAssociation.__dispose(),this._visibleAssociation=null,autotask.contextOverlayManagement.__unregisterVisibleContextOverlay(this),this._onHideComplete(),!0},t.prototype._defaultPositioning=function(t){return this._visibleAssociation.position(t),!0},t.prototype._defaultShowing=function(t){null!==this._visibleAssociation&&this._visibleAssociation.__dispose(),this._visibleAssociation=this._pendingAssociation,this._pendingAssociation=null;var e=this,i=null;return this._isAutomatedHidingEnabled&&(i=function(){e.hide()}),this._visibleAssociation.show((function(){e.show(e._visibleAssociation.get_launchingElement())}),i,this._isContentLoadedViaAjax,t.get_cssClass()),autotask.contextOverlayManagement.__registerVisibleContextOverlay(this,t.get_allowedConcurrentlyVisibleOverlays()),!0},t.prototype.hide=function(){this._hideAfterDelay(this.get_delayBeforeHiding())},t.prototype.hideWithoutDelay=function(){this.__hideWithoutDelay()},t.prototype.isElementAssociated=function(t){var e=this._overlayElementAnalyzer.isSameElement(t)||this._overlayElementAnalyzer.isDescendant(t),i=this.__get_launchingElement();if(!e&&null!==i){var n=new AutotaskOverlaySystem.ElementAnalyzer(i);e=n.isSameElement(t)||n.isDescendant(t)}return e},t.prototype.show=function(t){this._showAfterDelay(t,this.get_delayBeforeShowing())},t.prototype.showWithoutDelay=function(t){this._showAfterDelay(t,0)},t.prototype.__addHiding=function(t){this._hidingPointers.push(t)},t.prototype.__addHidingComplete=function(t){this._hidingCompletePointers.push(t)},t.prototype.__addPositioning=function(t){this._positioningPointers.push(t)},t.prototype.__addShowing=function(t){this._showingPointers.push(t)},t.prototype.__addShowingComplete=function(t){this._showingCompletePointers.push(t)},t.prototype.__clearHiding=function(){this._hidingPointers.length=0},t.prototype.__clearHidingComplete=function(){this._hidingCompletePointers.length=0},t.prototype.__clearPositioning=function(){this._positioningPointers.length=0},t.prototype.__clearShowing=function(){this._showingPointers.length=0},t.prototype.__hideWithoutDelay=function(){this._hideAfterDelay(0)},t.prototype.__loadContent=function(t,e,i){var n=i.get_launchingElement();null!==this._visibleAssociation&&this._visibleAssociation.isEqualToLaunchingElement(n)&&(this._visibleAssociation.loadContent(t,e),this._onPositioning())},t.prototype.__loadHtmlAndJavaScript=function(t,e){this.__loadContent(t.htmlForInstanceTrackerContainer,t.script,e)},t.prototype.__reposition=function(){this._onPositioning()},t.prototype._hideAfterDelay=function(t){if(null!==this._pendingAssociation)this._pendingAssociation.stopShowingTimer(),this._pendingAssociation.__dispose(),this._pendingAssociation=null;else if(null!==this._visibleAssociation){this._visibleAssociation.stopHidingTimer();var e=autotask.proxy(this._onHide,this);this._visibleAssociation.startHidingTimer(e,t)}},t.prototype._onHideComplete=function(){autotask.eventManagement.__executeHandlers(null,this._hidingCompletePointers,null)},t.prototype._onHide=function(){var t=new Autotask.ContextOverlayHidingEventArgs(this._visibleAssociation.get_launchingElement());autotask.eventManagement.__executeHandlers(t,this._hidingPointers,autotask.proxy(this._defaultHiding,this))},t.prototype._onPositioning=function(){var t=this._visibleAssociation.get_launchingElement(),e=new Autotask.ContextOverlayPositioningEventArgs(t,this._visibleAssociation.get_overlay());autotask.eventManagement.__executeHandlers(e,this._positioningPointers,autotask.proxy(this._defaultPositioning,this))},t.prototype._onShow=function(){var t=new Autotask.ContextOverlayShowingEventArgs(this._pendingAssociation.get_launchingElement());autotask.eventManagement.__executeHandlers(t,this._showingPointers,autotask.proxy(this._defaultShowing,this))&&(this._onPositioning(),autotask.eventManagement.__executeHandlers(null,this._showingCompletePointers,null))},t.prototype._showAfterDelay=function(t,e){var i=!1,n=new Autotask.ContextOverlayAssociation(t,this._overlayContainerId);if(n.set_overlayHtml(this._overlayHtmlManager.getAvailableOverlayHtml()),null!==this._visibleAssociation?n.isEqual(this._visibleAssociation)?this._visibleAssociation.stopHidingTimer():i=!0:(null!==this._pendingAssociation&&(this._pendingAssociation.stopShowingTimer(),this._pendingAssociation.__dispose(),this._pendingAssociation=null),i=!0),i){var o=autotask.proxy(this._onShow,this);n.startShowingTimer(o,e),null!==this._pendingAssociation&&this._pendingAssociation.__dispose(),this._pendingAssociation=n}},t}(),window.Autotask.GridPage=function(){"use strict";function t(t,e,i,n,o,a){autotask.instanceManagement.__addRegistrationKey(this,t),autotask.registerPage(this),this._gridId=e,null!==i&&(this._fieldContainer=document.getElementById(i)),this._imageViewerId=n,this._isAuthenticated=o,this._immutableData=[],this._submittingPointers=[];var s=new window.AutotaskDirtyStateSystem.DirtyStateManagement;this.dirtyState=new window.AutotaskDirtyStateSystem.PageFacade(s),this.__dirtyState=new window.AutotaskDirtyStateSystem.InternalPageFacade(s);var r=new window.AutotaskButtonEventsSystem.ButtonEventsManagement;this.__buttonEvents=new window.AutotaskButtonEventsSystem.InternalPageFacade(r),this._sessionExpirationManagement=new AutotaskSessionExpirationSystem.SessionExpirationManagement(t,!1,a),this.__sessionExpiration=new AutotaskSessionExpirationSystem.InternalPageFacade(this._sessionExpirationManagement)}return t.prototype.dirtyState=null,t.prototype.__buttonEvents=null,t.prototype.__dirtyState=null,t.prototype.__sessionExpiration=null,t.prototype._fieldContainer=null,t.prototype._fieldValidation=null,t.prototype._grid=null,t.prototype._gridId=null,t.prototype._imageViewer=null,t.prototype._imageViewerId=null,t.prototype._immutableData=null,t.prototype._isAuthenticated=null,t.prototype._notificationSlideOut=null,t.prototype._submittingPointers=null,t.prototype._sessionExpirationManagement=null,t.prototype._validationSummary=null,t.prototype.get_customValidationSummary=function(){return this._validationSummary.__get_customValidationSummary()},t.prototype.__get_imageViewer=function(){return this._imageViewer},t.prototype.__get_validationSummary=function(){return this._validationSummary},t.prototype.addSubmitting=function(t){this._submittingPointers.push(t)},t.prototype.ajaxSubmit=function(t,e){var i=new AutotaskAjaxSystem.SubmittingEventArgs;this._submitting(i);var n=i.requestData;if(null!==this._notificationSlideOut){var o=this._notificationSlideOut.get_panel();n.addFieldData(o.__get_postingModelParameterName(),o.__createSerializedRequestData())}var a=new Autotask.SubmitRoute(t),s=this.get_customValidationSummary();a.makeRequest(n,(function(t){s.clearMessages();for(var i=0;i<t.customValidationMessages.length;i++)s.addMessage(i.toString(),t.customValidationMessages[i]);var n={};n.validationFailure=t.customValidationMessages.length>0,n.responseData=t.responseData,e(n)}))},t.prototype.deprecatedAjaxSubmit=function(t,e){var i=new Autotask.PageSubmittingEventArgs;this._submitting(i);var n=i.__get_data();if(null!==this._notificationSlideOut){var o=this._notificationSlideOut.get_panel();n[o.__get_postingModelParameterName()]=o.__createSerializedRequestData()}var a=this.get_customValidationSummary();autotask.ajax.__restrictedPostRequest(t,n,e).__deprecatedSubmit(a)},t.prototype.generateFieldData=function(){var t=[];null!==this._fieldContainer&&t.push(this._fieldContainer);for(var e=new AutotaskRequestDataSystem.SerializedRequestData(t),i=0;i<this._immutableData.length;i++)e.__addImmutableData(this._immutableData[i]);return e},t.prototype._onWindowResize=function(){this._grid.__refreshLayout()},t.prototype.__addImmutableData=function(t){this._immutableData.push(t)},t.prototype.__resetValidation=function(){null!==this._fieldValidation&&this._fieldValidation.__reset(),this.__get_validationSummary().__get_isActive()&&this._validate(!0)},t.prototype.__setNotificationSlideOut=function(t){this._notificationSlideOut=t},t.prototype.__finalize=function(){null!==this._fieldValidation&&this._fieldValidation.__parse()},t.prototype.__initialize=function(){this._grid=autotask.find(this._gridId),this._imageViewer=autotask.find(this._imageViewerId),this._isAuthenticated&&!autotask.windowManagement.isWindowInWorkspace()&&this._sessionExpirationManagement.__initialize();var t=document.body.firstElementChild.firstElementChild.firstElementChild.nextElementSibling;this._validationSummary=autotask.find(t.id),this._validationSummary.__addValidationFailed(autotask.proxy(this._validationFailedHandler,this)),null!==this._fieldContainer&&(this._fieldValidation=new Autotask.PostedContainerValidation(this._fieldContainer),this._fieldValidation.__registerValidationSummary(this._validationSummary))},t.prototype.__registerHandlers=function(){window.addEventListener("resize",autotask.proxy(this._onWindowResize,this))},t.prototype._submitting=function(t){for(var e=0;e<this._submittingPointers.length;e++)this._submittingPointers[e](t)},t.prototype._validate=function(t){var e=!0;return null!==this._fieldValidation&&((e=this._fieldValidation.__validate())||this._fieldValidation.__validationFailed(),this._fieldValidation.__validationCompleted(e,t)),e},t.prototype._validationFailedHandler=function(){null!==this._notificationSlideOut&&this._notificationSlideOut.hide()},t}(),window.Autotask.EntityPage=function(){"use strict";function t(t,e,i){autotask.instanceManagement.__addRegistrationKey(this,t),autotask.registerPage(this),this._isAuthenticated=e,this._headingElement=document.querySelector(".PageHeadingContainer"),this._mainContainerElement=document.querySelector(".MainContainer"),this._quickLaunchBarElement=document.querySelector(".QuickLaunchBar"),this._leftSecondaryContainerElement=this._mainContainerElement.querySelector(".SecondaryContainer.Left"),this._rightSecondaryContainerElement=this._mainContainerElement.querySelector(".SecondaryContainer.Right"),this._headingHeight=this._headingElement.clientHeight,this._keyUpPointers=[],this._isLeftSecondaryContainerActive=!0;var n=new window.AutotaskDirtyStateSystem.DirtyStateManagement;this.dirtyState=new window.AutotaskDirtyStateSystem.PageFacade(n),this.__dirtyState=new window.AutotaskDirtyStateSystem.InternalPageFacade(n);var o=new window.AutotaskButtonEventsSystem.ButtonEventsManagement;this.__buttonEvents=new window.AutotaskButtonEventsSystem.InternalPageFacade(o),this._sessionExpirationManagement=new AutotaskSessionExpirationSystem.SessionExpirationManagement(t,!1,i),this.__sessionExpiration=new AutotaskSessionExpirationSystem.InternalPageFacade(this._sessionExpirationManagement)}return t.prototype.dirtyState=null,t.prototype.__buttonEvents=null,t.prototype.__dirtyState=null,t.prototype.__sessionExpiration=null,t.prototype._headingElement=null,t.prototype._headingHeight=null,t.prototype._isAuthenticated=null,t.prototype._isLeftSecondaryContainerActive=null,t.prototype._keyUpPointers=null,t.prototype._leftSecondaryContainerElement=null,t.prototype._mainContainerElement=null,t.prototype._quickLaunchBarElement=null,t.prototype._rightSecondaryContainerElement=null,t.prototype._saveCoordinator=null,t.prototype._sessionExpirationManagement=null,t.prototype._validationSummary=null,t.prototype.get_customValidationSummary=function(){return this._validationSummary.__get_customValidationSummary()},t.prototype.get_observerRootTopMargin=function(){return this._headingHeight},t.prototype.get_saveCoordinator=function(){return null===this._saveCoordinator&&(this._saveCoordinator=this.___createSaveCoordinator()),this._saveCoordinator},t.prototype.__get_mainContainerElement=function(){return this._mainContainerElement},t.prototype.__get_headingHeight=function(){return this._headingHeight},t.prototype.___get_validationSummary=function(){return this._validationSummary},t.prototype._onValidationFailed=function(t){this._isLeftSecondaryContainerActive||this.__toggleSecondaryContainer();for(var e=0;e<t.elementIds.length;e++)this._expandDetailsSection(t.elementIds[e])},t.prototype._onValidationSpotlighting=function(t){this._expandDetailsSection(t.editorId)},t.prototype._onValidationSummaryContentChanged=function(){this._adjustHeadingLayout()},t.prototype._onValidationSumaryVisibilityChanged=function(){this._adjustHeadingLayout()},t.prototype._onWindowKeyUp=function(t){for(var e=0;e<this._keyUpPointers.length;e++)this._keyUpPointers[e](t)},t.prototype._onWindowResize=function(){this._adjustHeadingLayout()},t.prototype._onScroll=function(){autotask.contextOverlayManagement.__hideVisibleContextOverlays()},t.prototype.__addKeyUp=function(t){this._keyUpPointers.push(t)},t.prototype.__initialize=function(){this._isAuthenticated&&!autotask.windowManagement.isWindowInWorkspace()&&this._sessionExpirationManagement.__initialize(),this._validationSummary=autotask.validationSummaryManagement.__findValidationSummary(this._mainContainerElement)},t.prototype.__registerHandlers=function(){window.addEventListener("keyup",autotask.proxy(this._onWindowKeyUp,this)),window.addEventListener("resize",autotask.proxy(this._onWindowResize,this)),window.addEventListener("scroll",autotask.proxy(this._onScroll,this)),this._validationSummary.__addContentChanged(autotask.proxy(this._onValidationSummaryContentChanged,this)),this._validationSummary.__addValidationFailed(autotask.proxy(this._onValidationFailed,this)),this._validationSummary.__addValidationSpotlighting(autotask.proxy(this._onValidationSpotlighting,this)),this._validationSummary.__addVisibilityChanged(autotask.proxy(this._onValidationSumaryVisibilityChanged,this))},t.prototype.__toggleForcedCompactMode=function(t,e){this._mainContainerElement.classList.contains("Compact")?this._mainContainerElement.classList.remove("Compact"):this._mainContainerElement.classList.add("Compact");var i={};i[e]=this._mainContainerElement.classList.contains("Compact"),autotask.ajax.__restrictedPostRequest(t,i,null).__deprecatedJson(!1)},t.prototype.__toggleSecondaryContainer=function(){var t="Active";this._isLeftSecondaryContainerActive?(this._leftSecondaryContainerElement.classList.remove(t),this._rightSecondaryContainerElement.classList.add(t),this._isLeftSecondaryContainerActive=!1):(this._isLeftSecondaryContainerActive=!0,this._rightSecondaryContainerElement.classList.remove(t),this._leftSecondaryContainerElement.classList.add(t))},t.prototype.___createSaveCoordinator=function(){autotask.throwException("This method should act like the JavaScript equivalent of a C# abstract method and should never be called.")},t.prototype._adjustHeadingLayout=function(){var t=this._headingElement.clientHeight;this._headingHeight!==t&&(this._headingHeight=t,document.body.style.paddingTop=t+"px",this._quickLaunchBarElement.style.top=t+"px")},t.prototype._expandDetailsSection=function(t){for(var e=document.querySelector(t);null!==e&&!e.classList.contains("DetailsSection")&&!e.classList.contains("Collapsed");)e=e.parentNode;null!==e&&autotask.find(e.getAttribute("id")).__expand()},t}(),window.Autotask.Page=function(){"use strict";function t(t,e,i,n){autotask.instanceManagement.__addRegistrationKey(this,t),autotask.registerPage(this),this._fieldContainer=document.getElementById(e),this._isAuthenticated=i,document.body.firstElementChild.children[1].addEventListener("scroll",autotask.proxy(this._scrollListener,this)),this._immutableData=[],this._submittingPointers=[];var o=new window.AutotaskDirtyStateSystem.DirtyStateManagement;this.dirtyState=new window.AutotaskDirtyStateSystem.PageFacade(o),this.__dirtyState=new window.AutotaskDirtyStateSystem.InternalPageFacade(o);var a=new window.AutotaskButtonEventsSystem.ButtonEventsManagement;this.__buttonEvents=new window.AutotaskButtonEventsSystem.InternalPageFacade(a),this._sessionExpirationManagement=new AutotaskSessionExpirationSystem.SessionExpirationManagement(t,!1,n),this.__sessionExpiration=new AutotaskSessionExpirationSystem.InternalPageFacade(this._sessionExpirationManagement)}return t.prototype.dirtyState=null,t.prototype.__buttonEvents=null,t.prototype.__dirtyState=null,t.prototype.__sessionExpiration=null,t.prototype._fieldContainer=null,t.prototype._fieldValidation=null,t.prototype._immutableData=null,t.prototype._isAuthenticated=null,t.prototype._notificationSlideOut=null,t.prototype._sessionExpirationManagement=null,t.prototype._submittingPointers=null,t.prototype._validationSummary=null,t.prototype.get_customValidationSummary=function(){return this._validationSummary.__get_customValidationSummary()},t.prototype.addSubmitting=function(t){this._submittingPointers.push(t)},t.prototype.ajaxSubmit=function(t,e){if(this.validate()){var i=new AutotaskAjaxSystem.SubmittingEventArgs;this._submitting(i);var n=i.requestData;if(null!==this._notificationSlideOut){var o=this._notificationSlideOut.get_panel();n.addFieldData(o.__get_postingModelParameterName(),o.__createSerializedRequestData())}var a=new Autotask.SubmitRoute(t),s=this.get_customValidationSummary();a.makeRequest(n,(function(t){s.clearMessages();for(var i=0;i<t.customValidationMessages.length;i++)s.addMessage(i.toString(),t.customValidationMessages[i]);var n={};n.validationFailure=t.customValidationMessages.length>0,n.responseData=t.responseData,e(n)}))}},t.prototype.deprecatedAjaxSubmit=function(t,e){if(this.validate()){var i=new Autotask.PageSubmittingEventArgs;this._submitting(i);var n=i.__get_data();if(null!==this._notificationSlideOut){var o=this._notificationSlideOut.get_panel();n[o.__get_postingModelParameterName()]=o.__createSerializedRequestData()}var a=this.get_customValidationSummary();autotask.ajax.__restrictedPostRequest(t,n,e).__deprecatedSubmit(a)}},t.prototype.generateFieldData=function(){for(var t=[this._fieldContainer],e=new AutotaskRequestDataSystem.SerializedRequestData(t),i=0;i<this._immutableData.length;i++)e.__addImmutableData(this._immutableData[i]);return e},t.prototype.validate=function(){return this._validate(!1)},t.prototype.validateEditor=function(t){return"function"==typeof t.validate?t.validate():this._fieldValidation.__validateLegacyEditor(t.__get_id(),!1)},t.prototype.__addImmutableData=function(t){this._immutableData.push(t)},t.prototype.__setNotificationSlideOut=function(t){this._notificationSlideOut=t},t.prototype.__finalize=function(){this._fieldValidation.__parse()},t.prototype.__initialize=function(){this._isAuthenticated&&!autotask.windowManagement.isWindowInWorkspace()&&this._sessionExpirationManagement.__initialize(),this._validationSummary=autotask.validationSummaryManagement.__findValidationSummary(this._fieldContainer),this._validationSummary.__addValidationFailed(autotask.proxy(this._validationFailedHandler,this)),this._fieldValidation=new Autotask.PostedContainerValidation(this._fieldContainer),this._fieldValidation.__registerValidationSummary(this._validationSummary)},t.prototype.__resetValidation=function(){this._fieldValidation.__reset(),this._validationSummary.__get_isActive()&&this._validate(!0)},t.prototype._scrollListener=function(){autotask.contextOverlayManagement.__hideVisibleContextOverlays()},t.prototype._submitting=function(t){for(var e=0;e<this._submittingPointers.length;e++)this._submittingPointers[e](t)},t.prototype._validate=function(t){var e=this._fieldValidation.__validate();return e||this._fieldValidation.__validationFailed(),this._fieldValidation.__validationCompleted(e,t),e},t.prototype._validationFailedHandler=function(){null!==this._notificationSlideOut&&this._notificationSlideOut.hide()},t}(),window.Autotask.StandardTab=function(){"use strict";function t(t){autotask.instanceManagement.__addRegistrationKey(this,t),this._tabContainerElement=document.getElementById(t),this._fieldValidationErrorClass="field-validation-error",this._gridIds=[]}return t.prototype._fieldValidationErrorClass=null,t.prototype._gridIds=null,t.prototype._tabContainerElement=null,t.prototype.__activateScrolling=function(){this._initializeGridLayouts()},t.prototype.__hasFieldValidationErrors=function(){return this._tabContainerElement.getElementsByClassName(this._fieldValidationErrorClass).length>0},t.prototype.__registerGrid=function(t){this._gridIds.push(t)},t.prototype.__setSelected=function(t){var e="Active";t?this._tabContainerElement.classList.add(e):this._tabContainerElement.classList.remove(e)},t.prototype.__unregisterGrid=function(t){var e=this._gridIds.indexOf(t);e>0&&this._gridIds.splice(e,1)},t.prototype.__windowResized=function(){this.___adjustHeadingLayout()},t.prototype.___adjustHeadingLayout=function(){autotask.throwException('The "___adjustHeadingLayout" method acts like an abstract protected method and must be overridden.')},t.prototype._initializeGridLayouts=function(){for(var t=0;t<this._gridIds.length;t++)autotask.find(this._gridIds[t]).__initializeLayout()},t}(),window.Autotask.GridTab=function(t){"use strict";function e(e,i,n){t.call(this,e),this._gridId=i,null!==n&&(this._fieldContainer=document.getElementById(n)),this._immutableData=[]}return autotask.inherit(e,t),e.prototype._fieldContainer=null,e.prototype._grid=null,e.prototype._gridId=null,e.prototype._immutableData=null,e.prototype.generateFieldData=function(){var t=[];null!==this._fieldContainer&&t.push(this._fieldContainer);for(var e=new AutotaskRequestDataSystem.SerializedRequestData(t),i=0;i<this._immutableData.length;i++)e.__addImmutableData(this._immutableData[i]);return e},e.prototype.__addImmutableData=function(t){this._immutableData.push(t)},e.prototype.__initialize=function(){this._grid=autotask.find(this._gridId)},e.prototype.___adjustHeadingLayout=function(){this._grid.__refreshLayout()},e}(Autotask.StandardTab),Autotask.DragEventsManagement=function(){"use strict";var t="None",e="Mouse",i="Touch";function n(t){this._container=t,this._eventType=!1;var e=this;this._documentTouchEndHandler=function(){e.__onStopDragging()},this._documentMouseUpHandler=function(){e.__onStopDragging()}}return n.prototype._container=null,n.prototype._dragInProgressCssClass=null,n.prototype._eventType=null,n.prototype._documentTouchEndHandler=null,n.prototype._documentMouseUpHandler=null,n.prototype.__get_container=function(){return this._container},n.prototype.__onStopDragging=function(t){this.___stopDrag()},n.prototype._onMouseDown=function(t){this._eventType!=i&&(this._eventType=e,this.__onStartDragging&&this.__onStartDragging(t))},n.prototype._onMouseMove=function(t){this._eventType==e&&this.__onMouseMove&&this.__onMouseMove(t)},n.prototype._onMouseUp=function(e){this._eventType=t},n.prototype._onContainerMouseEnter=function(t){this._eventType==e&&this.__onContainerMouseEnter&&this.__onContainerMouseEnter(t)},n.prototype._onContainerMouseLeave=function(t){this._eventType==e&&this.__onContainerMouseLeave&&this.__onContainerMouseLeave(t)},n.prototype._onContainerTouchEnterLeave=function(t){this._eventType=i,this.__onContainerTouchEnterLeave&&this.__onContainerTouchEnterLeave(t)},n.prototype._onTouchStart=function(t){this._eventType=i,this.__onStartDragging&&this.__onStartDragging(t)},n.prototype._onTouchMove=function(t){this._eventType=i,this.__onTouchMove&&this.__onTouchMove(t)},n.prototype._onTouchEnd=function(e){this._eventType=t,this.__onStopDragging&&this.__onStopDragging(e)},n.prototype.__registerHandlers=function(t,e,i,n){n?(document.addEventListener("mousemove",autotask.proxy(this._onMouseMove,this)),document.addEventListener("touchmove",autotask.proxy(this._onTouchMove,this))):(this._container.addEventListener("mousemove",autotask.proxy(this._onMouseMove,this)),this._container.addEventListener("touchmove",autotask.proxy(this._onTouchMove,this)));for(var o=this._container.querySelectorAll(t),a=0;a<o.length;a++)o[a].addEventListener("mousedown",autotask.proxy(this._onMouseDown,this)),o[a].addEventListener("mouseup",autotask.proxy(this._onMouseUp,this)),o[a].addEventListener("touchstart",autotask.proxy(this._onTouchStart,this)),o[a].addEventListener("touchend",autotask.proxy(this._onTouchEnd,this));null!==e&&(e.addEventListener("mouseleave",autotask.proxy(this._onContainerMouseLeave,this)),e.addEventListener("mouseenter",autotask.proxy(this._onContainerMouseEnter,this))),null!==i&&i.addEventListener("touchmove",autotask.proxy(this._onContainerTouchEnterLeave,this))},n.prototype.___startDrag=function(t){t&&this.__reset&&this.__reset(),this._registerGlobalMouseUp()},n.prototype.___stopDrag=function(){this._unregisterGlobalMouseUp(),this.__reset&&this.__reset()},n.prototype._registerGlobalMouseUp=function(){document.addEventListener("touchend",this._documentTouchEndHandler),document.addEventListener("mouseup",this._documentMouseUpHandler)},n.prototype._unregisterGlobalMouseUp=function(){document.removeEventListener("touchend",this._documentTouchEndHandler),document.removeEventListener("mouseup",this._documentMouseUpHandler)},n}(),Autotask.ContainerValidation=function(){"use strict";function t(t){this._container=t,this._failedParticipantIds=[],this._fieldValidationErrorClass="field-validation-error",this._legacyParticipantData={},this._legacyParticipantIdsRegisteredWithEvents=[],this._participantIdsRegisteredForValidation=[]}return t.prototype._container=null,t.prototype._failedParticipantIds=null,t.prototype._fieldValidationErrorClass=null,t.prototype._legacyParticipantData=null,t.prototype._legacyParticipantIdsRegisteredWithEvents=null,t.prototype._participantIdsRegisteredForValidation=null,t.prototype._validationSummary=null,t.prototype.__dispose=function(){autotask.globalValidationOverlay.hide(null),null!==this._validationSummary&&this._validationSummary.__removeErrors(this._failedParticipantIds),this._failedParticipantIds=[],this._legacyParticipantIdsRegisteredWithEvents=[],this._legacyParticipantData=null,this._participantIdsRegisteredForValidation=[],this._validationSummary=null},t.prototype.__parse=function(){this._legacyParticipantData={},this._legacyParticipantIdsRegisteredWithEvents=[],this._participantIdsRegisteredForValidation=[];for(var t=this.___findValidationElements(this._container),e=0;e<t.length;e++)this._registerParticipant(t[e])},t.prototype.__registerValidationSummary=function(t){this._validationSummary=t},t.prototype.__reset=function(){autotask.globalValidationOverlay.hide(null),this.__parse(),null!==this._validationSummary&&this._validationSummary.__removeErrors(this._failedParticipantIds)},t.prototype.__validate=function(){for(var t=[],e=0;e<this._participantIdsRegisteredForValidation.length;e++)this._validateParticipant(this._participantIdsRegisteredForValidation[e],!1)||t.push(this._participantIdsRegisteredForValidation[e]);return t.length>0&&(this._failedParticipantIds=t),0===t.length},t.prototype.__validateLegacyEditor=function(t,e){var i=!0;return-1!==this._participantIdsRegisteredForValidation.indexOf(t)&&(i=this._validateParticipant(t,e)),i},t.prototype.__validationCompleted=function(t,e){null!==this._validationSummary&&this._validationSummary.__validationCompleted(t,e)},t.prototype.__validationFailed=function(){null!==this._validationSummary&&this._validationSummary.__validationFailed(this._failedParticipantIds)},t.prototype.___findValidationElements=function(t){var e=[];if(null!==t)for(var i=t.querySelectorAll("[data-systems]"),n=0;n<i.length;n++)this._isValidationSystemParticipant(i[n].dataset.systems)&&e.push(i[n]);return e},t.prototype._getParticipantData=function(t){var e=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,i={};for(var n in t.dataset)"true"===t.dataset[n]?i[n]=!0:"false"===t.dataset[n]?i[n]=!1:"null"===t.dataset[n]?i[n]=null:t.dataset[n]===+t.dataset[n]+""?i[n]=+t.dataset[n]:e.test(t.dataset[n])?i[n]=JSON.parse(t.dataset[n]):i[n]=t.dataset[n];return i},t.prototype._getParticipantValue=function(t){var e=null;return"function"==typeof t.__get_rawValue&&(e=t.__get_rawValue()),e},t.prototype._htmlDecode=function(t){var e=document.createElement("textarea");return e.innerHTML=t,e.value},t.prototype._initializeParticipantForValidation=function(t,e){for(var i in e)if(e.hasOwnProperty(i)&&null!==e[i]&&"valRequiredconditionally"===i)autotask.validation.__get_requiredConditionally().initializeForValidation(this,t,e.valRequiredconditionallyOther,e.valRequiredconditionallyComparison,e.valRequiredconditionallyValue)},t.prototype._isValidationSystemParticipant=function(t){return"1"===t[6]},t.prototype._participantValidationCorrected=function(t){this._trackValidatedParticipant(t.participantId,!0),null!==this._validationSummary?this._validationSummary.__editorCorrected(t.participantId):autotask.globalValidationOverlay.hide(t.participantId)},t.prototype._participantValidationFailed=function(t){this._trackValidatedParticipant(t.participantId,!1),null!==this._validationSummary&&this._validationSummary.__editorFailed(t.participantId,t.element,t.positionRequirement,t.overlayMessage,t.message,t.isTriggeredByUserInteraction)},t.prototype._registerParticipant=function(t){if(-1===this._participantIdsRegisteredForValidation.indexOf(t.dataset.alphaId)){this._participantIdsRegisteredForValidation.push(t.dataset.alphaId);var e=autotask.find(t.dataset.alphaId);if(void 0!==e.participantValidation)e.resetValidation(),e.participantValidation.addValidationCorrectedHandler(autotask.proxy(this._participantValidationCorrected,this)),e.participantValidation.addValidationFailedHandler(autotask.proxy(this._participantValidationFailed,this));else{(t=t).hasAttribute("data-val-editor-id")||(t=t.querySelector("[data-val-editor-id]"));var i=this._getParticipantData(t);i.element=t;var n=i.valEditorId;this._initializeParticipantForValidation(n,i),this._registerParticipantChange(n),this._legacyParticipantData[n]=i}}},t.prototype._registerParticipantChange=function(t){var e=autotask.find(t),i=this;e.__addRawValueChange((function(){return i.__validateLegacyEditor(t,!0)}))},t.prototype._registerParticipantEvents=function(t){if(this._legacyParticipantIdsRegisteredWithEvents.indexOf(t)<0){var e=autotask.find(t),i=this;if(e.__addFocus((function(){i.__validateLegacyEditor(t,!0)})),"function"==typeof e.__addKeyUp){e.__addKeyUp((function(){return i.__validateLegacyEditor(t,!0)}))}this._legacyParticipantIdsRegisteredWithEvents.push(t)}},t.prototype._styleInvalidLegacyParticipant=function(t){t.classList.add(this._fieldValidationErrorClass),autotask.editorLayoutManagement.__findEditorContainer(t).classList.add(this._fieldValidationErrorClass);var e=autotask.editorLayoutManagement.__findLabelContainer(t);null!==e&&e.classList.add(this._fieldValidationErrorClass)},t.prototype._styleValidLegacyParticipant=function(t){t.classList.remove(this._fieldValidationErrorClass),autotask.editorLayoutManagement.__findEditorContainer(t).classList.remove(this._fieldValidationErrorClass);var e=autotask.editorLayoutManagement.__findLabelContainer(t);null!==e&&e.classList.remove(this._fieldValidationErrorClass)},t.prototype._trackValidatedParticipant=function(t,e){for(var i=null,n=0;n<this._failedParticipantIds.length;n++)if(t===this._failedParticipantIds[n]){i=n;break}null!==i&&e?this._failedParticipantIds.splice(i,1):null!==i||e||this._failedParticipantIds.push(t)},t.prototype._validateAttribute=function(t,e,i){var n=autotask.find(t),o=this._getParticipantValue(n),a=!0;switch(e){case"valItemvaluecount":a=autotask.validation.__get_itemValueCount().validate(o,i.valItemvaluecountMax);break;case"valItemvaluerequired":a=autotask.validation.__get_itemValueRequired().validate(o);break;case"valLength":a=autotask.validation.__get_length().validate(o,i.valLengthMax);break;case"valDualmultipleselectcount":case"valItemvaluelistcount":a=autotask.validation.__get_multipleSelectionCount().validate(o,i.valMultipleselectioncountMax);break;case"valRegex":a=autotask.validation.__get_regularExpression().validate(o,i.valRegexPattern);break;case"valRequired":a=autotask.validation.__get_required().validate(o);break;case"valRequiredconditionally":a=autotask.validation.__get_requiredConditionally().validate(o,i.valRequiredconditionallyOther,i.valRequiredconditionallyComparison,i.valRequiredconditionallyValue)}return a},t.prototype._validateParticipant=function(t,e){var i=!0,n=autotask.find(t);if("function"==typeof n.validate)i=n.validate();else{var o=this._legacyParticipantData[t],a=null,s=null;if(n.get_enabled())for(var r in o)if(o.hasOwnProperty(r)&&null!==o[r]&&!this._validateAttribute(t,r,o)){this._registerParticipantEvents(t),i=!1,a=this._htmlDecode(o[r]);var l=r+"Detail";void 0!==o[l]&&(s=this._htmlDecode(o[l]));break}var _=o.element,u=o.valPosition;if(i)null!==this._validationSummary?this._validationSummary.__editorCorrected(t):autotask.globalValidationOverlay.hide(t),this._styleValidLegacyParticipant(_);else{if(null!==this._validationSummary)this._validationSummary.__editorFailed(t,_,u,a,s,e);else if(e){var c=1===u,d=n.__get_allowedConcurrentlyVisibleOverlays();autotask.globalValidationOverlay.show(_,t,a,c,null,d)}this._styleInvalidLegacyParticipant(_)}}return this._trackValidatedParticipant(t,i),i},t}(),Autotask.Validator=function(){"use strict";function t(){}return t.prototype.___isNullOrEmpty=function(t){return null===t||""===t||0===t.length||0===t.toString().trim().length},t}(),Autotask.VariableInsertionManagerCore=function(){"use strict";function t(){}return t.prototype.__lockKeyDownEvents=function(t){autotask.throwException("This method should act like the JavaScript equivalent of a C# abstract method and should never be called.")},t.prototype.__insert=function(t){autotask.throwException("This method should act like the JavaScript equivalent of a C# abstract method and should never be called.")},t}(),window.Autotask.RefreshAccessoryTabRoute=function(){"use strict";function t(t){this._requestCoordinator=new Autotask.AjaxRequestCoordinator("GET",t)}return t.prototype._requestCoordinator=null,t.prototype._onResponseProcessing=function(t,e,i,n,o){var a=new Autotask.AjaxResponseHtmlAndJavaScript(t.htmlJavaScriptPair),s=i.__createLoadContentDelegate(a.htmlForInstanceTrackerContainer,a.script);n.executeTransition([s]);var r={accessoryTabButtonText:t.accessoryTabButtonText,accessoryTabButtonId:o};null!=e&&e(r)},t.prototype.__refreshAccessoryTab=function(t,e,i,n,o){var a=new Autotask.AjaxRequestData(t,!1).__serialize(),s=this;this._requestCoordinator.__sendRequest(a,(function(t){s._onResponseProcessing(t,e,i,n,o)}),null,!1,"RefreshAccessoryTab");return new Autotask.AjaxRequestCanceler((function(){s._requestCoordinator.__cancelRequest()}))},t}(),window.Autotask.AccessoryTab=function(){"use strict";function t(t){autotask.instanceManagement.__addRegistrationKey(this,t),this._fieldContainer=document.getElementById(t),this._immutableData=[],this._submittingPointers=[]}return t.prototype._fieldContainer=null,t.prototype._immutableData=null,t.prototype._submittingPointers=null,t.prototype._validationSummary=null,t.prototype.addSubmitting=function(t){this._submittingPointers.push(t)},t.prototype.ajaxSubmit=function(t,e){if(this.validate()){var i=new AutotaskAjaxSystem.SubmittingEventArgs;this._submitting(i);var n=i.requestData,o=new Autotask.SubmitRoute(t),a=this._validationSummary.__get_customValidationSummary();o.makeRequest(n,(function(t){a.clearMessages();for(var i=0;i<t.customValidationMessages.length;i++)a.addMessage(i.toString(),t.customValidationMessages[i]);var n={};n.validationFailure=t.customValidationMessages.length>0,n.responseData=t.responseData,e(n)}))}},t.prototype.deprecatedAjaxSubmit=function(t,e){if(this.validate()){var i=new Autotask.AccessoryTabSubmittingEventArgs;this._submitting(i);var n=i.__get_data(),o=this._validationSummary.__get_customValidationSummary();autotask.ajax.__restrictedPostRequest(t,n,e).__deprecatedSubmit(o)}},t.prototype.generateFieldData=function(){for(var t=[this._fieldContainer],e=new AutotaskRequestDataSystem.SerializedRequestData(t),i=0;i<this._immutableData.length;i++)e.__addImmutableData(this._immutableData[i]);return e},t.prototype.validate=function(){return this._validate(!1)},t.prototype.__addImmutableData=function(t){this._immutableData.push(t)},t.prototype.__dispose=function(){this._fieldValidation.__dispose()},t.prototype.__finalize=function(){this._fieldValidation.__parse()},t.prototype.__initialize=function(){this._fieldValidation=new Autotask.PostedContainerValidation(this._fieldContainer),this._validationSummary=autotask.validationSummaryManagement.__findValidationSummary(this._fieldContainer)},t.prototype.__registerHandlers=function(){this._fieldValidation.__registerValidationSummary(this._validationSummary)},t.prototype._submitting=function(t){for(var e=0;e<this._submittingPointers.length;e++)this._submittingPointers[e](t)},t.prototype._validate=function(t){var e=this._fieldValidation.__validate();return e||this._fieldValidation.__validationFailed(),this._fieldValidation.__validationCompleted(e,t),e},t}(),window.Autotask.AccessoryTabButton=function(t){"use strict";function e(e,i){t.call(this,e,null,!0,!0,!1),this._id=e,this._route=i,this.___set_primaryClickPointer(autotask.proxy(this._onClick,this))}return autotask.inherit(e,t),e.prototype._clickHandler=null,e.prototype._id=null,e.prototype._route=null,e.prototype._onClick=function(){null!==this._clickHandler&&this._clickHandler(this._id,this._route)},e.prototype.setClickHandler=function(t){this._clickHandler=t},e}(Autotask.DefaultButton),window.Autotask.AccessoryTabManagement=function(){"use strict";function t(t,e,i){this._accessoryTabShellId=e,this._activityTabShellId=i,this._tabButtonIds=t,this._tabButtonIds.length>0&&(this._selectedButtonId=this._tabButtonIds[0]),this._activityTabContainerElement=document.querySelector(".ActivityTabContainer"),this._accessoryTabContainerElement=document.querySelector(".AccessoryTabContainer"),this._cssClassActive="Active"}return t.prototype._accessoryTabContainerElement=null,t.prototype._accessoryTabShellId=null,t.prototype._activityTabContainerElement=null,t.prototype._activityTabShellId=null,t.prototype._cssClassActive=null,t.prototype._selectedButtonId=null,t.prototype._tabButtonIds=null,t.prototype._tabChangedPointer=null,t.prototype.__set_tabChangedPointer=function(t){this._tabChangedPointer=t},t.prototype.__selectAccessoryTab=function(t,e){this._accessoryTabContainerElement.classList.add(this._cssClassActive),this._activityTabContainerElement.classList.remove(this._cssClassActive),this._selectTabButton(t,e),autotask.find(this._accessoryTabShellId).__activate(),autotask.find(this._activityTabShellId).__deactivate()},t.prototype.__selectActivityTab=function(t){this._activityTabContainerElement.classList.add(this._cssClassActive),this._accessoryTabContainerElement.classList.remove(this._cssClassActive),this._selectTabButton(t,null),autotask.find(this._accessoryTabShellId).__disposeCurrentTab(),autotask.find(this._activityTabShellId).__activate()},t.prototype._selectTabButton=function(t,e){if(t!==this._selectedButtonId){this._selectedButtonId=t;for(var i=null,n=0;n<this._tabButtonIds.length;n++)i=t===this._tabButtonIds[n],autotask.find(this._tabButtonIds[n]).set_selected(i);if(this._tabChanged(),null!==e)autotask.find(this._accessoryTabShellId).__refresh(this._selectedButtonId,e)}},t.prototype._tabChanged=function(){this._tabChangedPointer()},t}(),window.AccessoryTabManagementCreator=function(){"use strict";function t(){}return t.prototype.createAccessoryTabManagement=function(t,e,i){return new Autotask.AccessoryTabManagement(t,e,i)},t}(),window.Autotask.AccessoryTabShell=function(){"use strict";function t(t,e,i){autotask.instanceManagement.__addRegistrationKey(this,t),this._instanceTracker=new Autotask.InstanceTracker(e,i),this._trackerKey=e,this._contentElement=document.getElementById(i),this._transitionContainerElement=this._contentElement.nextElementSibling,this._loadingIndicatorElement=this._transitionContainerElement.nextElementSibling;var n=document.getElementById(t);this._tabbingSystem=new AutotaskTabbingSystem.TabbingSystem(n,autotask.proxy(this._tabbingAwayHandler,this)),this._accessoryTabButtonText={},this._activeCssClass="Active",this._fadeCssClass="Fade",this._isActive=!1,this._tabbingAwayHandlers=[];var o=this;this._resizeListener=function(){o._resize()}}return t.prototype._accessoryTabButtonId=null,t.prototype._accessoryTabButtonText=null,t.prototype._activeCssClass=null,t.prototype._contentElement=null,t.prototype._fadeCssClass=null,t.prototype._grid=null,t.prototype._instanceTracker=null,t.prototype._isActive=null,t.prototype._loadingIndicatorElement=null,t.prototype._requestCanceler=null,t.prototype._trackerKey=null,t.prototype._transitionContainerElement=null,t.prototype._transitionCoordinator=null,t.prototype._resizeListener=null,t.prototype._route=null,t.prototype._tabbingAwayHandlers=null,t.prototype._tabbingSystem=null,t.prototype._contentLoaded=function(){this._transitionContainerElement.classList.add(this._fadeCssClass),this._resetHandlers()},t.prototype._onRefreshSuccess=function(t){this._requestCanceler=null;var e=t.accessoryTabButtonId,i=t.accessoryTabButtonText;this._accessoryTabButtonText[e]=i,this._tabbingSystem.reset()},t.prototype._transitionEnding=function(){this._transitionContainerElement.classList.remove(this._activeCssClass),this._transitionContainerElement.classList.remove(this._fadeCssClass);var t=this._accessoryTabButtonText[this._accessoryTabButtonId];void 0!==t&&autotask.find(this._accessoryTabButtonId).set_text(t)},t.prototype._transitionReset=function(){this._loadingIndicatorElement.classList.remove(this._activeCssClass),this._transitionContainerElement.classList.remove(this._activeCssClass),this._transitionContainerElement.classList.remove(this._fadeCssClass)},t.prototype._transitionStarting=function(){this._loadingIndicatorElement.classList.remove(this._activeCssClass)},Object.defineProperty(t.prototype,"isEnabled",{get:function(){return this._isActive&&this._tabbingSystem.hasFocusableParticipants}}),t.prototype.addTabbingAwayHandler=function(t){this._tabbingAwayHandlers.push(t),this._tabbingSystem.isEnabled||(this._tabbingSystem.reset(),this._tabbingSystem.isEnabled=!0)},t.prototype.focus=function(){this._tabbingSystem.focusFirstParticipant()},t.prototype.focusEnd=function(){this._tabbingSystem.focusLastParticipant()},t.prototype.focusStart=function(){this.focus()},t.prototype.__activate=function(){this._isActive=!0},t.prototype.__dispose=function(){this._cancelRequest(),this._instanceTracker.__dispose()},t.prototype.__disposeCurrentTab=function(){this._instanceTracker.__clear(),this._isActive=!1,this._resetHandlers()},t.prototype.__initialize=function(){this._transitionCoordinator=new Autotask.TransitionCoordinator(100,autotask.proxy(this._transitionStarting,this),100,autotask.proxy(this._contentLoaded,this),autotask.proxy(this._transitionReset,this)),this._transitionCoordinator.configureEndingEvent(autotask.proxy(this._transitionEnding,this),500)},t.prototype.__refresh=function(t,e){this._cancelRequest(),this._transitionCoordinator.cancel(),this._transitionContainerElement.classList.add(this._activeCssClass),this._loadingIndicatorElement.classList.add(this._activeCssClass),this._accessoryTabButtonId=t;this._route=e,this._requestCanceler=e.__refreshAccessoryTab(null,autotask.proxy(this._onRefreshSuccess,this),this._instanceTracker,this._transitionCoordinator,t)},t.prototype.__refreshCurrentTab=function(t){null===this._route&&autotask.throwException("An accessory tab has not been loaded into the accessory tab shell.");var e=this._route;null!==t&&(e=t),this.__refresh(this._accessoryTabButtonId,e)},t.prototype._cancelRequest=function(){null!==this._requestCanceler&&(this._requestCanceler.__cancelRequest(),this._requestCanceler=null)},t.prototype._resetHandlers=function(){this._grid=null;var t=this._contentElement.querySelectorAll(".AccessoryTab > .Grid");t.length>0?(this._grid=autotask.find(t[0].id),window.addEventListener("resize",this._resizeListener)):window.removeEventListener("resize",this._resizeListener)},t.prototype._resize=function(){null!==this._grid&&this._grid.__refreshLayout()},t.prototype._tabbingAwayHandler=function(t){if(this._tabbingAwayHandlers.length>0){var e=new AutotaskTabbingSystem.TabbingAwayEventArgs(this.id,t,(function(){}));for(let t=0;t<this._tabbingAwayHandlers.length;t++)this._tabbingAwayHandlers[t](e)}},t}(),window.Autotask.AccessoryTabSubmittingEventArgs=function(){"use strict";function t(){this._data={}}return t.prototype._data=null,t.prototype.__get_data=function(){return this._data},t.prototype.add=function(t,e){"string"!=typeof t&&window.autotask.throwException("When adding key/value pairs to AccessoryTabSubmittingEventArgs, the key must be a string."),this._data[t]=e},t}(),Autotask.ActivityFilterBar=function(){"use strict";function t(t,e){autotask.instanceManagement.__addRegistrationKey(this,t),this._filterBarElement=document.getElementById(t),this._modelParameterName=e}return t.prototype._filterBarElement=null,t.prototype._changePointer=null,t.prototype._modelParameterName=null,t.prototype.__set_changePointer=function(t){this._changePointer=t},t.prototype.__get_modelParameterName=function(){return this._modelParameterName},t.prototype.__registerHandlers=function(){for(var t=this._filterBarElement.querySelectorAll("[data-systems]"),e=null,i=0;i<t.length;i++)this._isActivityFilterBarSystemParticipant(t[i].dataset.systems)&&("function"==typeof(e=autotask.find(t[i].dataset.alphaId)).addChangeHandler?e.addChangeHandler(autotask.proxy(this._participantChange,this)):e.addChange(autotask.proxy(this._participantChange,this)))},t.prototype._isActivityFilterBarSystemParticipant=function(t){return"1"===t[5]},t.prototype._participantChange=function(){var t={};t.filterBarData=new AutotaskRequestDataSystem.SerializedRequestData([this._filterBarElement]),this._changePointer(t)},t}(),window.Autotask.ActivityFilterContextOverlay=function(){"use strict";function t(t){autotask.instanceManagement.__addRegistrationKey(this,t),this._containerElement=document.getElementById(t),this._immutableData=[]}return t.prototype._activityTabCoordinatorId=null,t.prototype._containerElement=null,t.prototype._immutableData=null,t.prototype.applyFilters=function(){for(var t=new AutotaskRequestDataSystem.SerializedRequestData([this._containerElement]),e=0;e<this._immutableData.length;e++)t.__addImmutableData(this._immutableData[e]);autotask.find(this._activityTabCoordinatorId).applyFilters(t)},t.prototype.registerActivityTabCoordinatorId=function(t){this._activityTabCoordinatorId=t},t.prototype.__addImmutableData=function(t){this._immutableData.push(t)},t}(),window.Autotask.ActivityFilterContextOverlayCoordinator=function(){"use strict";function t(t,e,i,n,o,a){autotask.instanceManagement.__addRegistrationKey(this,t),this._filterButtonElement=document.getElementById(e),this._contextOverlay=new Autotask.ContextOverlay(i,!0),this._activityTabCoordinatorId=n,this._route=o,this._modelParameterName=a,this._eventsManagement=new Autotask.ContextOverlayEventsManagement,this._isContextOverlayVisible=!1}return t.prototype._activityTabCoordinatorId=null,t.prototype._contextOverlay=null,t.prototype._eventsManagement=null,t.prototype._filterButtonElement=null,t.prototype._isContextOverlayVisible=null,t.prototype._modelParameterName=null,t.prototype._route=null,t.prototype.__get_modelParameterName=function(){return this._modelParameterName},t.prototype._onHide=function(t){this.__hideContextMenu()},t.prototype._onHiding=function(t){return this._isContextOverlayVisible=!1,!0},t.prototype._onPositioning=function(t){var e=new Autotask.ContextOverlayDirectionPriority;return e.set_firstPriorityDirection(Autotask.ContextOverlayPositionDirection.Bottom),e.set_secondPriorityDirection(Autotask.ContextOverlayPositionDirection.Top),t.__overridePriority(e),t.get_bottomPosition().set_topOffset(12),t.get_bottomPosition().set_launchingElementCssClass("Bottom"),t.get_topPosition().set_topOffset(-12),t.get_topPosition().set_launchingElementCssClass("Top"),!0},t.prototype._onShow=function(t){!t.__isMouseEvent&&this._isContextOverlayVisible?this.__hideContextMenu():this._contextOverlay.show(t.__currentTarget)},t.prototype._onShowing=function(t){return this._isContextOverlayVisible=!0,this._route.__activityFilterContextOverlay(null,null,this._contextOverlay,this._activityTabCoordinatorId,t),!0},t.prototype.__dispose=function(){this._eventsManagement.__unregisterSelection(this._filterButtonElement,null)},t.prototype.__hideContextMenu=function(){this._contextOverlay.hide()},t.prototype.__registerHandlers=function(){this._contextOverlay.__addHiding(autotask.proxy(this._onHiding,this)),this._contextOverlay.__addPositioning(autotask.proxy(this._onPositioning,this)),this._contextOverlay.__addShowing(autotask.proxy(this._onShowing,this)),this._eventsManagement.__registerSelection(this._filterButtonElement,null,autotask.proxy(this._onShow,this),autotask.proxy(this._onHide,this))},t.prototype.__updateFilterButtonSelectedState=function(t){var e="SelectedState";t?this._filterButtonElement.classList.add(e):this._filterButtonElement.classList.remove(e)},t}(),window.Autotask.ActivityTabButton=function(t){"use strict";function e(e){t.call(this,e,null,!0,!0,!0),this._id=e,this.___set_primaryClickPointer(autotask.proxy(this._onClick,this))}return autotask.inherit(e,t),e.prototype._clickHandler=null,e.prototype._id=null,e.prototype._onClick=function(){null!==this._clickHandler&&this._clickHandler(this._id,null)},e.prototype.setClickHandler=function(t){this._clickHandler=t},e}(Autotask.DefaultButton),window.Autotask.ActivityTabShell=function(){"use strict";function t(t,e,i,n,o,a,s,r,l,_,u,c,d,h,p,y){autotask.instanceManagement.__addRegistrationKey(this,t),this._conversationElement=document.getElementById(i),this._loadingIndicatorElement=this._conversationElement.parentElement.nextElementSibling,this._noDataMessageElement=this._conversationElement.nextElementSibling,this._searchTextBoxElement=document.getElementById(l),this._searchTextBoxElement.addEventListener("keyup",autotask.proxy(this._onSearchBoxKeyUp,this)),this._sortDropDownListElement=document.getElementById(_),this._sortDropDownListElement.addEventListener("change",autotask.proxy(this._onSortDropDownListChange,this)),this._activeCssClass="Active",this._conversationRequestThreshold=1e6,this._isActive=!0,this._isClearingFilters=!1,this._isConversationLoading=!1,this._clearFilterButtonId=r,this._conversationStarterRoute=u,this._extendedInternalInformationRoute=d,this._extendedPublicInformationRoute=h,this._filterBarId=a,this._filterContextMenuCoordinatorId=s,this._instanceTracker=new Autotask.InstanceTracker(e,null),this._quickReplyId=n,this._quickStarterNoteId=o,this._subsequentConversationStarterRoute=c,this._unabbreviatedInformationDialogUrl=p,this._conversationRepliesContentManagement=new Autotask.ConversationRepliesContentManagement(this._conversationElement),this._conversationSearchContentManagement=new Autotask.ConversationSearchContentManagement(this._conversationElement),this._conversationSearchContentManagement.__set_searchCompletedPointer(autotask.proxy(this._onSearchCompleted,this)),this._conversationViewContentManagement=new Autotask.ConversationViewContentManagement(this._conversationElement),this._quickNoteActivationSystem=new Autotask.QuickNoteActivationSystem(y);var g=document.getElementById(t);this._tabbingSystem=new AutotaskTabbingSystem.TabbingSystem(g,autotask.proxy(this._tabbingAwayHandler,this)),this._conversationItemAddedHandlers=[],this._refreshCompleteHandlers=[],this._refreshStartingHandlers=[],this._tabbingAwayHandlers=[]}return t.prototype._conversationElement=null,t.prototype._conversationItemAddedHandlers=null,t.prototype._loadingIndicatorElement=null,t.prototype._noDataMessageElement=null,t.prototype._searchTextBoxElement=null,t.prototype._sortDropDownListElement=null,t.prototype._activeCssClass=null,t.prototype._clearFilterButton=null,t.prototype._clearFilterButtonId=null,t.prototype._contextOverlayFilterData=null,t.prototype._conversationChunkGetRequest=null,t.prototype._conversationContentManagement=null,t.prototype._conversationLoadedPointer=null,t.prototype._conversationRepliesContentManagement=null,t.prototype._conversationRequestCount=null,t.prototype._conversationRequestThreshold=null,t.prototype._conversationSearchContentManagement=null,t.prototype._conversationStarterRoute=null,t.prototype._conversationViewContentManagement=null,t.prototype._extendedInformationContentManagement=null,t.prototype._extendedInternalInformationRoute=null,t.prototype._extendedPublicInformationRoute=null,t.prototype._filterBar=null,t.prototype._filterBarData=null,t.prototype._filterBarId=null,t.prototype._filterContextMenuCoordinator=null,t.prototype._filterContextMenuCoordinatorId=null,t.prototype._instanceTracker=null,t.prototype._isActive=null,t.prototype._isClearingFilters=null,t.prototype._isConversationLoading=null,t.prototype._noteSubmittingCompleteHandler=null,t.prototype._noteSubmittingCompleteKey=null,t.prototype._quickReply=null,t.prototype._quickNoteActivationSystem=null,t.prototype._quickReplyContentManagement=null,t.prototype._quickReplyId=null,t.prototype._quickStarterNote=null,t.prototype._quickStarterNoteContentManagement=null,t.prototype._quickStarterNoteId=null,t.prototype._refreshCompleteHandlers=null,t.prototype._refreshConversationPostRequest=null,t.prototype._refreshStartingHandlers=null,t.prototype._searchTimer=null,t.prototype._subsequentConversationStarterRoute=null,t.prototype._tabbingAwayHandlers=null,t.prototype._tabbingSystem=null,t.prototype._unabbreviatedInformationDialogUrl=null,Object.defineProperty(t.prototype,"isEnabled",{get:function(){return this._isActive&&this._tabbingSystem.hasFocusableParticipants}}),t.prototype._onFilterBarChanged=function(t){this._filterBarData=t.filterBarData,this.__refreshConversation()},t.prototype._onQuickReplySave=function(t){autotask.overlayManagement.__showLoadingIndicator();var e=t.__get_route(),i=t.__get_inReplyToKey(),n={inReplyToKey:i};n[t.__get_serializedRequestDataParameterName()]=t.__get_serializedRequestData(),e.__saveQuickNote(n,autotask.proxy(this._onSaveQuickReplyComplete,this,i))},t.prototype._onQuickStarterNoteSave=function(t){autotask.overlayManagement.__showLoadingIndicator();var e=t.__get_route(),i={};i[t.__get_serializedRequestDataParameterName()]=t.__get_serializedRequestData(),e.__saveQuickNote(i,autotask.proxy(this._onSaveQuickStarterNoteComplete,this))},t.prototype._onRefreshConversationComplete=function(t){this._clearFilterButton.set_enabled(t.areFiltersApplied),this._filterContextMenuCoordinator.__updateFilterButtonSelectedState(t.areFiltersApplied),t.isConversationEmpty?this._noDataMessageElement.classList.add(this._activeCssClass):this._conversationElement.classList.add(this._activeCssClass),this._tabbingSystem.reset(),this._loadingIndicatorElement.classList.remove(this._activeCssClass),t.isConversationLoadingComplete?this._processConversationLoadedPointer():this._retrieveConversationChunk(t.lastConversationStarterKey)},t.prototype._onRetrieveConversationChunkComplete=function(t){t.isConversationEmpty&&autotask.throwException("An unexpected empty conversation result was detected."),t.isConversationLoadingComplete?this._processConversationLoadedPointer():this._retrieveConversationChunk(t.lastConversationStarterKey)},t.prototype._onRetrieveExtendedInternalInformationComplete=function(t){var e=this;this._processRetrieveExtendedInformationCompletePointer((function(){e._extendedInformationContentManagement.__loadHtmlAndJavaScript(t.itemCoordinatorJavaScript,t.itemCoordinatorId,t.informationHtmlAndJavaScript,t.key,!0)}))},t.prototype._onRetrieveExtendedPublicInformationComplete=function(t){var e=this;this._processRetrieveExtendedInformationCompletePointer((function(){e._extendedInformationContentManagement.__loadHtmlAndJavaScript(t.itemCoordinatorJavaScript,t.itemCoordinatorId,t.informationHtmlAndJavaScript,t.key,!1)}))},t.prototype._onSaveQuickReplyComplete=function(t,e){var i=this;this._processQuickNoteSaveCompletePointer(this._quickReply,(function(){var n=i._sortDropDownListElement.value;i._quickReplyContentManagement.__loadHtmlAndJavaScript(e.itemCoordinatorJavaScript,e.itemCoordinatorId,e.itemHtmlAndJavaScript,t,n),null!==i._noteSubmittingCompleteKey&&i._noteCompleteSubmitting()}))},t.prototype._onSaveQuickStarterNoteComplete=function(t){var e=this;this._processQuickNoteSaveCompletePointer(this._quickStarterNote,(function(){var i=e._sortDropDownListElement.value;e._quickStarterNoteContentManagement.__loadHtmlAndJavaScript(t.itemCoordinatorJavaScript,t.itemCoordinatorId,t.itemHtmlAndJavaScript,i),e._conversationElement.classList.add(e._activeCssClass),e._noDataMessageElement.classList.remove(e._activeCssClass),null!==e._noteSubmittingCompleteKey&&e._noteContinueSubmitting()}))},t.prototype._onSearchBoxKeyUp=function(t){null!==this._searchTimer&&window.clearTimeout(this._searchTimer),AutotaskDomSystem.KeyCode.isEnter(t.keyCode)?this._search():this._searchTimer=window.setTimeout(autotask.proxy(this._search,this),3e3)},t.prototype._onSearchCompleted=function(t){var e=t.__get_matchingElements();e.length>0&&(this._conversationRepliesContentManagement.__expandRepliesBySearchResults(e),this._tabbingSystem.reset(),autotask.scrolling.__scrollUntilVisible([e[0]],10,!0))},t.prototype._onSortDropDownListChange=function(){this.__refreshConversation()},t.prototype._quickReplyActivating=function(t){this._quickReplyContentManagement.__moveQuickReply(t.__get_quickReplyElement(),t.__get_inReplyToKey())},t.prototype._quickReplyDeactivating=function(t){this._quickReplyContentManagement.__removeQuickReply(t.__get_quickReplyElement()),this._quickNoteActivationSystem.__unregister("HostQuickReply"),this._tabbingSystem.reset()},t.prototype.addTabbingAwayHandler=function(t){this._tabbingAwayHandlers.push(t),this._tabbingSystem.isEnabled||(this._tabbingSystem.reset(),this._tabbingSystem.isEnabled=!0)},t.prototype.focus=function(){this._tabbingSystem.focusFirstParticipant()},t.prototype.focusEnd=function(){this._tabbingSystem.focusLastParticipant()},t.prototype.focusStart=function(){this.focus()},t.prototype.__activate=function(){this._isActive=!0},t.prototype.__activateConversationViewInReplyTo=function(t,e){this._conversationViewContentManagement.__deactivateAllConversationViewItems(),this._conversationViewContentManagement.__activateConversationViewInReplyTo(t,e),this._conversationRepliesContentManagement.__expandRepliesByReplyToKey(e),this._tabbingSystem.reset()},t.prototype.__addConversationItemAddedHandler=function(t){this._conversationItemAddedHandlers.push(t)},t.prototype.__addQuickReply=function(t){var e=this;this._quickNoteActivationSystem.__attemptActivation((function(){e._conversationViewContentManagement.__deactivateAllConversationViewItems(),e._quickReply.__activate(t);e._quickNoteActivationSystem.__registerQuickNote("HostQuickReply",e._quickReply,(function(){e._quickReply.__deactivate()})),e._tabbingSystem.reset()}))},t.prototype.__addRefreshCompleteHandler=function(t){this._refreshCompleteHandlers.push(t)},t.prototype.__addRefreshStartingHandler=function(t){this._refreshStartingHandlers.push(t)},t.prototype.__applyFilters=function(t){this._contextOverlayFilterData=t,this._filterContextMenuCoordinator.__hideContextMenu(),this.__refreshConversation()},t.prototype.__attemptQuickNoteActivation=function(t){var e=this;this._quickNoteActivationSystem.__attemptActivation((function(){t(),e._tabbingSystem.reset()}))},t.prototype.__clearFilters=function(){this._contextOverlayFilterData=null,this._isClearingFilters=!0,this.__refreshConversation()},t.prototype.__complete=function(){this.__refreshConversation()},t.prototype.__deactivate=function(){this._isActive=!1},t.prototype.__deactivateConversationView=function(){this._conversationViewContentManagement.__deactivateAllConversationViewItems()},t.prototype.__dispose=function(){this._cancelActivityConversationRequest(),this._instanceTracker.__dispose()},t.prototype.__expandReplies=function(t){this._conversationViewContentManagement.__deactivateAllConversationViewItems(),this._conversationRepliesContentManagement.__expandRepliesByKey(t),this._tabbingSystem.reset()},t.prototype.__initialize=function(){this._clearFilterButton=autotask.find(this._clearFilterButtonId),this._filterBar=autotask.find(this._filterBarId),this._filterContextMenuCoordinator=autotask.find(this._filterContextMenuCoordinatorId),this._quickReply=autotask.find(this._quickReplyId),null!==this._quickStarterNoteId&&(this._quickStarterNote=autotask.find(this._quickStarterNoteId));var t=autotask.proxy(this._raiseConversationItemAddedEvent,this);this._conversationContentManagement=new Autotask.ConversationContentManagement(this._instanceTracker,this._conversationElement,t);var e=new Autotask.ConversationSearchSystem(this._conversationSearchContentManagement);this._extendedInformationContentManagement=new Autotask.ExtendedInformationContentManagement(this._instanceTracker,this._conversationElement,e,t),this._quickReplyContentManagement=new Autotask.QuickReplyContentManagement(this._instanceTracker,this._conversationElement,e,t),this._quickStarterNoteContentManagement=new Autotask.QuickStarterNoteContentManagement(this._instanceTracker,this._conversationElement,e,t)},t.prototype.__refreshConversation=function(){this._searchTextBoxElement.value=null,this._cancelActivityConversationRequest(),this._conversationRequestCount=0,this._isConversationLoading=!0,this._raiseRefreshStartingEvent(),this._loadingIndicatorElement.classList.add(this._activeCssClass),this._conversationElement.classList.remove(this._activeCssClass),this._noDataMessageElement.classList.remove(this._activeCssClass);var t={};t.sortOrder=this._sortDropDownListElement.value,t[this._filterBar.__get_modelParameterName()]=this._filterBarData,t[this._filterContextMenuCoordinator.__get_modelParameterName()]=this._contextOverlayFilterData,t.isClearingFilters=this._isClearingFilters,this._isClearingFilters=!1,this._refreshConversationPostRequest=this._conversationStarterRoute.__refreshActivityConversation(t,autotask.proxy(this._onRefreshConversationComplete,this),this._conversationContentManagement)},t.prototype.__registerHandlers=function(){this._quickReply.__set_savePointer(autotask.proxy(this._onQuickReplySave,this)),this._quickReply.__addActivating(autotask.proxy(this._quickReplyActivating,this)),this._quickReply.__addDeactivating(autotask.proxy(this._quickReplyDeactivating,this)),null!==this._quickStarterNote&&this._quickStarterNote.__set_savePointer(autotask.proxy(this._onQuickStarterNoteSave,this)),this._filterBar.__set_changePointer(autotask.proxy(this._onFilterBarChanged,this))},t.prototype.__registerQuickNote=function(t,e,i){this._quickNoteActivationSystem.__registerQuickNote(t,e,i),this._tabbingSystem.reset()},t.prototype.__retrieveExtendedInformation=function(t,e){this._conversationViewContentManagement.__deactivateAllConversationViewItems(),autotask.overlayManagement.__showLoadingIndicator();var i=this._extendedPublicInformationRoute,n=autotask.proxy(this._onRetrieveExtendedPublicInformationComplete,this);e&&(i=this._extendedInternalInformationRoute,n=autotask.proxy(this._onRetrieveExtendedInternalInformationComplete,this));var o={key:t};i.__extendedInformation(o,n,t)},t.prototype.__searchNewContent=function(t){this._conversationSearchContentManagement.__searchNewContent(t)},t.prototype.__scrollToConversationViewReply=function(t){this._conversationViewContentManagement.__scrollToConversationViewReply(t)},t.prototype.__showUnabbreviatedInformationDialog=function(t,e){var i=this._unabbreviatedInformationDialogUrl,n={key:t,isInternal:e};autotask.ajax.postRequest(i,n,null).dialog()},t.prototype.__submitQuickNotes=function(t,e){this._noteSubmittingCompleteKey=t,this._noteSubmittingCompleteHandler=e,this._noteBeginSubmitting()},t.prototype.__unregisterQuickNote=function(t){this._quickNoteActivationSystem.__unregister(t),this._tabbingSystem.reset()},t.prototype.__validateQuickNotes=function(){return this._quickReply.__validate()&&(null===this._quickStarterNote||this._quickStarterNote.__validate())},t.prototype._cancelActivityConversationRequest=function(){null!==this._refreshConversationPostRequest&&(this._refreshConversationPostRequest.__cancelRequest(),this._refreshConversationPostRequest=null),null!==this._conversationChunkGetRequest&&(this._conversationChunkGetRequest.__cancelRequest(),this._conversationChunkGetRequest=null)},t.prototype._processConversationLoadedPointer=function(){this._isConversationLoading=!1,this._raiseRefreshCompleteEvent(),null!==this._conversationLoadedPointer&&(this._conversationLoadedPointer(),this._conversationLoadedPointer=null)},t.prototype._processQuickNoteSaveCompletePointer=function(t,e){var i=this,n=function(){i._conversationViewContentManagement.__deactivateAllConversationViewItems(),t.__deactivate(),e(),autotask.overlayManagement.__hideLoadingIndicator()};this._isConversationLoading?this._conversationLoadedPointer=n:n()},t.prototype._processRetrieveExtendedInformationCompletePointer=function(t){var e=function(){t(),autotask.overlayManagement.__hideLoadingIndicator()};this._isConversationLoading?this._conversationLoadedPointer=e:e()},t.prototype._raiseConversationItemAddedEvent=function(t){for(var e=0;e<this._conversationItemAddedHandlers.length;e++)this._conversationItemAddedHandlers[e](t)},t.prototype._raiseRefreshCompleteEvent=function(){for(var t=0;t<this._refreshCompleteHandlers.length;t++)this._refreshCompleteHandlers[t]()},t.prototype._raiseRefreshStartingEvent=function(){for(var t=0;t<this._refreshStartingHandlers.length;t++)this._refreshStartingHandlers[t]()},t.prototype._retrieveConversationChunk=function(t){if(this._conversationRequestCount+=1,this._conversationRequestCount>this._conversationRequestThreshold)autotask.throwException("The threshold for conversation requests was exceeded.");else{var e={lastConversationStarterKey:t};this._conversationChunkGetRequest=this._subsequentConversationStarterRoute.__activityConversationChunk(e,autotask.proxy(this._onRetrieveConversationChunkComplete,this),this._conversationContentManagement)}},t.prototype._noteBeginSubmitting=function(){null!==this._quickStarterNote&&this._quickStarterNote.__get_isActive()?this._quickStarterNote.__save():this._noteContinueSubmitting()},t.prototype._noteCompleteSubmitting=function(){null!==this._noteSubmittingCompleteHandler&&this._noteSubmittingCompleteHandler(this._noteSubmittingCompleteKey),this._noteSubmittingCompleteKey=null},t.prototype._noteContinueSubmitting=function(){this._quickReply.__get_isActive()?this._quickReply.__save():this._noteCompleteSubmitting()},t.prototype._search=function(){var t=this._searchTextBoxElement.value,e=this,i=function(){e._conversationSearchContentManagement.__clear(),e._conversationSearchContentManagement.__search(t),autotask.overlayManagement.__hideLoadingIndicator()};this._isConversationLoading?this._conversationLoadedPointer=i:(autotask.overlayManagement.__showLoadingIndicator(),i())},t.prototype._tabbingAwayHandler=function(t){if(this._tabbingAwayHandlers.length>0){var e=new AutotaskTabbingSystem.TabbingAwayEventArgs(this.id,t,(function(){}));for(let t=0;t<this._tabbingAwayHandlers.length;t++)this._tabbingAwayHandlers[t](e)}},t}(),window.Autotask.ConversationActionButtonContextMenuCoordinator=function(){"use strict";function t(t,e,i){autotask.instanceManagement.__addRegistrationKey(this,t+"_ActionButtonContextMenuCoordinator"),this._conversationElement=document.getElementById(e),this._contextOverlay=new Autotask.ContextOverlay(i,!0),this._eventsManagement=new Autotask.ContextOverlayEventsManagement,this._isContextOverlayVisible=!1}return t.prototype._contextOverlay=null,t.prototype._conversationElement=null,t.prototype._eventsManagement=null,t.prototype._isContextOverlayVisible=null,t.prototype._onHide=function(t){this._contextOverlay.hide()},t.prototype._onHiding=function(t){return this._isContextOverlayVisible=!1,!0},t.prototype._onPositioning=function(t){var e=new Autotask.ContextOverlayDirectionPriority;return e.set_firstPriorityDirection(Autotask.ContextOverlayPositionDirection.Bottom),e.set_secondPriorityDirection(Autotask.ContextOverlayPositionDirection.Top),t.__overridePriority(e),t.get_bottomPosition().set_topOffset(-1),t.get_bottomPosition().set_launchingElementCssClass("Bottom"),t.get_topPosition().set_topOffset(1),t.get_topPosition().set_launchingElementCssClass("Top"),!0},t.prototype._onShow=function(t){!t.__isMouseEvent&&this._isContextOverlayVisible?this._contextOverlay.hide():this._contextOverlay.show(t.__currentTarget)},t.prototype._onShowing=function(t){this._isContextOverlayVisible=!0;var e=t.get_launchingElement().dataset.url;return autotask.ajax.__restrictedGetRequest(e,null,null).__conversationActionButtonContextOverlay(this._contextOverlay,t),!0},t.prototype.__dispose=function(){this._eventsManagement.__unregisterSelection(this._conversationElement,".ContextOverlayActionButton")},t.prototype.__registerHandlers=function(){this._contextOverlay.__addHiding(autotask.proxy(this._onHiding,this)),this._contextOverlay.__addPositioning(autotask.proxy(this._onPositioning,this)),this._contextOverlay.__addShowing(autotask.proxy(this._onShowing,this)),this._eventsManagement.__registerSelection(this._conversationElement,".ContextOverlayActionButton",autotask.proxy(this._onShow,this),autotask.proxy(this._onHide,this))},t}(),window.Autotask.ConversationContentManagement=function(){"use strict";function t(t,e,i){this._instanceTracker=t,this._conversationElement=e,this._conversationItemAddedHandler=i}return t.prototype._conversationItemAddedHandler=null,t.prototype._conversationElement=null,t.prototype._instanceTracker=null,t.prototype.__loadHtmlAndJavaScript=function(t,e,i,n){if(n){for(;null!==this._conversationElement.firstChild;)this._conversationElement.removeChild(this._conversationElement.firstChild);this._instanceTracker.__clear()}this._instanceTracker.__loadScript(t);var o=autotask.find(e);this._conversationItemAddedHandler(o),this._conversationElement.insertAdjacentHTML("beforeend",i.htmlForInstanceTrackerContainer),this._instanceTracker.__loadScript(i.script)},t}(),window.Autotask.ConversationHiddenRepliesContainer=function(){"use strict";function t(t){autotask.instanceManagement.__addRegistrationKey(this,t),this._containerElement=document.getElementById(t),this._tabbingSystem=new AutotaskTabbingSystem.TabbingSystem(this._containerElement,autotask.proxy(this._tabbingAwayHandler,this)),this._isEnabled=!1,this._tabbingAwayHandlers=[]}return t.prototype._containerElement=null,t.prototype._isEnabled=null,t.prototype._tabbingAwayHandlers=null,t.prototype._tabbingSystem=null,Object.defineProperty(t.prototype,"isEnabled",{get:function(){return this._isEnabled}}),t.prototype.addTabbingAwayHandler=function(t){this._tabbingAwayHandlers.push(t),this._tabbingSystem.isEnabled||(this._tabbingSystem.reset(),this._tabbingSystem.isEnabled=!0)},t.prototype.enable=function(){for(var t=0;t<this._containerElement.children.length;t++)this._containerElement.children[t].classList.remove("Collapsed");this._isEnabled=!0},t.prototype.focus=function(){this._tabbingSystem.focusFirstParticipant()},t.prototype.focusEnd=function(){this._tabbingSystem.focusLastParticipant()},t.prototype.focusStart=function(){this.focus()},t.prototype._tabbingAwayHandler=function(t){if(this._tabbingAwayHandlers.length>0){var e=new AutotaskTabbingSystem.TabbingAwayEventArgs(this.id,t,(function(){}));for(let t=0;t<this._tabbingAwayHandlers.length;t++)this._tabbingAwayHandlers[t](e)}},t}(),window.Autotask.ConversationQuickReply=function(t){"use strict";function e(e,i,n,o,a,s,r,l){t.call(this,e,i,n,o,a,s,r,l),this._activatingHandlers=[]}return autotask.inherit(e,t),e.prototype._activatingHandlers=null,e.prototype._inReplyToKey=null,e.prototype.__activate=function(e){this.___get_textArea().clearValue(),this._inReplyToKey=e,this._onActivating(e),this.___get_textArea().focus(),t.prototype.__activate.call(this)},e.prototype.__addActivating=function(t){this._activatingHandlers.push(t)},e.prototype.___createEventArgs=function(t,e,i){return new Autotask.QuickReplySaveEventArgs(t,e,i,this._inReplyToKey)},e.prototype._onActivating=function(t){for(var e=new Autotask.QuickReplyActivatingEventArgs(this.___get_quickNoteElement(),t),i=0;i<this._activatingHandlers.length;i++)this._activatingHandlers[i](e)},e}(Autotask.ConversationQuickNote),window.Autotask.ConversationQuickStarterNote=function(t){"use strict";function e(e,i,n,o,a,s,r,l){t.call(this,e,i,n,o,a,s,r,l)}return autotask.inherit(e,t),e.prototype._onTextAreaFocus=function(){this.__activate()},e.prototype.__activate=function(){this.___get_quickNoteElement().classList.remove("Inactive"),t.prototype.__activate.call(this)},e.prototype.__deactivate=function(){this.___get_quickNoteElement().classList.add("Inactive"),t.prototype.__deactivate.call(this)},e.prototype.__registerHandlers=function(){this.___get_textArea().addFocusHandler(autotask.proxy(this._onTextAreaFocus,this))},e}(Autotask.ConversationQuickNote),window.Autotask.ConversationRepliesContentManagement=function(){"use strict";function t(t){this._conversationElement=t}return t.prototype._conversationElement=null,t.prototype.__expandRepliesByKey=function(t){var e=this._conversationElement.querySelectorAll('[data-replies-key="'+t+'"]');this._expandReplies(e)},t.prototype.__expandRepliesByReplyToKey=function(t){var e=[],i=this._conversationElement.querySelector('[data-key="'+t+'"]');null!==i&&i.classList.contains("Collapsed")&&e.push(i.closest(".Replies")),this._expandReplies(e)},t.prototype.__expandRepliesBySearchResults=function(t){for(var e=[],i=null,n=0;n<t.length;n++)if(null!==(i=t[n]).closest(".Collapsed")){var o=i.closest(".Replies");e.includes(o)||e.push(o)}this._expandReplies(e)},t.prototype._expandReplies=function(t){for(var e=0;e<t.length;e++){for(var i=null,n=0;n<t[e].children.length;n++)if(t[e].children[n].classList.contains("Link")&&t[e].children[n].classList.contains("Collapsed"))i=t[e].children[n];else if(t[e].children[n].classList.contains("HiddenReplies")){var o=t[e].children[n].id;autotask.find(o).enable()}null!==i&&i.remove()}},t}(),Autotask.ConversationSearchCompletedEventArgs=function(){"use strict";function t(t){this._matchingElements=t}return t.prototype._matchingElements=null,t.prototype.__get_matchingElements=function(){return this._matchingElements},t}(),window.Autotask.ConversationSearchContentManagement=function(){"use strict";function t(t){this._conversation=t,this._highlightClassName="Highlight",this._matchingElements=[],this._originalInnerHtml=[],this._searchableClassName="Searchable"}return t.prototype._conversation=null,t.prototype._highlightClassName=null,t.prototype._lastInput=null,t.prototype._matchingElements=null,t.prototype._originalInnerHtml=null,t.prototype._searchableClassName=null,t.prototype._searchCompletedPointer=null,t.prototype._timer=null,t.prototype.__set_searchCompletedPointer=function(t){this._searchCompletedPointer=t},t.prototype.__clear=function(){for(var t=0;t<this._matchingElements.length;t++)this._matchingElements[t].innerHTML=this._originalInnerHtml[t];this._matchingElements=[],this._originalInnerHtml=[]},t.prototype.__search=function(t){if(this._lastInput=t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),this._lastInput.length>0)for(var e=this._conversation.getElementsByClassName(this._searchableClassName),i=new RegExp(this._lastInput,"i"),n=0;n<e.length;n++)this._searchElement(e[n],i,this._lastInput);this._searchCompleted()},t.prototype.__searchNewContent=function(t){if(null!==this._lastInput&&this._lastInput.length>0)for(var e=t.getElementsByClassName(this._searchableClassName),i=new RegExp(this._lastInput,"i"),n=0;n<e.length;n++)this._searchElement(e[n],i,this._lastInput)},t.prototype._createHighlightedElement=function(t,e,i){var n,o=t.search(e);if(o>=0){n=document.createElement("span");var a=document.createTextNode(t.substring(0,o));n.appendChild(a);var s=document.createElement("span");s.classList.add(this._highlightClassName);var r=document.createTextNode(t.substring(o,o+i.length));s.appendChild(r),n.appendChild(s);var l=this._createHighlightedElement(t.substring(o+i.length),e,i);n.appendChild(l)}else n=document.createTextNode(t);return n},t.prototype._highlightTextContent=function(t,e,i){if(t.nodeType===Node.TEXT_NODE){var n=this._createHighlightedElement(t.textContent,e,i);t.parentElement.replaceChild(n,t)}else for(var o=0;o<t.childNodes.length;o++)this._highlightTextContent(t.childNodes[o],e,i)},t.prototype._searchElement=function(t,e,i){var n=t.childNodes[0];this._test(n,e)&&(this._originalInnerHtml.push(n.innerHTML),this._highlightTextContent(n,e,i),this._matchingElements.push(n))},t.prototype._searchCompleted=function(){var t=new Autotask.ConversationSearchCompletedEventArgs(this._matchingElements);this._searchCompletedPointer(t)},t.prototype._test=function(t,e){var i=!1;if(e.test(t.textContent))if(t.nodeType===Node.TEXT_NODE)i=!0;else for(var n=0;n<t.childNodes.length&&!(i=i||this._test(t.childNodes[n],e));n++);return i},t}(),window.Autotask.ConversationSearchSystem=function(){"use strict";function t(t){this._searchContentManagement=t}return t.prototype._searchContentManagement=null,t.prototype.__search=function(t){this._searchContentManagement.__searchNewContent(t)},t}(),window.Autotask.ConversationViewContentManagement=function(){"use strict";function t(t){this._conversationElement=t,this._activeCssClass="Active",this._inReplyToCssClass="InReplyTo"}return t.prototype._activeCssClass=null,t.prototype._conversationElement=null,t.prototype._inReplyToCssClass=null,t.prototype.__activateConversationViewInReplyTo=function(t,e){var i=this._findConversationItem(t);this._activateConversationItem(i,!1),i=this._findConversationItem(e),this._activateConversationItem(i,!0),autotask.scrolling.__scrollUntilVisible([i],10,!0)},t.prototype.__deactivateAllConversationViewItems=function(){for(var t=this._conversationElement.querySelectorAll(".ConversationItem.Active"),e=0;e<t.length;e++)t[e].classList.remove(this._activeCssClass),t[e].classList.remove(this._inReplyToCssClass)},t.prototype.__scrollToConversationViewReply=function(t){var e=this._findConversationReplyItem(t);autotask.scrolling.__scrollUntilVisible([e],10,!0)},t.prototype._activateConversationItem=function(t,e){t.classList.add(this._activeCssClass),e&&t.classList.add(this._inReplyToCssClass)},t.prototype._findConversationItem=function(t){return this._conversationElement.querySelector('[data-key="'+t+'"]')},t.prototype._findConversationReplyItem=function(t){return this._conversationElement.querySelector("."+this._activeCssClass+'[data-in-reply-to-key="'+t+'"]')},t}(),window.Autotask.CreateQuickReplyRoute=function(){"use strict";function t(t){this._requestCoordinator=new Autotask.AjaxRequestCoordinator("GET",t)}return t.prototype._requestCoordinator=null,t.prototype._onResponseProcessing=function(t,e){var i={htmlAndJavaScript:new Autotask.AjaxResponseHtmlAndJavaScript(t.htmlJavaScriptPair),quickReplyInstanceId:t.quickReplyInstanceId};null!=e&&e(i)},t.prototype.__createReply=function(t,e){var i=new Autotask.AjaxRequestData(t,!1).__serialize(),n=this;this._requestCoordinator.__sendRequest(i,(function(t){n._onResponseProcessing(t,e)}),null,!0,"CreateQuickReply");return new Autotask.AjaxRequestCanceler((function(){n._requestCoordinator.__cancelRequest()}))},t}(),window.Autotask.CreateQuickStarterNoteRoute=function(){"use strict";function t(t){this._requestCoordinator=new Autotask.AjaxRequestCoordinator("GET",t)}return t.prototype._requestCoordinator=null,t.prototype._onResponseProcessing=function(t,e){var i={htmlAndJavaScript:new Autotask.AjaxResponseHtmlAndJavaScript(t.htmlJavaScriptPair),quickStarterNoteInstanceId:t.quickStarterNoteInstanceId};null!=e&&e(i)},t.prototype.__createStarter=function(t,e){var i=new Autotask.AjaxRequestData(t,!1).__serialize(),n=this;this._requestCoordinator.__sendRequest(i,(function(t){n._onResponseProcessing(t,e)}),null,!0,"CreateQuickStarterNote");return new Autotask.AjaxRequestCanceler((function(){n._requestCoordinator.__cancelRequest()}))},t}(),window.Autotask.EntityConversationItem=function(){"use strict";function t(t,e,i,n,o,a,s){autotask.instanceManagement.__addRegistrationKey(this,t),this._id=t,this._itemCoordinatorId=e,this._quickStarterNoteInstanceTracker=new Autotask.InstanceTracker(i,i),this._key=n,this._saveStarterRoute=o,this._recentActivityContainer=document.getElementById(a),this._recentActivityInstanceTracker=new Autotask.InstanceTracker(s,null),this._activeCssClass="Active"}return t.prototype._activeCssClass=null,t.prototype._conversationItemCoordinator=null,t.prototype._guestNoteSubmittingCompleteKey=null,t.prototype._id=null,t.prototype._itemCoordinatorId=null,t.prototype._key=null,t.prototype._quickStarterNote=null,t.prototype._quickStarterNoteInstanceTracker=null,t.prototype._recentActivityContainer=null,t.prototype._recentActivityInstanceTracker=null,t.prototype._requestCanceler=null,t.prototype._saveStarterRoute=null,t.prototype._createStarterSuccess=function(t){this._quickStarterNoteInstanceTracker.__loadHtmlAndJavaScript(t.htmlAndJavaScript.htmlForInstanceTrackerContainer,t.htmlAndJavaScript.script),this._quickStarterNote=autotask.find(t.quickStarterNoteInstanceId),this._quickStarterNote.__addDeactivating(autotask.proxy(this._starterDeactivating,this)),this._quickStarterNote.__set_savePointer(autotask.proxy(this._saveStarterNote,this)),this._quickStarterNote.__activate(),this._conversationItemCoordinator.configureGuestNoteHandlers(autotask.proxy(this._guestNoteValidationHandler,this),autotask.proxy(this._guestNoteSubmittingHandler,this));var e=this;this._conversationItemCoordinator.registerQuickNote(this._id,this._quickStarterNote,(function(){e._quickStarterNote.__deactivate()}))},t.prototype._guestNoteSubmittingHandler=function(t){this._guestNoteSubmittingCompleteKey=t,this._quickStarterNote.__save()},t.prototype._guestNoteValidationHandler=function(){return this._quickStarterNote.__validate()},t.prototype._saveStarterNote=function(t){this._conversationItemCoordinator.deactivateConversationView(),this._cancel();var e={};e[t.__get_serializedRequestDataParameterName()]=t.__get_serializedRequestData(),this._requestCanceler=this._saveStarterRoute.__submit(e,autotask.proxy(this._submitStarterSuccess,this))},t.prototype._starterDeactivating=function(){this._quickStarterNote=null,this._quickStarterNoteInstanceTracker.__clear(),this._conversationItemCoordinator.unregisterQuickNote(this._id),this._conversationItemCoordinator.clearGuestNoteHandlers()},t.prototype._submitStarterSuccess=function(t){null!==this._guestNoteSubmittingCompleteKey&&(this._conversationItemCoordinator.guestNoteSubmittingComplete(this._guestNoteSubmittingCompleteKey),this._guestNoteSubmittingCompleteKey=null),this._quickStarterNoteInstanceTracker.__clear(),this._conversationItemCoordinator.unregisterQuickNote(this._id),this._activateRecentActivity(t.itemCoordinatorJavaScript,t.itemCoordinatorId,t.itemHtml,t.itemJavaScript)},t.prototype.__createQuickStarter=function(t,e){var i=this;this._conversationItemCoordinator.attemptQuickNoteActivation((function(){i._conversationItemCoordinator.deactivateConversationView(),i._cancel();var n={};n[e]=i._key,i._requestCanceler=t.__createStarter(n,autotask.proxy(i._createStarterSuccess,i))}))},t.prototype.__dispose=function(){this._cancel(),this._conversationItemCoordinator.unregisterQuickNote(this._id),this._conversationItemCoordinator.clearGuestNoteHandlers(),this._quickStarterNoteInstanceTracker.__dispose(),this._recentActivityInstanceTracker.__dispose()},t.prototype.__initialize=function(){this._conversationItemCoordinator=autotask.find(this._itemCoordinatorId)},t.prototype._activateRecentActivity=function(t,e,i,n){this._recentActivityInstanceTracker.__loadScript(t),autotask.find(e).registerActivityTabCoordinator(this._conversationItemCoordinator.activityTabCoordinator),this._recentActivityContainer.children[0].insertAdjacentHTML("afterend",i),this._recentActivityInstanceTracker.__loadScript(n),this._recentActivityContainer.classList.add(this._activeCssClass);var o=this._recentActivityContainer.children[1];this._conversationItemCoordinator.searchNewContent(o),autotask.scrolling.__scrollUntilVisible([o],0,!0)},t.prototype._cancel=function(){null!==this._requestCanceler&&(this._requestCanceler.__cancelRequest(),this._requestCanceler=null)},t}(),window.Autotask.ExtendedInformationContentManagement=function(){"use strict";function t(t,e,i,n){this._instanceTracker=t,this._conversation=e,this._searchSystem=i,this._conversationItemAddedHandler=n,this._internalAttributeKey="data-internal-message-key",this._attributeKey="data-message-key"}return t._conversation=null,t.prototype._conversationItemAddedHandler=null,t.prototype._attributeKey=null,t.prototype._instanceTracker=null,t.prototype._internalAttributeKey=null,t.prototype._searchSystem=null,t.prototype.__loadHtmlAndJavaScript=function(t,e,i,n,o){var a=null;a=o?this._internalAttributeKey:this._attributeKey;var s=document.querySelector("["+a+'="'+n+'"]');s.insertAdjacentHTML("beforebegin",i.htmlForInstanceTrackerContainer);var r=s.previousElementSibling;s.remove(),this._instanceTracker.__loadScript(t);var l=autotask.find(e);this._conversationItemAddedHandler(l),this._instanceTracker.__loadScript(i.script),this._searchSystem.__search(r)},t}(),window.Autotask.GuestConversationItemRepliesShell=function(){"use strict";function t(t,e,i,n,o,a,s,r){autotask.instanceManagement.__addRegistrationKey(this,t),this._id=t,this._itemCoordinatorId=e,this._quickReplyInstanceTracker=new Autotask.InstanceTracker(i,i),this._saveReplyRoute=n,this._inReplyToKeyParameterName=o,this._repliesShellIdParameterName=a,this._quickReplyElement=document.getElementById(i);var l=document.getElementById(s);this._repliesShellElement=l,this._replyCountIncrementer=new Autotask.ReplyCountIncrementer(l),this._repliesShellInstanceTracker=new Autotask.InstanceTracker(r,null),this._activeCssClass="Active"}return t.prototype._activeCssClass=null,t.prototype._conversationItemCoordinator=null,t.prototype._guestNoteSubmittingCompleteKey=null,t.prototype._id=null,t.prototype._inReplyToKeyParameterName=null,t.prototype._itemCoordinatorId=null,t.prototype._quickReply=null,t.prototype._quickReplyElement=null,t.prototype._quickReplyInstanceTracker=null,t.prototype._replyCountIncrementer=null,t.prototype._repliesShellElement=null,t.prototype._repliesShellIdParameterName=null,t.prototype._repliesShellInstanceTracker=null,t.prototype._requestCanceler=null,t.prototype._saveReplyRoute=null,t.prototype._createReplySuccess=function(t,e){this._conversationItemCoordinator.deactivateConversationView(),this._quickReplyInstanceTracker.__loadHtmlAndJavaScript(e.htmlAndJavaScript.htmlForInstanceTrackerContainer,e.htmlAndJavaScript.script),this._repliesShellElement.classList.add(this._activeCssClass),this._quickReply=autotask.find(e.quickReplyInstanceId),this._quickReply.__addDeactivating(autotask.proxy(this._replyDeactivating,this)),this._quickReply.__set_savePointer(autotask.proxy(this._saveReply,this)),this._quickReply.__activate(t),this._conversationItemCoordinator.configureGuestNoteHandlers(autotask.proxy(this._guestNoteValidatingHandler,this),autotask.proxy(this._guestNoteSubmittingHandler,this));var i=this;this._conversationItemCoordinator.registerQuickNote(this._id,this._quickReply,(function(){i._quickReply.__deactivate()}))},t.prototype._guestNoteSubmittingHandler=function(t){this._guestNoteSubmittingCompleteKey=t,this._quickReply.__save()},t.prototype._guestNoteValidatingHandler=function(){return this._quickReply.__validate()},t.prototype._replyDeactivating=function(){this._quickReply=null,this._quickReplyInstanceTracker.__clear(),this._conversationItemCoordinator.unregisterQuickNote(this._id),this._conversationItemCoordinator.clearGuestNoteHandlers(),2===this._repliesShellElement.children.length&&this._repliesShellElement.classList.remove(this._activeCssClass)},t.prototype._saveReply=function(t){this._cancel();var e={};e[t.__get_serializedRequestDataParameterName()]=t.__get_serializedRequestData(),e[this._inReplyToKeyParameterName]=t.__get_inReplyToKey(),e[this._repliesShellIdParameterName]=this._id,this._requestCanceler=this._saveReplyRoute.__submit(e,autotask.proxy(this._submitReplySuccess,this))},t.prototype._submitReplySuccess=function(t){null!==this._guestNoteSubmittingCompleteKey&&(this._conversationItemCoordinator.guestNoteSubmittingComplete(this._guestNoteSubmittingCompleteKey),this._guestNoteSubmittingCompleteKey=null),this._quickReply.__deactivate(),this._activateRepliesShell(t.itemCoordinatorJavaScript,t.itemCoordinatorId,t.itemHtml,t.itemJavaScript),this._moveQuickReply()},t.prototype.__createQuickReply=function(t,e,i){var n=this;this._conversationItemCoordinator.attemptQuickNoteActivation((function(){n._conversationItemCoordinator.deactivateConversationView(),n._cancel();var o={};o[e]=i,n._requestCanceler=t.__createReply(o,autotask.proxy(n._createReplySuccess,n,i))}))},t.prototype.__dispose=function(){this._cancel(),this._conversationItemCoordinator.unregisterQuickNote(this._id),this._conversationItemCoordinator.clearGuestNoteHandlers(),this._quickReplyInstanceTracker.__dispose(),this._repliesShellInstanceTracker.__dispose()},t.prototype.__initialize=function(){this._conversationItemCoordinator=autotask.find(this._itemCoordinatorId)},t.prototype._activateRepliesShell=function(t,e,i,n){this._repliesShellElement.insertAdjacentHTML("beforeend",i),this._repliesShellInstanceTracker.__loadScript(t),autotask.find(e).registerActivityTabCoordinator(this._conversationItemCoordinator.activityTabCoordinator),this._repliesShellInstanceTracker.__loadScript(n),this._repliesShellElement.classList.add(this._activeCssClass),this._replyCountIncrementer.__increment();var o=this._repliesShellElement.children.length-1,a=this._repliesShellElement.children[o];this._conversationItemCoordinator.searchNewContent(a),autotask.scrolling.__scrollUntilVisible([a],0,!0)},t.prototype._cancel=function(){null!==this._requestCanceler&&(this._requestCanceler.__cancelRequest(),this._requestCanceler=null)},t.prototype._moveQuickReply=function(){this._repliesShellElement.appendChild(this._quickReplyElement)},t}(),window.Autotask.NavigationLinkAttachment=function(){"use strict";function t(t,e){this._anchorElement=document.getElementById(t),this._anchorElement.addEventListener("click",autotask.proxy(this._click,this)),this._page=e}return t.prototype._anchorElement=null,t.prototype._page=null,t.prototype._click=function(){this._page.open(null)},t}(),window.Autotask.QuickNoteActivationSystem=function(){"use strict";function t(t){this._confirmationMessage=t}return t.prototype._deactivatingHandler=null,t.prototype._confirmationMessage=null,t.prototype._currentKey=null,t.prototype._currentQuickNote=null,t.prototype._confirmDeactivate=function(t){this._activate(t)},t.prototype.__attemptActivation=function(t){if(null!==this._currentQuickNote&&this._currentQuickNote.__get_isActive()){var e=new Autotask.ConfirmationDialogOptions;e.set_confirmPointer(autotask.proxy(this._confirmDeactivate,this,t)),e.set_description(this._confirmationMessage),autotask.confirmationDialog.show(e)}else this._activate(t)},t.prototype.__registerQuickNote=function(t,e,i){this._currentKey=t,this._currentQuickNote=e,this._deactivatingHandler=i},t.prototype.__unregister=function(t){t===this._currentKey&&(this._currentKey=null,this._currentQuickNote=null,this._deactivatingHandler=null)},t.prototype._activate=function(t){null!==this._deactivatingHandler&&this._deactivatingHandler(),t()},t}(),Autotask.QuickNoteDeactivatingEventArgs=function(){"use strict";function t(t){this._quickReplyElement=t}return t.prototype._quickReplyElement=null,t.prototype.__get_quickReplyElement=function(){return this._quickReplyElement},t}(),Autotask.QuickReplyActivatingEventArgs=function(){"use strict";function t(t,e){this._quickReplyElement=t,this._inReplyToKey=e}return t.prototype._quickReplyElement=null,t.prototype._inReplyToKey=null,t.prototype.__get_quickReplyElement=function(){return this._quickReplyElement},t.prototype.__get_inReplyToKey=function(){return this._inReplyToKey},t}(),window.Autotask.QuickReplyContentManagement=function(){"use strict";function t(t,e,i,n){this._instanceTracker=t,this._conversationElement=e,this._searchSystem=i,this._conversationItemAddedHandler=n,this._activeCssClass="Active"}return t.prototype._activeCssClass=null,t.prototype._conversationElement=null,t.prototype._conversationItemAddedHandler=null,t.prototype._instanceTracker=null,t.prototype._searchSystem=null,t.prototype.__moveQuickReply=function(t,e){var i=this._findReplies(e);i.classList.add(this._activeCssClass),i.appendChild(t),autotask.scrolling.__scrollUntilVisible([t],0,!0)},t.prototype.__removeQuickReply=function(t){this._conversationElement.before(t)},t.prototype.__loadHtmlAndJavaScript=function(t,e,i,n,o){var a=this._findReplies(n),s=i.htmlForInstanceTrackerContainer;a.insertAdjacentHTML("beforeend",s),a.classList.add(this._activeCssClass),new Autotask.ReplyCountIncrementer(a).__increment(),this._repositionStarter(a,o),this._instanceTracker.__loadScript(t);var r=autotask.find(e);this._conversationItemAddedHandler(r);var l=i.script;this._instanceTracker.__loadScript(l);var _=a.lastElementChild;this._searchSystem.__search(_),autotask.scrolling.__scrollUntilVisible([_],0,!0)},t.prototype._findReplies=function(t){var e=this._conversationElement.querySelector('[data-replies-key="'+t+'"]');null===e&&(e=this._conversationElement.querySelector('[data-key="'+t+'"]').closest(".Replies"));return e},t.prototype._repositionStarter=function(t,e){var i=t.previousElementSibling;if("OldestFirst"===e)(n=this._conversationElement.lastElementChild).appendChild(i),n.appendChild(t);else if("NewestFirstWithEscalation"===e){var n;(n=this._conversationElement.firstElementChild).firstElementChild.before(t),n.firstElementChild.before(i)}},t}(),Autotask.QuickReplySaveEventArgs=function(t){"use strict";function e(e,i,n,o){t.call(this,e,i,n),this._inReplyToKey=o}return autotask.inherit(e,t),e.prototype._inReplyToKey=null,e.prototype.__get_inReplyToKey=function(){return this._inReplyToKey},e}(Autotask.QuickNoteSaveEventArgs),window.Autotask.QuickStarterNoteContentManagement=function(){"use strict";function t(t,e,i,n){this._instanceTracker=t,this._conversationElement=e,this._searchSystem=i,this._conversationItemAddedHandler=n}return t.prototype._conversationElement=null,t.prototype._conversationItemAddedHandler=null,t.prototype._instanceTracker=null,t.prototype._searchSystem=null,t.prototype.__loadHtmlAndJavaScript=function(t,e,i,n){var o=i.htmlForInstanceTrackerContainer,a=null;"OldestFirst"===n?(this._conversationElement.insertAdjacentHTML("beforeend",o),a=this._conversationElement.lastElementChild):(this._conversationElement.insertAdjacentHTML("afterbegin",o),a=this._conversationElement.firstElementChild),this._instanceTracker.__loadScript(t);var s=autotask.find(e);this._conversationItemAddedHandler(s);var r=i.script;this._instanceTracker.__loadScript(r),this._searchSystem.__search(a),autotask.scrolling.__scrollUntilVisible([a],0,!0)},t}(),window.Autotask.ReplyCountIncrementer=function(){"use strict";function t(t){this._repliesShellElement=t;var e=t.children[0];this._countElement=e.children[0],this._countAttributeName="data-count",this._pluralCssClass="Plural",this._singularCssClass="Singular"}return t.prototype._countAttributeName=null,t.prototype._countElement=null,t.prototype._pluralCssClass=null,t.prototype._repliesShellElement=null,t.prototype._singularCssClass=null,t.prototype.__increment=function(){var t=this._countElement.getAttribute(this._countAttributeName),e=autotask.convert.stringToInteger(t);e++,this._countElement.setAttribute(this._countAttributeName,e),this._countElement.innerHTML=autotask.convert.integerToString(e),1===e?(this._repliesShellElement.classList.remove(this._pluralCssClass),this._repliesShellElement.classList.add(this._singularCssClass)):(this._repliesShellElement.classList.remove(this._singularCssClass),this._repliesShellElement.classList.add(this._pluralCssClass))},t}(),window.Autotask.SaveGuestReplyRoute=function(){"use strict";function t(t){this._requestCoordinator=new Autotask.AjaxRequestCoordinator("POST",t)}return t.prototype._requestCoordinator=null,t.prototype._onResponseProcessing=function(t,e){var i={itemCoordinatorJavaScript:t.itemCoordinatorJavaScript,itemCoordinatorId:t.itemCoordinatorId,itemHtml:t.htmlJavaScriptPair.Html.HtmlForInstanceTrackerContainer,itemJavaScript:t.htmlJavaScriptPair.JavaScript};null!=e&&e(i)},t.prototype.__submit=function(t,e){var i=new Autotask.AjaxRequestData(t,!0).__serialize(),n=this;this._requestCoordinator.__sendRequest(i,(function(t){n._onResponseProcessing(t,e)}),null,!0,"GuestReplyItem");return new Autotask.AjaxRequestCanceler((function(){n._requestCoordinator.__cancelRequest()}))},t}(),window.Autotask.SaveGuestStarterRoute=function(){"use strict";function t(t){this._requestCoordinator=new Autotask.AjaxRequestCoordinator("POST",t)}return t.prototype._requestCoordinator=null,t.prototype._onResponseProcessing=function(t,e){var i={itemCoordinatorJavaScript:t.itemCoordinatorJavaScript,itemCoordinatorId:t.itemCoordinatorId,itemHtml:t.htmlJavaScriptPair.Html.HtmlForInstanceTrackerContainer,itemJavaScript:t.htmlJavaScriptPair.JavaScript};null!=e&&e(i)},t.prototype.__submit=function(t,e){var i=new Autotask.AjaxRequestData(t,!0).__serialize(),n=this;this._requestCoordinator.__sendRequest(i,(function(t){n._onResponseProcessing(t,e)}),null,!0,"GuestStarterItem");return new Autotask.AjaxRequestCanceler((function(){n._requestCoordinator.__cancelRequest()}))},t}(),window.Autotask.ActivityConversationChunkRoute=function(){"use strict";function t(t){this._requestCoordinator=new Autotask.AjaxRequestCoordinator("GET",t)}return t.prototype._requestCoordinator=null,t.prototype._onResponseProcessing=function(t,e,i){var n=new Autotask.AjaxResponseHtmlAndJavaScript(t.htmlJavaScriptPair);i.__loadHtmlAndJavaScript(t.itemCoordinatorJavaScript,t.itemCoordinatorId,n,!1);var o={isConversationEmpty:t.isConversationEmpty,isConversationLoadingComplete:t.isConversationLoadingComplete,lastConversationStarterKey:t.lastConversationStarterKey};null!=e&&e(o)},t.prototype.__activityConversationChunk=function(t,e,i){var n=new Autotask.AjaxRequestData(t,!1).__serialize(),o=this;this._requestCoordinator.__sendRequest(n,(function(t){o._onResponseProcessing(t,e,i)}),null,!1,"ActivityConversation");return new Autotask.AjaxRequestCanceler((function(){o._requestCoordinator.__cancelRequest()}))},t}(),window.Autotask.ActivityFilterContextOverlayRoute=function(){"use strict";function t(t){this._requestCoordinator=new Autotask.AjaxRequestCoordinator("GET",t)}return t.prototype._requestCoordinator=null,t.prototype._onResponseProcessing=function(t,e,i,n,o){var a=new Autotask.AjaxResponseHtmlAndJavaScript(t.htmlJavaScriptPair);i.__loadHtmlAndJavaScript(a,o),autotask.find(t.overlayId).registerActivityTabCoordinatorId(n),null!=e&&e()},t.prototype.__activityFilterContextOverlay=function(t,e,i,n,o){var a=new Autotask.AjaxRequestData(t,!1).__serialize(),s=this;this._requestCoordinator.__sendRequest(a,(function(t){s._onResponseProcessing(t,e,i,n,o)}),null,!1,"FilterContextOverlay")},t}(),window.Autotask.ExtendedInformationRoute=function(){"use strict";function t(t){this._requestCoordinator=new Autotask.AjaxRequestCoordinator("GET",t)}return t.prototype._requestCoordinator=null,t.prototype._onResponseProcessing=function(t,e,i){var n=new Autotask.AjaxResponseHtmlAndJavaScript(t.htmlJavaScriptPair),o={itemCoordinatorJavaScript:t.itemCoordinatorJavaScript,itemCoordinatorId:t.itemCoordinatorId,informationHtmlAndJavaScript:n,key:i};null!=e&&e(o)},t.prototype.__extendedInformation=function(t,e,i){var n=new Autotask.AjaxRequestData(t,!1).__serialize(),o=this;this._requestCoordinator.__sendRequest(n,(function(t){o._onResponseProcessing(t,e,i)}),null,!1,"ExtendedInformation")},t}(),window.Autotask.RefreshActivityConversationRoute=function(){"use strict";function t(t){this._requestCoordinator=new Autotask.AjaxRequestCoordinator("POST",t)}return t.prototype._requestCoordinator=null,t.prototype._onResponseProcessing=function(t,e,i){var n=new Autotask.AjaxResponseHtmlAndJavaScript(t.htmlJavaScriptPair);i.__loadHtmlAndJavaScript(t.itemCoordinatorJavaScript,t.itemCoordinatorId,n,!0);var o={areFiltersApplied:t.areFiltersApplied,isConversationEmpty:t.isConversationEmpty,isConversationLoadingComplete:t.isConversationLoadingComplete,lastConversationStarterKey:t.lastConversationStarterKey};null!=e&&e(o)},t.prototype.__refreshActivityConversation=function(t,e,i){var n=new Autotask.AjaxRequestData(t,!0).__serialize(),o=this;this._requestCoordinator.__sendRequest(n,(function(t){o._onResponseProcessing(t,e,i)}),null,!1,"ActivityConversation");return new Autotask.AjaxRequestCanceler((function(){o._requestCoordinator.__cancelRequest()}))},t}(),window.Autotask.SaveQuickNoteRoute=function(){"use strict";function t(t){this._requestCoordinator=new Autotask.AjaxRequestCoordinator("POST",t)}return t.prototype._requestCoordinator=null,t.prototype._onResponseProcessing=function(t,e){var i=new Autotask.AjaxResponseHtmlAndJavaScript(t.htmlJavaScriptPair),n={itemCoordinatorJavaScript:t.itemCoordinatorJavaScript,itemCoordinatorId:t.itemCoordinatorId,itemHtmlAndJavaScript:i};null!=e&&e(n)},t.prototype.__saveQuickNote=function(t,e){var i=new Autotask.AjaxRequestData(t,!0).__serialize(),n=this;this._requestCoordinator.__sendRequest(i,(function(t){n._onResponseProcessing(t,e)}),null,!0,"SaveQuickNote")},t}(),window.Autotask.Ajax=function(){"use strict";function t(){}return t.prototype.deleteRequest=function(t,e,i){return new Autotask.AjaxDeleteSender(t,e,i)},t.prototype.getRequest=function(t,e,i){return new Autotask.AjaxGetSender(t,e,i)},t.prototype.postRequest=function(t,e,i){return new Autotask.AjaxPostSender(t,e,i)},t.prototype.__restrictedDeleteRequest=function(t,e,i){return new Autotask.AjaxRestrictedDeleteSender(t,e,i)},t.prototype.__restrictedGetRequest=function(t,e,i){return new Autotask.AjaxRestrictedGetSender(t,e,i)},t.prototype.__restrictedPostRequest=function(t,e,i){return new Autotask.AjaxRestrictedPostSender(t,e,i)},t}(),window.Autotask.AjaxDeleteSender=function(t){"use strict";function e(e,i,n){t.call(this,"POST",e,i,n)}return autotask.inherit(e,t),e}(Autotask.AjaxSender),window.Autotask.AjaxGetSender=function(t){"use strict";function e(e,i,n){t.call(this,"GET",e,i,n)}return autotask.inherit(e,t),e.prototype._onJsonResponseProcessing=function(t){var e={value:t.value};this.___executeSuccessDelegate(e)},e.prototype.deprecatedJson=function(){var t=this;this.___sendRequest("DeprecatedJson",(function(e){t._onJsonResponseProcessing(e)}),!0)},e}(Autotask.AjaxSender),window.Autotask.AjaxPipelineExecutionEventArgs=function(){"use strict";function t(){}return t.prototype._alertDialogOkayDelegate=null,t.prototype.get_alertDialogOkayDelegate=function(){return this._alertDialogOkayDelegate},t.prototype.set_alertDialogOkayDelegate=function(t){this._alertDialogOkayDelegate=t},t}(),window.Autotask.AjaxPostSender=function(t){"use strict";function e(e,i,n){t.call(this,"POST",e,i,n)}return autotask.inherit(e,t),e.prototype._onDialogResponseProcessing=function(t){var e=void 0!==t.hasDialogBeenCreated&&!0===t.hasDialogBeenCreated;if(e){var i=new Autotask.AjaxResponseHtmlAndJavaScript(t.htmlJavaScriptPair);autotask.dialogManagement.__loadDialog(i)}var n={value:null,hasDialogBeenCreated:e};this.___executeSuccessDelegate(n)},e.prototype._onJsonResponseProcessing=function(t){var e={value:t.value};this.___executeSuccessDelegate(e)},e.prototype.dialog=function(){var t=this;this.___sendRequest("Dialog",(function(e){t._onDialogResponseProcessing(e)}),!0)},e.prototype.deprecatedJson=function(){var t=this;this.___sendRequest("DeprecatedJson",(function(e){t._onJsonResponseProcessing(e)}),!0)},e}(Autotask.AjaxSender),window.Autotask.AjaxRequest=function(){"use strict";function t(t,e,i){this._httpMethod=t,this._responseErrorDelegate=i,this._responseSuccessDelegate=e,this._isLoadingIndicatorEnabled=!0,this._isAsynchronous=!0,this._xmlHttpRequest=new XMLHttpRequest,this._registerHandlers()}return t.prototype._httpMethod=null,t.prototype._isAsynchronous=null,t.prototype._responseErrorDelegate=null,t.prototype._responseSuccessDelegate=null,t.prototype._xmlHttpRequest=null,t.prototype._onAbort=function(){autotask.lifeCycleManagement._openRequestCount--},t.prototype._onAuthenticationFailure=function(){autotask.securityManagement.authenticationFailure()},t.prototype._onAuthorizationFailure=function(){autotask.securityManagement.authorizationFailure()},t.prototype._onReadyStateChange=function(){this._xmlHttpRequest.readyState==XMLHttpRequest.DONE&&(200===this._xmlHttpRequest.status?this._onSuccess():403===this._xmlHttpRequest.status?this._onAuthenticationFailure():471===this._xmlHttpRequest.status?this._onAuthorizationFailure():0===this._xmlHttpRequest.status?this._onUndefinedFailure():this._onResponseError(),autotask.lifeCycleManagement._openRequestCount--)},t.prototype._onSuccess=function(){void 0!==autotask.findPage().__sessionExpiration&&autotask.findPage().__sessionExpiration.extend();var t=new Autotask.AjaxResponse(this._xmlHttpRequest.responseText);this._responseSuccessDelegate(t)},t.prototype._onResponseError=function(){var t=new Autotask.AjaxResponse(this._xmlHttpRequest.responseText);this._responseErrorDelegate(t)},t.prototype._onTransportationError=function(){},t.prototype._onUndefinedFailure=function(){},t.prototype.__abort=function(){this._xmlHttpRequest.abort()},t.prototype.__send=function(t,e){"GET"===this._httpMethod&&(-1===t.indexOf("?")?t+="?"+e:t+="&"+e,e=null),this._xmlHttpRequest.open(this._httpMethod,t,this._isAsynchronous),this._xmlHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),this._xmlHttpRequest.setRequestHeader("X-Requested-With","XMLHttpRequest"),this._xmlHttpRequest.send(e),autotask.lifeCycleManagement._openRequestCount++},t.prototype._registerHandlers=function(){this._xmlHttpRequest.onreadystatechange=autotask.proxy(this._onReadyStateChange,this),this._xmlHttpRequest.onabort=autotask.proxy(this._onAbort,this),this._xmlHttpRequest.onerror=autotask.proxy(this._onTransportationError,this)},t}(),window.Autotask.AjaxRequestCanceler=function(){"use strict";function t(t){this._cancelHandler=t}return t.prototype._cancelHandler=null,t.prototype.__cancelRequest=function(){this._cancelHandler()},t}(),window.Autotask.AjaxRequestCoordinator=function(){"use strict";function t(t,e){this._httpMethod=t,this._url=e,this._isLoadingIndicatorVisible=!1}return t.prototype._httpMethod=null,t.prototype._isLoadingIndicatorVisible=null,t.prototype._pipelineExecutionDelegate=null,t.prototype._request=null,t.prototype._url=null,t.prototype._onBeforeRequestSent=function(t){t&&(autotask.overlayManagement.__showLoadingIndicator(),this._isLoadingIndicatorVisible=!0)},t.prototype._onResponseError=function(t,e,i){if(this._request=null,autotask.debugManagement.__get_isDebugBuild()){var n=t.__parseForErrorHandling();autotask.exceptionManagement.__showAjaxExceptionDialog(n),this._onResponseProcessingComplete(i)}else if(null!=e){e(new Autotask.AjaxResponseErrorEventArgs),this._onResponseProcessingComplete(i)}else autotask.exceptionManagement.__navigateToErrorPage()},t.prototype._onResponseProcessingComplete=function(t){t&&(autotask.overlayManagement.__hideLoadingIndicator(),this._isLoadingIndicatorVisible=!1)},t.prototype._onResponseSuccess=function(t,e,i,n){this._request=null,e(new Autotask.AjaxResponseProcessor(t,n,this._pipelineExecutionDelegate).__executePipeline()),this._onResponseProcessingComplete(i)},t.prototype.__cancelRequest=function(){null!==this._request&&(this._request.__abort(),this._isLoadingIndicatorVisible&&(autotask.overlayManagement.__hideLoadingIndicator(),this._isLoadingIndicatorVisible=!1))},t.prototype.__sendRequest=function(t,e,i,n,o){this.__cancelRequest();var a=this;this._onBeforeRequestSent(n),this._request=new Autotask.AjaxRequest(this._httpMethod,(function(t){a._onResponseSuccess(t,e,n,o)}),(function(t){a._onResponseError(t,i,n)})),this._request.__send(this._url,t)},t.prototype.__setPipelineExecutionDelegate=function(t){this._pipelineExecutionDelegate=t},t}(),window.Autotask.AjaxRequestData=function(){"use strict";function t(t,e){void 0!==t&&(t instanceof AutotaskRequestDataSystem.RequestData?this._data=t.__data:this._data=t),null!==this._data&&"object"!=typeof this._data&&autotask.throwException('Request data for an AJAX call must be of type "object".'),"boolean"!=typeof e&&autotask.throwException('The isRequestVerificationTokenIncluded parameter for the AjaxRequestData constructor must be of type "boolean".'),this._isRequestVerificationTokenIncluded=e}return t.prototype._data=null,t.prototype._isRequestVerificationTokenIncluded=null,t.prototype.__mergeData=function(t,e){if(null===this._data)this._data={};else for(var i in this._data)this._data.hasOwnProperty(i)&&t===i&&window.autotask.throwException("The following data property has a naming conflict: "+i+".");this._data[t]=e},t.prototype.__serialize=function(){var t="MvcAjaxIdentifier=9511D880CC984EA0AFD464675BF5F4D8";return this._isRequestVerificationTokenIncluded&&(t+="&RequestVerificationToken="+autotask.securityManagement.__get_requestVerificationToken()),null!==this._data&&(this._transformSpecializedDataObjects(this._data),t+="&"+this._serializeParameters(this._data)),t},t.prototype._mergeSerializedData=function(t,e){null===e&&window.autotask.throwException("The data object cannot be null when merging serialized data.");var i=null;for(var n in e)e.hasOwnProperty(n)&&(i=t+"."+n,this._data[i]=e[n])},t.prototype._serializeParameters=function(t){if(null!==t){var e=[];for(var i in t)if(t.hasOwnProperty(i))if(Array.isArray(t[i]))for(var n=0;n<t[i].length;n++)e.push(encodeURIComponent(i)+"="+encodeURIComponent(null===t[i][n]?"":t[i][n]));else e.push(encodeURIComponent(i)+"="+encodeURIComponent(null===t[i]?"":t[i]));return e.join("&")}},t.prototype._transformSpecializedDataObjects=function(){if(null!==this._data){var t=[],e=[],i=[],n=[],o=[],a=[],s=[],r=[];for(var l in this._data)this._data.hasOwnProperty(l)&&(this._data[l]instanceof Autotask.GridDisplayData?t.push(l):this._data[l]instanceof AutotaskGridSystem.SerializedEditData?e.push(l):this._data[l]instanceof AutotaskGridSystem.SerializedFilterData?i.push(l):this._data[l]instanceof AutotaskRequestDataSystem.SerializedRequestData?n.push(l):this._data[l]instanceof AutotaskItemSelectionSystem.ItemValue?o.push(l):this._data[l]instanceof AutotaskItemSelectionSystem.ItemValueCollection?a.push(l):this._data[l]instanceof AutotaskRequestDataSystem.RequestDataDictionary?s.push(l):this._data[l]instanceof AutotaskAjaxSystem.AjaxDecimalData&&r.push(l));for(var _=0;_<t.length;_++)this._data[t[_]].__mergeWithData(t[_],this._data),delete this._data[t[_]];for(var u=0;u<e.length;u++)this._data[e[u]].__mergeWithData(e[u],this._data),delete this._data[e[u]];for(var c=0;c<i.length;c++)this._data[i[c]].__mergeWithData(i[c],this._data),delete this._data[i[c]];for(var d=null,h=0;h<n.length;h++)d=this._data[n[h]],this._mergeSerializedData(n[h],d.requestData),delete this._data[n[h]];for(var p=0;p<o.length;p++){var y=this._data[o[p]].__createRequestData(o[p]);for(var g in y)y.hasOwnProperty(g)&&(this._data[g]=y[g])}for(var m=0;m<a.length;m++){var f=this._data[a[m]].__createRequestData(a[m]);for(var v in f)f.hasOwnProperty(v)&&(this._data[v]=f[v]);delete this._data[a[m]]}for(var C=null,w=0;w<s.length;w++)C=this._data[s[w]],this._mergeSerializedData(s[w],C.data),delete this._data[s[w]];this._transformDecimalData(r)}},t.prototype._transformDecimalData=function(t){for(var e=0;e<t.length;e++)this._data[t[e]]=this._data[t[e]].data},t.prototype._validateFormFields=function(t){for(var e=[],i=0;i<t.length;i++)if(null!==this._data)for(var n in this._data)this._data.hasOwnProperty(n)&&t[i].name===n&&e.push(n);e.length>0&&window.autotask.throwException("The following data properties have a naming conflict on the request: "+e.join(", ")+".")},t}(),window.Autotask.AjaxResponse=function(){"use strict";function t(t){this._responseText=t}return t.prototype._responseText=null,t.prototype.__parse=function(){return JSON.parse(this._responseText)},t.prototype.__parseForErrorHandling=function(){return this._responseText},t}(),window.Autotask.AjaxResponseErrorEventArgs=function(){"use strict";function t(){}return t.prototype.get_defaultErrorMessage=function(){return autotask.localizedText.elegantErrorText},t}(),window.Autotask.AjaxResponseHtmlAndJavaScript=function(){"use strict";function t(t){this.htmlForInstanceTrackerContainer=t.Html.HtmlForInstanceTrackerContainer,this.deferredHtml=t.Html.DeferredHtml,this.script=t.JavaScript}return t.prototype.deferredHtml=null,t.prototype.htmlForInstanceTrackerContainer=null,t.prototype.script=null,t}(),window.Autotask.AjaxResponseProcessor=function(){"use strict";function t(t,e,i){this._ajaxResponse=t,this._pipelineExecutionDelegate=i,this._responseIdentifier=e}return t.prototype._ajaxResponse=null,t.prototype._pipelineExecutionDelegate=null,t.prototype._responseIdentifier=null,t.prototype.__executePipeline=function(){var t=this._ajaxResponse.__parse();this._verifyResponse(t,this._responseIdentifier);var e=new Autotask.AjaxPipelineExecutionEventArgs;return null!==this._pipelineExecutionDelegate&&this._pipelineExecutionDelegate(e),this._processAlertDialogInformation(t,e),t},t.prototype._verifyResponse=function(t,e){t.classIdentifier!==e&&autotask.throwException("The wrong type of action result was returned.")},t.prototype._processAlertDialogInformation=function(t,e){if(t.alertDialogInformation){var i=new Autotask.AlertDialogOptions;i.set_operation(Autotask.AlertDialogOptions.Operation.Information),i.set_heading(t.alertDialogInformation.Heading),i.set_title(t.alertDialogInformation.Title);var n=t.alertDialogInformation.Description;1==n.length?i.set_description(n[0]):i.__set_descriptionList(n),null!==e.get_alertDialogOkayDelegate()&&i.set_okayPointer(e.get_alertDialogOkayDelegate()),autotask.alertDialog.show(i)}},t}(),window.Autotask.AjaxRestrictedDeleteSender=function(t){"use strict";function e(e,i,n){t.call(this,"POST",e,i,n)}return autotask.inherit(e,t),e.prototype._onGridRemoveRowsResponseProcessing=function(t){if(t.isResultConstructionSuccessful){var e={removedRowKeys:t.removedRowKeys,gridContentHtml:t.gridContentHtml,script:t.script};this.___executeSuccessDelegate(e)}},e.prototype.__gridRemoveRows=function(){var t=this;this.___sendRequest("RemoveGridRows",(function(e){t._onGridRemoveRowsResponseProcessing(e)}),!0)},e}(Autotask.AjaxSender),window.Autotask.AjaxRestrictedGetSender=function(t){"use strict";function e(e,i,n){t.call(this,"GET",e,i,n)}return autotask.inherit(e,t),e.prototype._onConversationActionButtonContextOverlayReponseProcessing=function(t,e,i){var n=new Autotask.AjaxResponseHtmlAndJavaScript(t.htmlJavaScriptPair);e.__loadHtmlAndJavaScript(n,i),this.___executeSuccessDelegate()},e.prototype._onFileUploadStatusResponseProcessing=function(t){this.___executeSuccessDelegate(t)},e.prototype._onGridContextOverlayPipelineExecution=function(t,e){t.set_alertDialogOkayDelegate((function(){e.refresh()}))},e.prototype._onGridContextOverlayResponseProcessing=function(t,e,i){if(!0===t.isDataUnavailable)e.hideWithoutDelay();else{var n=new Autotask.AjaxResponseHtmlAndJavaScript(t.htmlJavaScriptPair);e.__loadHtmlAndJavaScript(n,i)}this.___executeSuccessDelegate({value:null})},e.prototype._onRefreshInsightResponseError=function(t,e,i,n){var o=e.__createLoadContentDelegateForError(t.get_defaultErrorMessage());i.executeTransition([o]),null!==n&&n()},e.prototype.__conversationActionButtonContextOverlay=function(t,e){var i=this;this.___sendRequest("ContextOverlay",(function(n){i._onConversationActionButtonContextOverlayReponseProcessing(n,t,e)}),!1)},e.prototype.__fileUploadStatus=function(){var t=this;this.___sendRequest("FileUploadStatus",(function(e){t._onFileUploadStatusResponseProcessing(e)}),!1)},e.prototype.__gridContextOverlay=function(t,e,i){var n=this;this.__setPipelineExecutionDelegate((function(e){n._onGridContextOverlayPipelineExecution(e,t)}));this.___sendRequest("ContextOverlay",(function(t){n._onGridContextOverlayResponseProcessing(t,e,i)}),!1)},e}(Autotask.AjaxSender),window.Autotask.AjaxRestrictedPostSender=function(t){"use strict";function e(e,i,n){t.call(this,"POST",e,i,n)}return autotask.inherit(e,t),e.prototype._onAddBookmarkResponseProcessing=function(t){this.___executeSuccessDelegate(t.addBookmarkSuccess)},e.prototype._onJsonResponseProcessing=function(t){var e={value:t.value};this.___executeSuccessDelegate(e)},e.prototype._onRemoveBookmarkResponseProcessing=function(){this.___executeSuccessDelegate()},e.prototype._onDeprecatedSubmitResponseProcessing=function(t,e){e.clearMessages();var i={validationFailure:this._showErrorsInValidationSummary(t,e),value:t.value};this.___executeSuccessDelegate(i)},e.prototype.__addBookmark=function(){var t=this;this.___sendRequest("AddBookmark",(function(e){t._onAddBookmarkResponseProcessing(e)}),!1)},e.prototype.__deprecatedJson=function(t){var e=this;this.___sendRequest("DeprecatedJson",(function(t){e._onJsonResponseProcessing(t)}),t)},e.prototype.__removeBookmark=function(){var t=this;this.___sendRequest("RemoveBookmark",(function(){t._onRemoveBookmarkResponseProcessing()}),!1)},e.prototype.__deprecatedSubmit=function(t){var e=this;this.___sendRequest("DeprecatedSubmit",(function(i){e._onDeprecatedSubmitResponseProcessing(i,t)}),!0)},e.prototype._showErrorsInValidationSummary=function(t,e){var i=!1;if(void 0!==t.businessLogicErrors&&null!==t.businessLogicErrors&&t.businessLogicErrors.length>0){i=!0;for(var n=0;n<t.businessLogicErrors.length;n++)e.addMessage(n,t.businessLogicErrors[n])}if(void 0!==t.customLogicErrors&&null!==t.customLogicErrors&&t.customLogicErrors.length>0){i=!0;for(var o=0;o<t.customLogicErrors.length;o++)e.addMessage(o,t.customLogicErrors[o])}return i},e}(Autotask.AjaxSender),window.AuthenticationRoute=function(){"use strict";function t(t){this._requestCoordinator=new Autotask.AjaxRequestCoordinator("POST",t)}return t.prototype._requestCoordinator=null,t.prototype._onResponseProcessing=function(t,e){null!==e&&e(t)},t.prototype.json=function(t,e){var i=new Autotask.AjaxRequestData(t,!0).__serialize(),n=this;this._requestCoordinator.__sendRequest(i,(function(t){n._onResponseProcessing(t,e)}),null,!1,"DeprecatedJson")},t}(),window.Autotask.ReplaceAuthenticationParagraphContainerRoute=function(){"use strict";function t(){}return t.prototype._onResponseProcessing=function(t,e){var i=new Autotask.AjaxResponseHtmlAndJavaScript(t.htmlJavaScriptPair);e(i.htmlForInstanceTrackerContainer,i.script)},t.prototype.__makeRequest=function(t,e,i){var n=new Autotask.AjaxRequestData(e,!1).__serialize(),o=this;new Autotask.AjaxRequestCoordinator("GET",t).__sendRequest(n,(function(t){o._onResponseProcessing(t,i)}),null,!1,"ReplaceAuthenticationParagraphContainer")},t}(),window.AutotaskMvcBoardsSystem.RefreshBoardRoute=function(){"use strict";function t(t){this._requestCoordinator=new Autotask.AjaxRequestCoordinator("GET",t)}return t.prototype._requestCoordinator=null,t.prototype.makeRequest=function(t,e){var i=new Autotask.AjaxRequestData(t.__data,!1).__serialize(),n=this;this._requestCoordinator.__sendRequest(i,(function(t){n._onResponseProcessing(t,e)}),null,!1,"RefreshBoard");return new Autotask.AjaxRequestCanceler((function(){n._requestCoordinator.__cancelRequest()}))},t.prototype._onResponseProcessing=function(t,e){e(new AutotaskMvcBoardsSystem.RefreshBoardRouteResponseData(new AutotaskAjaxSystem.AjaxResponseHtmlAndJavaScript(t.htmlJavaScriptPair)))},t}(),window.AutotaskMvcBoardsSystem.RefreshCardRoute=function(){"use strict";function t(t){this._requestCoordinator=new Autotask.AjaxRequestCoordinator("POST",t)}return t.prototype._requestCoordinator=null,t.prototype.makeRequest=function(t,e){var i={};null!==t&&(i=t.__data);var n=new Autotask.AjaxRequestData(i,!0).__serialize(),o=this;this._requestCoordinator.__sendRequest(n,(function(t){o._onResponseProcessing(t,e)}),null,!1,"RefreshCard");return new Autotask.AjaxRequestCanceler((function(){o._requestCoordinator.__cancelRequest()}))},t.prototype._onResponseProcessing=function(t,e){e(new AutotaskMvcBoardsSystem.RefreshCardRouteResponseData(t.isRemoved,t.columnKey,t.rowKey,new AutotaskAjaxSystem.AjaxResponseHtmlAndJavaScript(t.htmlJavaScriptPair)))},t}(),window.AutotaskMvcBoardsSystem.RefreshOnDeckSectionRoute=function(){"use strict";function t(t){this._requestCoordinator=new Autotask.AjaxRequestCoordinator("GET",t)}return t.prototype._requestCoordinator=null,t.prototype.makeRequest=function(t,e){var i=new Autotask.AjaxRequestData(t.__data,!1).__serialize(),n=this;this._requestCoordinator.__sendRequest(i,(function(t){n._onResponseProcessing(t,e)}),null,!1,"RefreshOnDeckSection");return new Autotask.AjaxRequestCanceler((function(){n._requestCoordinator.__cancelRequest()}))},t.prototype._onResponseProcessing=function(t,e){e(new AutotaskMvcBoardsSystem.RefreshOnDeckSectionRouteResponseData(new AutotaskAjaxSystem.AjaxResponseHtmlAndJavaScript(t.htmlJavaScriptPair)))},t}(),window.AutotaskMvcBoardsSystem.ReplaceCardShellRoute=function(){"use strict";function t(t){this._requestCoordinator=new Autotask.AjaxRequestCoordinator("GET",t)}return t.prototype._requestCoordinator=null,t.prototype.makeRequest=function(t,e){var i={};null!==t&&(i=t.__data);var n=new Autotask.AjaxRequestData(i,!1).__serialize(),o=this;this._requestCoordinator.__sendRequest(n,(function(t){o._onResponseProcessing(t,e)}),null,!1,"ReplaceCardShell");return new Autotask.AjaxRequestCanceler((function(){o._requestCoordinator.__cancelRequest()}))},t.prototype._onResponseProcessing=function(t,e){e(new AutotaskMvcBoardsSystem.ReplaceCardShellRouteResponseData(t.replaceCardShellTrackingKey,new AutotaskAjaxSystem.AjaxResponseHtmlAndJavaScript(t.htmlJavaScriptPair),t.isEmpty))},t}(),window.Autotask.ContextMenuButtonOverlayRoute=function(){"use strict";function t(t){this._requestCoordinator=new Autotask.AjaxRequestCoordinator("POST",t)}return t.prototype._requestCoordinator=null,t.prototype._onResponseProcessing=function(t,e){var i=new Autotask.AjaxResponseHtmlAndJavaScript(t.htmlJavaScriptPair);null!=e&&e(i.htmlForInstanceTrackerContainer,i.script)},t.prototype.__makeRequest=function(t,e){var i=null;i=t instanceof AutotaskRequestDataSystem.RequestData?t.__data:t;var n=new Autotask.AjaxRequestData(i,!0).__serialize(),o=this;this._requestCoordinator.__sendRequest(n,(function(t){o._onResponseProcessing(t,e)}),null,!1,"ContextOverlay");return new Autotask.AjaxRequestCanceler((function(){o._requestCoordinator.__cancelRequest()}))},t}(),window.Autotask.DropDownButtonMenuRoute=function(){"use strict";function t(t){this._requestCoordinator=new Autotask.AjaxRequestCoordinator("POST",t)}return t.prototype._requestCoordinator=null,t.prototype._onResponseProcessing=function(t,e){var i=new Autotask.AjaxResponseHtmlAndJavaScript(t.htmlJavaScriptPair);null!=e&&e(i.htmlForInstanceTrackerContainer,i.script)},t.prototype.__makeRequest=function(t,e){var i=null;i=t instanceof AutotaskRequestDataSystem.RequestData?t.__data:t;var n=new Autotask.AjaxRequestData(i,!0).__serialize(),o=this;this._requestCoordinator.__sendRequest(n,(function(t){o._onResponseProcessing(t,e)}),null,!1,"ContextOverlay");return new Autotask.AjaxRequestCanceler((function(){o._requestCoordinator.__cancelRequest()}))},t}(),window.Autotask.TooltipContextOverlayRoute=function(){"use strict";function t(t){this._requestCoordinator=new Autotask.AjaxRequestCoordinator("GET",t)}return t.prototype._requestCoordinator=null,t.prototype._onResponseProcessing=function(t,e){var i=new Autotask.AjaxResponseHtmlAndJavaScript(t.htmlJavaScriptPair);null!=e&&e(i.htmlForInstanceTrackerContainer,i.script)},t.prototype.__makeRequest=function(t,e){var i=new Autotask.AjaxRequestData(t,!1).__serialize(),n=this;this._requestCoordinator.__sendRequest(i,(function(t){n._onResponseProcessing(t,e)}),null,!1,"ContextOverlay");return new Autotask.AjaxRequestCanceler((function(){n._requestCoordinator.__cancelRequest()}))},t}(),Autotask.ButtonActionEventArgs=function(){"use strict";function t(){}return t.prototype.__ctrlKey=null,t.prototype.__currentTarget=null,t.prototype.__isMouseEvent=null,t}(),window.Autotask.ButtonClickEventArgs=function(){"use strict";function t(){}return t.prototype.clientInstance=null,t.prototype.__ctrlKey=null,t.prototype.__id=null,t}(),window.Autotask.ChecklistCheckBoxButton=function(){"use strict";function t(t,e,i,n,o,a,s,r){autotask.instanceManagement.__addRegistrationKey(this,t),this._checkBox=document.getElementById(t),this._checkBoxIcon=this._checkBox.firstElementChild,this._id=t,this._isChecked=e,this._isEnabled=i,this._isLocked=n,this._checkedDisabledTooltipText=o,this._lockedTooltipText=a,this._changeHandler=s,this._toggleStateOverrideAction=null,this._bindingPropertyName=r,this._isDirty=!1}return t.prototype._checkBox=null,t.prototype._checkBoxIcon=null,t.prototype._bindingPropertyName=null,t.prototype._changeHandler=null,t.prototype._toggleStateOverrideAction=null,t.prototype._checkedDisabledTooltipText=null,t.prototype._id=null,t.prototype._isChecked=null,t.prototype._isDirty=null,t.prototype._isEnabled=null,t.prototype._isLocked=null,t.prototype._lockedTooltipText=null,t.prototype.get_enabled=function(){return this._isEnabled},t.prototype.set_enabled=function(t){t!==this._isEnabled&&(t&&this._isLocked&&autotask.throwException("This ChecklistCheckBoxButton cannot be enabled when in a locked state."),this._toggleEnabledState())},t.prototype.get_isDirty=function(){return this._isDirty},t.prototype.get_isLocked=function(){return this._isLocked},t.prototype.get_value=function(){return this.__get_rawValue()},t.prototype.set_value=function(t){t!==this._isChecked&&this._toggleCheckState()},t.prototype.__get_gridDisplayDataProvider=function(){return new Autotask.GridDisplayDataProvider(autotask.proxy(this._getGridDisplayData,this),autotask.proxy(this.get_enabled,this),autotask.proxy(this.get_isDirty,this),!1)},t.prototype.__get_rawValue=function(){return this._isChecked},t.prototype._clickHandler=function(t){this._isEnabled&&(null!==this._toggleStateOverrideAction?this._toggleStateOverrideAction():this._toggleCheckState())},t.prototype._keyDownHandler=function(t){this._isEnabled&&AutotaskDomSystem.KeyCode.isSpace(t.keyCode)&&t.preventDefault()},t.prototype._keyUpHandler=function(t){this._isEnabled&&AutotaskDomSystem.KeyCode.isSpace(t.keyCode)&&(null!==this._toggleStateOverrideAction?this._toggleStateOverrideAction():this._toggleCheckState())},t.prototype.setToggleStateOverrideAction=function(t){this._toggleStateOverrideAction=t},t.prototype.__registerHandlers=function(){this._checkBoxIcon.addEventListener("click",autotask.proxy(this._clickHandler,this)),this._checkBoxIcon.addEventListener("keydown",autotask.proxy(this._keyDownHandler,this)),this._checkBoxIcon.addEventListener("keyup",autotask.proxy(this._keyUpHandler,this))},t.prototype._getGridDisplayData=function(){var t={};return t[this._bindingPropertyName]=this.__get_rawValue(),t},t.prototype._onChange=function(){if(null!==this._changeHandler){var t=new Autotask.EditorChangeEventArgs;t.__id=this._id,t.clientInstance=this,this._changeHandler(t)}},t.prototype._toggleEnabledState=function(){this._isEnabled=!this._isEnabled,this._checkBox.classList.toggle("Disabled"),this._updateTooltip()},t.prototype._toggleCheckState=function(){this._isChecked=!this._isChecked,this._isChecked?(this._checkBox.classList.remove("Empty"),this._checkBox.classList.add("Checked")):(this._checkBox.classList.remove("Checked"),this._checkBox.classList.add("Empty")),this._updateTooltip(),this._isDirty=!0,this._onChange()},t.prototype._updateTooltip=function(){null!==this._checkedDisabledTooltipText&&(this._isChecked&&!this._isEnabled?this._checkBoxIcon.setAttribute("title",this._checkedDisabledTooltipText):this._checkBoxIcon.removeAttribute("title"))},t}(),function(){"use strict";window.Autotask.DropDownButton=function(t,e,i,n,o,a,s,r,l){autotask.instanceManagement.__addRegistrationKey(this,t),this._isCombinedHover=r,this._combinedHoverCssClass="CombinedHover",this._overlayIsVisibleCssClass="OverlayIsVisible",this._isContextOverlayVisible=!1,this._route=o,this._isPrimaryMenuPositionEnabled=l,this._contextOverlayShowingPointers=[],null!==a&&this.__addContextOverlayShowing(a),this._enabled=s,this._leftButtonId=e,this._rightButtonId=i,this._contextOverlayId=n},window.Autotask.DropDownButton.prototype={_buttonContainerElement:null,_leftButtonElement:null,_rightButtonElement:null,_ajaxCallData:null,_combinedHoverCssClass:null,_contextOverlay:null,_contextOverlayId:null,_contextOverlayShowingPointers:null,_enabled:null,_isCombinedHover:null,_isContextOverlayVisible:null,_isPrimaryMenuPositionEnabled:null,_leftButtonInstance:null,_leftButtonId:null,_rightButtonInstance:null,_rightButtonId:null,_route:null,get_enabled:function(){return this._enabled},set_enabled:function(t){this._enabled!==t&&(this._enabled=t,this._enabled||this._contextOverlay.hideWithoutDelay(),this._leftButtonInstance.set_enabled(t),this._rightButtonInstance.set_enabled(t))},get_text:function(){return this._leftButtonInstance.get_text()},set_text:function(t){this._leftButtonInstance.set_text(t)},__get_leftButton:function(){return this._leftButtonInstance},__get_title:function(){return this._leftButtonElement.getAttribute("title")},__set_title:function(t){this._leftButtonElement.setAttribute("title",t)},_contextOverlayHiding:function(){return this._isContextOverlayVisible=!1,this._buttonContainerElement.classList.remove(this._overlayIsVisibleCssClass),this._rightButtonInstance.__removeHoverState(),this._isCombinedHover&&this._leftButtonInstance.__removeHoverState(),!0},_contextOverlayPositioning:function(t){var e=this._gatherPositionData(t.__get_overlayWidth()),i=new Autotask.ContextOverlayDirectionPriority;return i.set_firstPriorityDirection(Autotask.ContextOverlayPositionDirection.Bottom),t.__overridePriority(i),t.get_bottomPosition().set_isSlidingEnabled(!1),t.get_bottomPosition().set_topOffset(-1),e.isPrimaryPositionActive?t.get_bottomPosition().set_leftOffset(e.primaryLeft):(t.get_bottomPosition().set_leftOffset(e.secondaryLeft),t.set_cssClass("Alternate")),!0},_contextOverlayShowing:function(t){if(this._isContextOverlayVisible=!0,this._buttonContainerElement.classList.add(this._overlayIsVisibleCssClass),this._rightButtonInstance.__applyHoverState(),this._isCombinedHover&&(this._leftButtonInstance.__applyHoverState(),t.set_cssClass(this._combinedHoverCssClass)),null!==this._route){var e=new Autotask.DropDownButtonContextOverlayShowingEventArgs(t);autotask.eventManagement.__executeHandlers(e,this._contextOverlayShowingPointers,autotask.proxy(this._defaultContextOverlayShowing,this))}return!0},_defaultContextOverlayShowing:function(t){return this._route.__makeRequest(t.get_data(),null,this._contextOverlay,t.get_contextOverlayShowingEventArgs()),!0},_leftButtonClick:function(){return this._isCombinedHover?this._rightButtonClick():(this._isContextOverlayVisible&&this._contextOverlay.hide(),!0)},_leftButtonMouseEnter:function(t){var e=!0;return this._isCombinedHover&&this._enabled&&(!t.__isMouseEvent&&this._isContextOverlayVisible?this._contextOverlay.hide():this._contextOverlay.show(this._rightButtonElement),e=!1),e},_leftButtonMouseLeave:function(){return!this._isCombinedHover||!this._enabled||this._rightButtonMouseLeave()},_rightButtonClick:function(){return!1},_rightButtonMouseDown:function(){return!1},_rightButtonMouseEnter:function(t){return this._enabled&&(!t.__isMouseEvent&&this._isContextOverlayVisible?this._contextOverlay.hide():this._contextOverlay.show(t.__currentTarget)),!1},_rightButtonMouseLeave:function(){return this._enabled&&this._contextOverlay.hide(),!1},_rightButtonMouseUp:function(){return!1},hideContextOverlay:function(){this.__hideContextOverlay()},__addContextOverlayShowing:function(t){this._contextOverlayShowingPointers.push(t)},__hideContextOverlay:function(){this._contextOverlay.hideWithoutDelay()},__initialize:function(){for(this._leftButtonElement=document.getElementById(this._leftButtonId),this._rightButtonElement=document.getElementById(this._rightButtonId),this._buttonContainerElement=this._rightButtonElement;!this._buttonContainerElement.classList.contains("DropDownButtonContainer");)this._buttonContainerElement=this._buttonContainerElement.parentNode;this._initializeClientInstances(this._leftButtonId,this._rightButtonId,this._contextOverlayId),this.set_enabled(this._enabled)},__registerHandlers:function(){this._contextOverlay.__addShowing(autotask.proxy(this._contextOverlayShowing,this)),this._contextOverlay.__addHiding(autotask.proxy(this._contextOverlayHiding,this)),this._contextOverlay.__addPositioning(autotask.proxy(this._contextOverlayPositioning,this)),this._leftButtonInstance.__addMouseEnter(autotask.proxy(this._leftButtonMouseEnter,this)),this._leftButtonInstance.__addMouseLeave(autotask.proxy(this._leftButtonMouseLeave,this)),this._rightButtonInstance.__addMouseEnter(autotask.proxy(this._rightButtonMouseEnter,this)),this._rightButtonInstance.__addMouseLeave(autotask.proxy(this._rightButtonMouseLeave,this)),this._rightButtonInstance.__addMouseDown(autotask.proxy(this._rightButtonMouseDown,this)),this._rightButtonInstance.__addMouseUp(autotask.proxy(this._rightButtonMouseUp,this)),this._leftButtonInstance.__addClick(autotask.proxy(this._leftButtonClick,this)),this._rightButtonInstance.__addClick(autotask.proxy(this._rightButtonClick,this))},_initializeClientInstances:function(t,e,i){this._leftButtonInstance=autotask.find(t),this._rightButtonInstance=autotask.find(e),this._contextOverlay=new Autotask.ContextOverlay(i,null!==this._route),this._contextOverlay.set_isPositioningResetOnHide(!0)},_gatherPositionData:function(t){var e=!0,i=null,n=this._leftButtonElement.getBoundingClientRect().left-this._rightButtonElement.getBoundingClientRect().left;return(!1===this._isPrimaryMenuPositionEnabled||this._leftButtonElement.getBoundingClientRect().left+document.body.scrollLeft+t>document.offsetWidth)&&(e=!1,i=this._rightButtonElement.offsetWidth-t),{primaryLeft:n,secondaryLeft:i,isPrimaryPositionActive:e}}},window.Autotask.DropDownButtonContextOverlayShowingEventArgs=function(t){this._contextOverlayShowingEventArgs=t},window.Autotask.DropDownButtonContextOverlayShowingEventArgs.prototype={_data:null,get_data:function(){return this._data},set_data:function(t){this._data=t},get_contextOverlayShowingEventArgs:function(){return this._contextOverlayShowingEventArgs}}}(),Autotask.EntityNavigationButton=function(t){"use strict";function e(e,i,n){t.call(this,e,autotask.proxy(this._openPage,this),null,n),this._page=i}return autotask.inherit(e,t),e.prototype._page=null,e.prototype._openPage=function(){autotask.overlayManagement.__showLoadingIndicator(),this._page.__open(null)},e}(Autotask.TitleBarButton),Autotask.InlineIconButton=function(t){"use strict";function e(e,i,n,o){t.call(this,e),this._clickPointer=n,this._page=o,this.set_enabled(i),this.___set_primaryClickPointer(autotask.proxy(this._onClick,this))}return autotask.inherit(e,t),e.prototype._clickPointer=null,e.prototype._page=null,e.prototype.__registerHandlers=function(){t.prototype.__registerHandlers.call(this),autotask.findPage().__buttonEvents.registerButton(this.___get_buttonElement())},e.prototype.___mouseEnter=function(e){e.__isMouseEvent?t.prototype.___mouseEnter.call(this,e):t.prototype.__onClick.call(this,e)},e.prototype._onClick=function(t){null!==this._clickPointer?this._clickPointer(t):this._page.__open(null)},e}(Autotask.ButtonCore),Autotask.InsightIconButton=function(t){"use strict";function e(e,i,n){t.call(this,e),this._clickPointer=i,this._page=n,this.set_enabled(!0),this.___set_primaryClickPointer(autotask.proxy(this._onClick,this))}return autotask.inherit(e,t),e.prototype._clickPointer=null,e.prototype._page=null,e.prototype.__registerHandlers=function(){t.prototype.__registerHandlers.call(this),autotask.findPage().__buttonEvents.registerButton(this.___get_buttonElement())},e.prototype.___mouseEnter=function(e){e.__isMouseEvent?t.prototype.___mouseEnter.call(this,e):t.prototype.__onClick.call(this,e)},e.prototype._onClick=function(t){null!==this._clickPointer?this._clickPointer(t):this._page.__open(null)},e}(Autotask.ButtonCore),window.Autotask.LinkAttachmentButton=function(t){"use strict";function e(e,i){t.call(this,e,null,!0,!0,!1),this._route=i,this.___set_primaryClickPointer(autotask.proxy(this._primaryClickHandler,this))}return autotask.inherit(e,t),e.prototype._route=null,e.prototype._primaryClickHandler=function(){this._route.makeRequest(null,null)},e}(Autotask.DefaultButton),Autotask.PageDirectoryLinkButton=function(t){"use strict";function e(e,i,n,o,a){t.call(this,e,autotask.proxy(this._openPage,this),n,o),this._page=i,this._contextOverlayRoute=a}return autotask.inherit(e,t),e.prototype._contextOverlay=null,e.prototype._contextOverlayRoute=null,e.prototype._page=null,e.prototype._contextOverlayShowing=function(){this._contextOverlayRoute.__makeRequest(null,autotask.proxy(this._contextOverlayShowingSuccess,this))},e.prototype._contextOverlayShowingSuccess=function(t,e){this._contextOverlay.__loadHtmlAndJavaScript(t,e)},e.prototype._mouseEnter=function(t){t.__isMouseEvent&&(this._contextOverlay.clearShowingHandlers(),this._contextOverlay.addShowingHandler(autotask.proxy(this._contextOverlayShowing,this)),this._contextOverlay.show(t.__currentTarget))},e.prototype._mouseLeave=function(){this._contextOverlay.hide()},e.prototype.__initialize=function(){t.prototype.__initialize.call(this),this._contextOverlay=autotask.tooltipContextOverlayLocator.contextOverlay},e.prototype.__registerHandlers=function(){t.prototype.__registerHandlers.call(this),null!==this._contextOverlayRoute&&(this.__addMouseEnter(autotask.proxy(this._mouseEnter,this)),this.__addMouseLeave(autotask.proxy(this._mouseLeave,this)))},e.prototype._openPage=function(){this._page.__open(null)},e}(Autotask.AnchorButton),Autotask.PageNavigationButton=function(t){"use strict";function e(e,i,n,o){t.call(this,e,autotask.proxy(this._openPage,this),n,!0,!1),this._isControlClickEnabled=o,this._page=i}return autotask.inherit(e,t),e.prototype._isControlClickEnabled=null,e.prototype._page=null,e.prototype._openPage=function(t){null!==this._page&&autotask.windowManagement.openPage(this._page,null,t.__ctrlKey&&this._isControlClickEnabled)},e}(Autotask.DefaultButton),Autotask.PageNavigationLinkButton=function(t){"use strict";function e(e,i,n,o){t.call(this,e,autotask.proxy(this._openPage,this),!0,!1,null),this._isControlClickEnabled=o,this._page=i,n&&this.__addClick(n)}return autotask.inherit(e,t),e.prototype._isControlClickEnabled=null,e.prototype._page=null,e.prototype._openPage=function(t){null!==this._page&&autotask.windowManagement.openPage(this._page,null,t.__ctrlKey&&this._isControlClickEnabled)},e}(Autotask.LinkButton),Autotask.QuickLaunchButton=function(t){"use strict";function e(e,i,n){t.call(this,e),this._asciiCode=n,this.___set_primaryClickPointer(i)}return autotask.inherit(e,t),e.prototype._asciiCode=null,e.prototype._pageKeyUp=function(t){this._asciiCode===t.which&&t.altKey&&!t.ctrlKey&&this.__onClick(null)},e.prototype.__registerHandlers=function(){t.prototype.__registerHandlers.call(this),autotask.findPage().__buttonEvents.registerButton(this.___get_buttonElement()),autotask.findPage().__addKeyUp(autotask.proxy(this._pageKeyUp,this))},e.prototype.___mouseEnter=function(e){e.__isMouseEvent?t.prototype.___mouseEnter.call(this,e):t.prototype.__onClick.call(this,e)},e}(Autotask.ButtonCore),window.Autotask.TabButton=function(t){"use strict";function e(e,i,n,o,a,s){t.call(this,e,autotask.proxy(this._selectTab,this),o,a,s),this._clickPointer=n,this._tabOwnerId=i,this._validationFailureClass="ValidationFailure"}return autotask.inherit(e,t),e.prototype._clickPointer=null,e.prototype._tabOwner=null,e.prototype._tabOwnerId=null,e.prototype._validationFailureClass=null,e.prototype.__addValidationStyling=function(){this.___get_buttonElement().classList.add(this._validationFailureClass)},e.prototype.__initialize=function(){t.prototype.__initialize.call(this),this._tabOwner=autotask.find(this._tabOwnerId)},e.prototype.__removeValidationStyling=function(){this.___get_buttonElement().classList.remove(this._validationFailureClass)},e.prototype._selectTab=function(t){var e=!0;return null!==this._clickPointer&&(e=this._clickPointer(t)),!0===e&&this._tabOwner.__selectTabByTabButtonId(this.__get_id()),e},e}(Autotask.DefaultButton),Autotask.TitleBarClientActivatedHelpButton=function(t){"use strict";function e(e,i,n){t.call(this,e),this._page=i,this.set_enabled(n),this.___set_primaryClickPointer(autotask.proxy(this._onClick,this))}return autotask.inherit(e,t),e.prototype._helpId=null,e.prototype._page=null,e.prototype.replaceHelpId=function(t){this._helpId=t},e.prototype.__registerHandlers=function(){t.prototype.__registerHandlers.call(this),autotask.findPage().__buttonEvents.registerButton(this.___get_buttonElement())},e.prototype.___mouseEnter=function(e){e.__isMouseEvent?t.prototype.___mouseEnter.call(this,e):t.prototype.__onClick.call(this,e)},e.prototype._onClick=function(t){null===this._helpId&&autotask.throwException("The help id was not supplied."),this._page.__open(this._helpId)},e}(Autotask.ButtonCore),Autotask.TitleBarPageNavigationButton=function(t){"use strict";function e(e,i){t.call(this,e,autotask.proxy(this._openPage,this),!0,!1,!1),this._page=i}return autotask.inherit(e,t),e.prototype._page=null,e.prototype._openPage=function(t){null!==this._page&&this._page.__open(null)},e}(Autotask.DefaultButton),Autotask.TitleBarToggleButton=function(t){"use strict";function e(e,i,n,o,a){t.call(this,e,i,n,o),this._isSelected=a}return autotask.inherit(e,t),e.prototype._isSelected=null,e.prototype.__initialize=function(){!0===this._isSelected&&this._toggleButton()},e.prototype._onClick=function(e){t.prototype._onClick.call(this,e),this._toggleButton()},e.prototype._toggleButton=function(){this.___get_buttonElement().classList.toggle("Selected"),this._isSelected=!this._isSelected},e}(Autotask.TitleBarButton),Autotask.Calendar=function(){"use strict";function t(t,e,i){this._calendarId=t,this._calendarOptions=e,this._importantDates=i,this._months=[],autotask.instanceManagement.__addRegistrationKey(this,t),this._calendarElements=new Autotask.CalendarElements(document.getElementById(t),this._hasDateClickPointers()),this._daysInCalendar=42}return t.prototype._calendarElement=null,t.prototype._loadingIndicatorElement=null,t.prototype._activeMonthIndex=null,t.prototype._calendarElements=null,t.prototype._calendarId=null,t.prototype._calendarOptions=null,t.prototype._dataRetrievalPointer=null,t.prototype._dateClickPointer=null,t.prototype._daysInCalendar=null,t.prototype._defaultDate=null,t.prototype._displayedDate=null,t.prototype._importantDates=null,t.prototype._months=null,t.prototype._monthBuffer=null,t.prototype.__get_dateClickPointer=function(){return this._dateClickPointer},t.prototype.__set_dateClickPointer=function(t){null===this._dateClickPointer&&(this._dateClickPointer=[]),this._dateClickPointer.push(t)},t.prototype.__get_loadedDateInformation=function(){var t=this._findStartAndEndDates(this._displayedDate);return{activeDate:this._displayedDate,startDate:t.start,endDate:t.end}},t.prototype._dateClick=function(t){if(this._hasDateClickPointers()){for(var e=t.target;"tbody"!==e.tagName.toLowerCase();)e=e.parentNode;e=e.querySelectorAll("td");for(var i=0;i<e.length;i++)if(e[i]===t.target){t.target.classList.remove("PressedState");var n=this._findCalendarDayByDateIndex(i);this._onDateClicked(n.get_date());break}}},t.prototype._dateMouseLeave=function(t){t.target.classList.remove("PressedState")},t.prototype._dateMouseDown=function(t){if(this._hasDateClickPointers()){for(var e=t.target;"tbody"!==e.tagName.toLowerCase();)e=e.parentNode;e=e.querySelectorAll("td");for(var i=0;i<e.length;i++)if(e[i]===t.target){t.target.classList.add("PressedState");break}}},t.prototype._nextClick=function(t){var e=this._calendarElements.__findRightCalendar();if(this._activeMonthIndex+1>this._months.length-1){var i=this._months[this._months.length-1],n=new Date(i.get_date());n.setMonth(n.getMonth()+1);var o=this;this._retrieveCalendarData(n,(function(t,i){o._moveToNextMonth(e,t,i),o._hideLoadingIndicator()}))}else this._moveToNextMonth(e)},t.prototype._onDateClicked=function(t){if(this._hasDateClickPointers()){for(var e=0;e<this._dateClickPointer.length;e++)this._dateClickPointer[e](t);this._determineIfCalendarIsWithinContextOverlay()&&autotask.contextOverlayManagement.__hideVisibleContextOverlays()}},t.prototype._previousClick=function(t){var e=this._calendarElements.__findLeftCalendar();if(this._activeMonthIndex-1<0){var i=this._months[0],n=new Date(i.get_date());n.setMonth(n.getMonth()-1);var o=this;this._retrieveCalendarData(n,(function(t,i){o._moveToPreviousMonth(e,t,i),o._hideLoadingIndicator()}))}else this._moveToPreviousMonth(e)},t.prototype._replaceImportantDatesIfExists=function(t){var e=null;return t instanceof Array?(this._importantDates=t,e=t):e=this._importantDates,e},t.prototype._moveToNextMonth=function(t,e,i){var n=null;if(e){var o=this._replaceImportantDatesIfExists(i);this._populateMonthData(e,o),n=this._findMedianMonthIndex()}else n=this._activeMonthIndex+1;this._fillCalendar(n,t),this._calendarElements.__slideCalendarLeft()},t.prototype._moveToPreviousMonth=function(t,e,i){var n=null;if(e){var o=this._replaceImportantDatesIfExists(i);this._populateMonthData(e,o),n=this._findMedianMonthIndex()}else n=this._activeMonthIndex-1;this._fillCalendar(n,t),this._calendarElements.__slideCalendarRight()},t.prototype.__clearDateClickPointer=function(){delete this._dateClickPointer},t.prototype.__initialize=function(){this._calendarElement=document.getElementById(this._calendarId),this._loadingIndicatorElement=this._calendarElement.querySelector(".LoadingIndicator"),this._monthBuffer=this._calendarOptions.get_monthBuffer();var t=this._calendarOptions.get_page(),e=this._calendarOptions.get_dateClickPointer();this.__set_dateClickPointer((function(i){t?t.__open(autotask.convert.__formatDateForGetRequest(i)):e&&e(i)})),this._defaultDate=this._calendarOptions.get_date();this._dataRetrievalPointer=this._calendarOptions.get_dataRetrievalPointer()},t.prototype.__finalize=function(){this.__loadDefaultDate()},t.prototype.__loadDefaultDate=function(){this.__loadDate(this._defaultDate,this._importantDates)},t.prototype.__loadDate=function(t,e){this._displayedDate=t,this._populateMonthData(t,this._replaceImportantDatesIfExists(e)),this._fillCalendar(this._findMedianMonthIndex(),this._calendarElements.__findMiddleCalendar())},t.prototype.__registerHandlers=function(){for(var t=function(t,e,i,n){for(var o=t.querySelectorAll(i),a=0;a<o.length;a++)o[a].addEventListener(e,n)},e=this._calendarElements.__findAllCalendars(),i=0;i<e.length;i++)t(e[i],"click",".CalendarNavigation > .Arrow.Right",autotask.proxy(this._nextClick,this)),t(e[i],"click",".CalendarNavigation > .Arrow.Left",autotask.proxy(this._previousClick,this)),t(e[i],"click","table.DateContainer > tbody td",autotask.proxy(this._dateClick,this)),t(e[i],"mousedown","table.DateContainer > tbody td",autotask.proxy(this._dateMouseDown,this)),t(e[i],"mouseleave","table.DateContainer > tbody td",autotask.proxy(this._dateMouseLeave,this))},t.prototype._calculateFirstDisplayedDate=function(t){var e=t.getMonth(),i=t.getFullYear(),n=new Date(i,e),o=new Date(i,e+1);o.setDate(o.getDate()-1);var a=n.getDay(),s=autotask.culture._calendarFormat.get_orderedDays().indexOf(a),r=new Date(n);return r.setDate(n.getDate()-(0===s?7:s)),r},t.prototype._calculateLastDisplayedDate=function(t){var e=this._calculateFirstDisplayedDate(t);return e.setDate(e.getDate()+this._daysInCalendar-1),e},t.prototype._createMonth=function(t,e){for(var i=this._calculateFirstDisplayedDate(t),n=t.getMonth(),o=[],a=this._convertDatesToTicks(e),s=0;s<this._daysInCalendar;s++){var r=new Autotask.CalendarDay(new Date(i));a.indexOf(r.get_date().valueOf())>=0&&r.set_important(!0),i.getMonth()!=n&&r.set_overlap(!0),o.push(r),i.setDate(i.getDate()+1)}var l=___cultureInfo.DateTimeFormat.MonthGenitiveNames[t.getMonth()]+" "+t.getFullYear();return new Autotask.CalendarMonth(l,o,t)},t.prototype._convertDatesToTicks=function(t){var e=[];if(t instanceof Array)for(var i=0;i<t.length;i++)e.push(t[i].valueOf());return e},t.prototype._determineIfCalendarIsWithinContextOverlay=function(){return autotask.contextOverlayManagement.__determineIfElementIsWithinContextOverlay(this._calendarElement)},t.prototype._fillCalendar=function(t,e){this._activeMonthIndex=t;var i=this._months[t];this._displayedDate=i.get_date(),this._calendarElements.__fillCalendar(i,e)},t.prototype._findCalendarDayByDateIndex=function(t){return this._months[this._activeMonthIndex].get_days()[t]},t.prototype._findMedianMonthIndex=function(){return Math.floor(this._months.length/2)},t.prototype._findStartAndEndDates=function(t){var e=null,i=null;if(this._monthBuffer){var n=new Date(t);n.setMonth(n.getMonth()-this._monthBuffer),e=this._calculateFirstDisplayedDate(n);var o=new Date(t);o.setMonth(o.getMonth()+this._monthBuffer),i=this._calculateLastDisplayedDate(o)}else e=this._calculateFirstDisplayedDate(t),i=this._calculateLastDisplayedDate(t);return{start:e,end:i}},t.prototype._hasDateClickPointers=function(){return this._dateClickPointer&&this._dateClickPointer.length>0},t.prototype._hideLoadingIndicator=function(){this._loadingIndicatorElement.classList.remove("Active")},t.prototype._populateMonthData=function(t,e){this._months.length=0;var i=new Date(t);if(this._monthBuffer){i.setMonth(i.getMonth()-this._monthBuffer);for(var n=2*this._monthBuffer+1,o=0;o<n;o++)this._months.push(this._createMonth(i,e)),i.setMonth(i.getMonth()+1)}else this._months.push(this._createMonth(i,e))},t.prototype._retrieveCalendarData=function(t,e){if(t.setHours(0,0,0,0),this._dataRetrievalPointer){var i=this._findStartAndEndDates(t);this._showLoadingIndicator();var n={};n.successPointer=e,n.activeDate=t,n.startDate=i.start,n.endDate=i.end,this._dataRetrievalPointer(n)}else e(t,[])},t.prototype._showLoadingIndicator=function(){this._loadingIndicatorElement.classList.add("Active")},t}(),function(){"use strict";Autotask.CalendarData=function(t){if(this._importantDateValues=[],t)for(var e=0;e<t.length;e++)this._importantDateValues.push(t[e].valueOf())},Autotask.CalendarData.prototype={_importantDateValues:null,get_importantDateValues:function(){return this._importantDateValues}}}(),function(){"use strict";Autotask.CalendarDay=function(t){this._date=t;var e=new Date;e.setHours(0,0,0,0),this._isToday=t.valueOf()==e.valueOf(),this._important=!1},Autotask.CalendarDay.prototype={_date:null,_important:null,_isToday:null,_overlap:null,get_date:function(){return this._date},get_important:function(){return this._important},set_important:function(t){this._important=t},get_isToday:function(){return this._isToday},get_overlap:function(){return this._overlap},set_overlap:function(t){this._overlap=t}}}(),function(){"use strict";Autotask.CalendarElements=function(t,e){if(this._calendarContainerElement=t,e){var i=t.querySelectorAll(".DateContainer");Array.prototype.forEach.call(i,(function(){this.classList.add("Clickable")}))}},Autotask.CalendarElements.prototype={_calendarContainerElement:null,__fillCalendar:function(t,e){e.querySelector(".Text").innerHTML=t.get_monthText();for(var i=t.get_days(),n=e.querySelectorAll("td"),o=0;o<n.length;o++){var a=n[o];i[o].get_important()?a.classList.add("Important"):a.classList.remove("Important"),i[o].get_isToday()?a.classList.add("Today"):a.classList.remove("Today"),i[o].get_overlap()?a.classList.add("Overlap"):a.classList.remove("Overlap");var s=i[o].get_date();a.innerHTML=s.getDate()}},__findAllCalendars:function(){return this._calendarContainerElement.querySelectorAll(".Calendar")},__findLeftCalendar:function(){return this._calendarContainerElement.querySelector(".Calendar.Left")},__findMiddleCalendar:function(){return this._calendarContainerElement.querySelector(".Calendar.Middle")},__findRightCalendar:function(){return this._calendarContainerElement.querySelector(".Calendar.Right")},__slideCalendarRight:function(){var t=this.__findLeftCalendar(),e=this.__findMiddleCalendar(),i=this.__findRightCalendar();e.classList.add("Slide","Right"),e.classList.remove("Middle"),t.classList.add("Slide","Middle"),t.classList.remove("Left"),i.classList.add("Staging"),i.classList.remove("Slide"),i.classList.add("Left"),i.classList.remove("Right","Staging")},__slideCalendarLeft:function(){var t=this.__findLeftCalendar(),e=this.__findMiddleCalendar(),i=this.__findRightCalendar();e.classList.add("Slide","Left"),e.classList.remove("Middle"),i.classList.add("Slide","Middle"),i.classList.remove("Right"),t.classList.add("Staging"),t.classList.remove("Slide"),t.classList.add("Right"),t.classList.remove("Left","Staging")}}}(),function(){"use strict";Autotask.CalendarMonth=function(t,e,i){this._monthText=t,this._days=e,this._date=new Date(i),this._date.setDate(1),this._date.setHours(0,0,0,0)},Autotask.CalendarMonth.prototype={_date:null,_days:null,_monthText:null,get_date:function(){return this._date},get_days:function(){return this._days},get_monthText:function(){return this._monthText}}}(),function(){"use strict";Autotask.CalendarOptions=function(t,e,i,n,o){this._dateClickPointer=e,this._dataRetrievalPointer=i instanceof Function?i:null,this._monthBuffer=n||0,this._date=o,this._page=t},Autotask.CalendarOptions.prototype={_dataRetrievalPointer:null,_date:null,_dateClickPointer:null,_monthBuffer:null,get_date:function(){return this._date},get_dateClickPointer:function(){return this._dateClickPointer},get_dataRetrievalPointer:function(){return this._dataRetrievalPointer},get_monthBuffer:function(){return this._monthBuffer},get_page:function(){return this._page}}}(),function(){"use strict";Autotask.GlobalCalendar=function(){},Autotask.GlobalCalendar.prototype={_overlay:null,_calendar:null,_selectedPointer:null,_onPositioning:function(t){var e=new Autotask.ContextOverlayDirectionPriority;return e.set_firstPriorityDirection(Autotask.ContextOverlayPositionDirection.Bottom),e.set_secondPriorityDirection(Autotask.ContextOverlayPositionDirection.Top),e.set_thirdPriorityDirection(Autotask.ContextOverlayPositionDirection.Right),t.__overridePriority(e),!0},__hide:function(){this._overlay.hide()},__initialize:function(){this._overlay=new Autotask.ContextOverlay("calendarOverlay5D75D30D92504706A949DC4DD367328A",!1),this._calendar=autotask.find("calendar5D75D30D92504706A949DC4DD367328A")},__show:function(t,e,i,n){var o=this;this._overlay.__clearHiding(),this._overlay.__clearPositioning(),this._calendar.__clearDateClickPointer(),this._calendar.__set_dateClickPointer((function(t){i(t),o._overlay.hideWithoutDelay()})),this._calendar.__loadDate(e,[e.valueOf()]),n&&this._overlay.__addHiding(n),this._overlay.__addPositioning(autotask.proxy(this._onPositioning,this)),this._overlay.show(t)}}}(),window.AutotaskDashboardSystem.AdvancePresentationDashboardRoute=function(){"use strict";function t(t){this._requestCoordinator=new Autotask.AjaxRequestCoordinator("GET",t)}return t.prototype._requestCoordinator=null,t.prototype._onResponseProcessing=function(t,e){var i=null,n=null;if(t.isAdvancingTab){var o=new Autotask.AjaxResponseHtmlAndJavaScript(t.tabHtmlAndJavaScript);i=o.htmlForInstanceTrackerContainer,n=o.script}var a=new Autotask.AjaxResponseHtmlAndJavaScript(t.titleBarHtmlAndJavaScript);e({isAdvancingTab:t.isAdvancingTab,tabHtml:i,tabId:t.tabId,tabJavaScript:n,titleBarHtml:a.htmlForInstanceTrackerContainer,titleBarJavaScript:a.script,widgetDataFilterJavaScript:t.widgetFilterDataJavaScript})},t.prototype.__advanceDashboard=function(t,e){var i=new Autotask.AjaxRequestData(t,!1).__serialize(),n=this;this._requestCoordinator.__sendRequest(i,(function(t){n._onResponseProcessing(t,e)}),null,!1,"AdvanceDashboard");return new Autotask.AjaxRequestCanceler((function(){n._requestCoordinator.__cancelRequest()}))},t}(),window.AutotaskDashboardSystem.MoveTabButtonRoute=function(){"use strict";function t(t){this._requestCoordinator=new Autotask.AjaxRequestCoordinator("POST",t)}return t.prototype._requestCoordinator=null,t.prototype._onResponseProcessing=function(t,e){e({isSuccessful:t.isSuccessful})},t.prototype.__moveTabButton=function(t,e){var i=new Autotask.AjaxRequestData(t,!0).__serialize(),n=this;this._requestCoordinator.__sendRequest(i,(function(t){n._onResponseProcessing(t,e)}),null,!0,"MoveTabButton");return new Autotask.AjaxRequestCanceler((function(){n._requestCoordinator.__cancelRequest()}))},t}(),window.AutotaskDashboardSystem.MoveWidgetRoute=function(){"use strict";function t(t){this._requestCoordinator=new Autotask.AjaxRequestCoordinator("POST",t)}return t.prototype._requestCoordinator=null,t.prototype._onResponseProcessing=function(t,e){e({isSuccessful:t.isSuccessful})},t.prototype.__moveWidgetShell=function(t,e){var i=new Autotask.AjaxRequestData(t,!0).__serialize(),n=this;this._requestCoordinator.__sendRequest(i,(function(t){n._onResponseProcessing(t,e)}),null,!0,"MoveWidgetShell");return new Autotask.AjaxRequestCanceler((function(){n._requestCoordinator.__cancelRequest()}))},t}(),window.AutotaskDashboardSystem.RefreshPreviewDashboardRoute=function(){"use strict";function t(t){this._requestCoordinator=new Autotask.AjaxRequestCoordinator("GET",t)}return t.prototype._requestCoordinator=null,t.prototype._onResponseProcessing=function(t,e){var i=null,n=null;if(t.isRefreshingTab){var o=new Autotask.AjaxResponseHtmlAndJavaScript(t.tabHtmlAndJavaScript);i=o.htmlForInstanceTrackerContainer,n=o.script}e({isRefreshingTab:t.isRefreshingTab,tabHtml:i,tabId:t.tabId,tabJavaScript:n})},t.prototype.__refreshDashboard=function(t,e){var i=new Autotask.AjaxRequestData(t,!1).__serialize(),n=this;this._requestCoordinator.__sendRequest(i,(function(t){n._onResponseProcessing(t,e)}),null,!1,"RefreshPreviewDashboard");return new Autotask.AjaxRequestCanceler((function(){n._requestCoordinator.__cancelRequest()}))},t}(),window.AutotaskDashboardSystem.RefreshStandardDashboardRoute=function(){"use strict";function t(t){this._requestCoordinator=new Autotask.AjaxRequestCoordinator("GET",t)}return t.prototype._requestCoordinator=null,t.prototype._onResponseProcessing=function(t,e){var i=null,n=null,o=null,a=null;if(t.isRefreshingTab){var s=new Autotask.AjaxResponseHtmlAndJavaScript(t.contextMenuHtmlAndJavaScript);i=s.htmlForInstanceTrackerContainer,n=s.script;var r=new Autotask.AjaxResponseHtmlAndJavaScript(t.tabHtmlAndJavaScript);o=r.htmlForInstanceTrackerContainer,a=r.script}var l=null,_=null;if(t.isRefreshingTitleBar){var u=new Autotask.AjaxResponseHtmlAndJavaScript(t.titleBarHtmlAndJavaScript);l=u.htmlForInstanceTrackerContainer,_=u.script}e({contextMenuHtml:i,contextMenuJavaScript:n,isRefreshingTab:t.isRefreshingTab,isRefreshingTitleBar:t.isRefreshingTitleBar,tabHtml:o,tabId:t.tabId,tabJavaScript:a,titleBarHtml:l,titleBarId:t.titleBarId,titleBarJavaScript:_})},t.prototype.__refreshDashboard=function(t,e){var i=new Autotask.AjaxRequestData(t,!1).__serialize(),n=this;this._requestCoordinator.__sendRequest(i,(function(t){n._onResponseProcessing(t,e)}),null,!1,"RefreshStandardDashboard");return new Autotask.AjaxRequestCanceler((function(){n._requestCoordinator.__cancelRequest()}))},t}(),window.AutotaskDashboardSystem.RefreshWidgetRoute=function(){"use strict";function t(t){this._requestCoordinator=new Autotask.AjaxRequestCoordinator("GET",t)}return t.prototype._requestCoordinator=null,t.prototype._onResponseError=function(t,e){e({errorMessage:t.get_defaultErrorMessage()})},t.prototype._onResponseProcessing=function(t,e,i){var n=new Autotask.AjaxResponseHtmlAndJavaScript(t.htmlAndJavaScript),o=new AutotaskAjaxSystem.JavaScriptParser(n.script);o.isParseSuccessful?e({html:n.htmlForInstanceTrackerContainer,javaScript:o.javaScriptExecutionDelegate,widgetId:t.widgetId,widgetWidth:t.widgetWidth,widgetHeight:t.widgetHeight}):i()},t.prototype.__refreshWidget=function(t,e,i){var n=new Autotask.AjaxRequestData(t.__data,!1).__serialize(),o=this,a=function(t){o._onResponseError(t,i)},s=new Autotask.AjaxResponseErrorEventArgs,r=function(){a(s)};this._requestCoordinator.__sendRequest(n,(function(t){o._onResponseProcessing(t,e,r)}),a,!1,"RefreshWidget");return new Autotask.AjaxRequestCanceler((function(){o._requestCoordinator.__cancelRequest()}))},t}(),window.AutotaskDashboardSystem.ReplaceDashboardRoute=function(){"use strict";function t(t){this._requestCoordinator=new Autotask.AjaxRequestCoordinator("GET",t)}return t.prototype._requestCoordinator=null,t.prototype._onResponseProcessing=function(t,e){var i=new Autotask.AjaxResponseHtmlAndJavaScript(t.htmlAndJavaScript);e({html:i.htmlForInstanceTrackerContainer,javaScript:i.script,dashboardId:t.dashboardId})},t.prototype.__replaceDashboard=function(t,e){var i=new Autotask.AjaxRequestData(t,!1).__serialize(),n=this;this._requestCoordinator.__sendRequest(i,(function(t){n._onResponseProcessing(t,e)}),null,!0,"ReplaceDashboard");return new Autotask.AjaxRequestCanceler((function(){n._requestCoordinator.__cancelRequest()}))},t}(),window.Autotask.DebugManagement=function(){"use strict";function t(){this._isDebugBuild=!1}return t.prototype._isDebugBuild=null,t.prototype.__get_isDebugBuild=function(){return this._isDebugBuild},t.prototype.__set_isDebugBuild=function(t){this._isDebugBuild=t},t.prototype.__initialize=function(){this._isDebugBuild&&(window.autotask.buttonInstanceManagement.__enableExceptionGeneration(),window.autotask.gridInstanceManagement.__enableExceptionGeneration(),window.autotask.exceptionManagement.__disableSendingExceptionToServer())},t}(),window.Autotask.ExceptionManagement=function(){"use strict";function t(){this._isSendingToServerEnabled=!0}return t.prototype._errorUrl=null,t.prototype._errorWithRedirectButtonUrl=null,t.prototype._exceptionUrl=null,t.prototype._isSendingToServerEnabled=null,t.prototype.__set_errorUrl=function(t){this._errorUrl=t},t.prototype.__set_errorWithRedirectButtonUrl=function(t){this._errorWithRedirectButtonUrl=t},t.prototype.__set_exceptionUrl=function(t){this._exceptionUrl=t},t.prototype._onException=function(t){var e=t.error;if(this._isSendingToServerEnabled){var i=new Autotask.JsonPostRoute(this._exceptionUrl),n=new AutotaskRequestDataSystem.RequestData;n.addString("message",e.message),n.addString("stack",e.stack),i.makeRequest(n,null)}},t.prototype.__disableSendingExceptionToServer=function(){this._isSendingToServerEnabled=!1},t.prototype.__initialize=function(){var t=this;autotask.exceptionEventManagement.__setHandler((function(e){t._onException(e)}))},t.prototype.__navigateToErrorPage=function(){autotask.isLandingPage?window.location=this._errorWithRedirectButtonUrl:window.location=this._errorUrl},t.prototype.__showAjaxExceptionDialog=function(t){var e=document.getElementById("DebugAjaxExceptionDialog");if(null===e)throw new Error("ExceptionManagement.prototype.__showAjaxExceptionDialog: cannot find the exception dialog html.");var i="Active";e.classList.contains(i)||(document.getElementById("DebugDialogBackgroundOverlay").classList.add(i),e.innerHTML=t,e.classList.add(i))},t}(),window.Autotask.DialogRoute=function(){"use strict";function t(t){this._requestCoordinator=new Autotask.AjaxRequestCoordinator("POST",t)}return t.prototype._requestCoordinator=null,t.prototype._onResponseProcessing=function(t,e){var i=!0===t.hasDialogBeenCreated;if(i){var n=new Autotask.AjaxResponseHtmlAndJavaScript(t.htmlJavaScriptPair);autotask.dialogManagement.__loadDialog(n)}null!==e&&e({value:null,hasDialogBeenCreated:i})},t.prototype.makeRequest=function(t,e){var i=null;null!==t&&(i=t.__data);var n=new Autotask.AjaxRequestData(i,!0).__serialize(),o=this;this._requestCoordinator.__sendRequest(n,(function(t){o._onResponseProcessing(t,e)}),null,!0,"Dialog")},t}(),window.Autotask.AlertDialog=function(){"use strict";function t(){this._queue=[]}return t.prototype._descriptionElement=null,t.prototype._dialogInstance=null,t.prototype._dialogElement=null,t.prototype._headingElement=null,t.prototype._iconElement=null,t.prototype._okayButton=null,t.prototype._okayButtonElement=null,t.prototype._okayPointer=null,t.prototype._queue=null,t.prototype._startingHeight=null,t.prototype._textElement=null,t.prototype._titleElement=null,t.prototype.get_okayPointer=function(){return this._okayPointer},t.prototype.set_okayPointer=function(t){this._okayPointer=t},t.prototype._onHideFinished=function(){this._reset(),this._queue.length>0&&(this.show(this._queue[0]),this._queue.shift())},t.prototype.show=function(t){if(this._dialogInstance.__get_isVisible())this._queue.push(t);else{this._applyOptions(t),this._dialogInstance.show();var e=AutotaskDomSystem.Other.positionOffset(this._okayButtonElement).top+this._okayButtonElement.offsetHeight-AutotaskDomSystem.Other.positionOffset(this._dialogElement).top+25;this._dialogElement.style.height=e.toString()+"px",this._dialogInstance.__alignDialog(!0),this._dialogElement.querySelector(".ScrollingContainer").scrollTop=0}},t.prototype.__initialize=function(){this._dialogInstance=autotask.find("AlertDialog"),this._dialogInstance.__addHideFinished(autotask.proxy(this._onHideFinished,this)),this._dialogElement=this._dialogInstance.__get_dialog(),this._descriptionElement=this._dialogElement.querySelector(".ScrollingContainer > .Section > .Content > .Column > .ContentContainer > .TextContainer > .StandardText:not(.HighImportance)"),this._headingElement=this._dialogElement.querySelector(".ScrollingContainer > .Section > .Content > .Column > .ContentContainer > .TextContainer > .StandardText.HighImportance"),this._iconElement=this._dialogElement.querySelector(".Icon.Decoration"),this._titleElement=this._dialogElement.querySelector(".TitleBar > .Title > .Text"),this._startingHeight=AutotaskDomSystem.Other.getComputedStyle(this._dialogElement).height,this._okayButton=autotask.find("AlertDialogOkayButton"),this._okayButtonElement=document.getElementById("AlertDialogOkayButton")},t.prototype.__okay=function(){var t=this.get_okayPointer();null!==t&&t(),this._dialogInstance.__hide(!0)},t.prototype._applyOperationTheme=function(t){var e=t.get_operation();if(e===Autotask.AlertDialogOptions.Operation.None)this._dialogElement.classList.remove("Themed");else{for(var i in Autotask.AlertDialogOptions.Operation)Autotask.AlertDialogOptions.Operation.hasOwnProperty(i)&&this._iconElement.classList.remove(i);if(null===t.get_title())switch(e){case Autotask.AlertDialogOptions.Operation.Information:this._titleElement.textContent=autotask.localizedText.alertDialogInformationTitle;break;case Autotask.AlertDialogOptions.Operation.Success:this._titleElement.textContent=autotask.localizedText.alertDialogSuccessTitle;break;default:this._titleElement.textContent=autotask.localizedText.alertDialogDefaultTitle}this._iconElement.classList.add(e),this._dialogElement.classList.add("Themed")}},t.prototype._applyOptions=function(t){if(null!==t.get_okayButtonText()?this._okayButton.set_text(t.get_okayButtonText()):this._okayButton.set_text(autotask.localizedText.okayButtonText),null!==t.__get_descriptionList()){for(;null!==this._descriptionElement.firstChild;)this._descriptionElement.removeChild(this._descriptionElement.firstChild);for(var e="<ul>",i=0;i<t.__get_descriptionList().length;i++)e+="<li>"+t.__get_descriptionList()[i]+"</li>";e+="</ul>",this._descriptionElement.innerHTML=e}else if(null!==t.get_description()){for(;null!==this._descriptionElement.firstChild;)this._descriptionElement.removeChild(this._descriptionElement.firstChild);this._descriptionElement.textContent=t.get_description()}null!==t.get_heading()&&(this._headingElement.textContent=t.get_heading()),null!==t.get_title()&&(this._titleElement.textContent=t.get_title()),this._applyOperationTheme(t),this.set_okayPointer(t.get_okayPointer())},t.prototype._reset=function(){this._dialogElement.style.height=this._startingHeight.toString()+"px",this._titleElement.textContent=autotask.localizedText.alertDialogDefaultTitle,this._headingElement.textContent=""},t}(),function(){"use strict";window.Autotask.AlertDialogOptions=function(){this._operation=Autotask.AlertDialogOptions.Operation.None},window.Autotask.AlertDialogOptions.prototype={_description:null,_descriptionList:null,_heading:null,_importantText:null,_okayButtonText:null,_okayPointer:null,_operation:null,_title:null,get_description:function(){return this._description},set_description:function(t){this._description=t},get_heading:function(){return this._heading},set_heading:function(t){this._heading=t},get_okayButtonText:function(){return this._okayButtonText},set_okayButtonText:function(t){this._okayButtonText=t},get_okayPointer:function(){return this._okayPointer},set_okayPointer:function(t){this._okayPointer=t},get_operation:function(){return this._operation},set_operation:function(t){this._operation=t},get_title:function(){return this._title},set_title:function(t){this._title=t},__get_descriptionList:function(){return this._descriptionList},__set_descriptionList:function(t){this._descriptionList=t}},window.Autotask.AlertDialogOptions.Operation={None:"None",Information:"Information",Success:"Success"}}(),function(){"use strict";Autotask.ChooseFiltersDialog=function(){},Autotask.ChooseFiltersDialog.prototype={_dialogInstance:null,_saveUrl:null,_successHandler:null,_onSubmitting:function(t){t.add("model",this._dialogInstance.generateFieldData())},initialize:function(){this._dialogInstance.addSubmitting(autotask.proxy(this._onSubmitting,this))},saveAndClose:function(){this._dialogInstance.deprecatedAjaxSubmit(this._saveUrl,autotask.proxy(this._onSaveAndCloseSuccess,this))},setSuccessHandler:function(t){this._successHandler=t},_onSaveAndCloseSuccess:function(t){t.validationFailure||(this._dialogInstance.hide(),null!==this._successHandler&&this._successHandler())}}}(),function(){"use strict";Autotask.ColumnArrangementDialog=function(){},Autotask.ColumnArrangementDialog.prototype={_dialog:null,_grid:null,_listMover:null,_maximumColumnCount:null,_saveButton:null,_validationMessage:null,cancel:function(t){this._dialog.hide()},initialize:function(){this._listMover.addImmediateChange(autotask.proxy(this._listMoverImmediateChangeHandler,this)),this._validate()},reset:function(t){var e=this._grid.__get_id(),i=new Autotask.GridChangeState(e);i.__set_resetToDefault(!0);this._grid.__refresh(i,!1,true,true,null),this._dialog.hide()},save:function(t){if(this._validate()){for(var e=new Autotask.GridChangeState(this._grid.__get_id()),i=this._listMover.get_values(),n=0;n<i.length;n++)e.__addColumnToShow(i[n]);this._grid.__arrangeColumns(e),this._dialog.hide()}},_listMoverImmediateChangeHandler:function(){this._validate()},_validate:function(){var t=null===this._listMover.get_values()||this._listMover.get_values().length<=this._maximumColumnCount;return t?(this._dialog.get_customValidationSummary().clearMessages(),this._saveButton.set_enabled(!0)):(this._dialog.get_customValidationSummary().get_hasValidationFailure()||this._dialog.get_customValidationSummary().addMessage("key",this._validationMessage),this._saveButton.set_enabled(!1)),t}}}(),window.Autotask.ConfirmationDialog=function(){"use strict";function t(){this._queue=[]}return t.prototype._confirmButton=null,t.prototype._confirmPointer=null,t.prototype._denyButton=null,t.prototype._denyButtonElement=null,t.prototype._denyPointer=null,t.prototype._descriptionElement=null,t.prototype._dialogInstance=null,t.prototype._dialogElement=null,t.prototype._headingElement=null,t.prototype._iconElement=null,t.prototype._hideExecuted=null,t.prototype._queue=null,t.prototype._startingHeight=null,t.prototype._titleElement=null,t.prototype.get_confirmPointer=function(){return this._confirmPointer},t.prototype.set_confirmPointer=function(t){this._confirmPointer=t},t.prototype.get_denyPointer=function(){return this._denyPointer},t.prototype.set_denyPointer=function(t){this._denyPointer=t},t.prototype._onHideFinished=function(){this._reset(),this._queue.length>0&&(this.show(this._queue[0]),this._queue.shift())},t.prototype.show=function(t){if(this._dialogInstance.__get_isVisible())this._queue.push(t);else{this._applyOptions(t),this._dialogInstance.show();var e=AutotaskDomSystem.Other.positionOffset(this._denyButtonElement).top+this._denyButtonElement.offsetHeight-AutotaskDomSystem.Other.positionOffset(this._dialogElement).top+25;this._dialogElement.style.height=e.toString()+"px",this._dialogInstance.__alignDialog(!0),this._dialogElement.querySelector(".ScrollingContainer").scrollTop=0}},t.prototype.__confirm=function(){var t=this.get_confirmPointer();null!==t&&t(),this._dialogInstance.__hide(!0)},t.prototype.__deny=function(){this._dialogInstance.hide()},t.prototype.__hide=function(){var t=this.get_denyPointer();null!==t&&t()},t.prototype.__initialize=function(){this._dialogInstance=autotask.find("ConfirmationDialog"),this._dialogInstance.__addHideFinished(autotask.proxy(this._onHideFinished,this)),this._dialogElement=this._dialogInstance.__get_dialog(),this._descriptionElement=this._dialogElement.querySelector(".ScrollingContainer > .Section > .Content > .Column > .ContentContainer > .TextContainer > .StandardText:not(.HighImportance)"),this._headingElement=this._dialogElement.querySelector(".ScrollingContainer > .Section > .Content > .Column > .ContentContainer > .TextContainer > .StandardText.HighImportance"),this._iconElement=this._dialogElement.querySelector(".Icon.Decoration"),this._titleElement=this._dialogElement.querySelector(".TitleBar > .Title > .Text"),this._startingHeight=AutotaskDomSystem.Other.getComputedStyle(this._dialogElement).height,this._confirmButton=autotask.find("ConfirmationDialogYesButton"),this._denyButton=autotask.find("ConfirmationDialogNoButton"),this._denyButtonElement=document.getElementById("ConfirmationDialogNoButton")},t.prototype._applyOperationTheme=function(t){var e=t.get_operation();if(e===Autotask.ConfirmationDialogOptions.Operation.None)this._dialogElement.classList.remove("Themed");else{for(var i in Autotask.ConfirmationDialogOptions.Operation)Autotask.ConfirmationDialogOptions.Operation.hasOwnProperty(i)&&this._iconElement.classList.remove(i);if(null===t.get_title())switch(e){case Autotask.ConfirmationDialogOptions.Operation.Confirmation:this._titleElement.textContent=autotask.localizedText.confirmationDialogConfirmationTitle;break;case Autotask.ConfirmationDialogOptions.Operation.Warning:this._titleElement.textContent=autotask.localizedText.confirmationDialogWarningTitle;break;default:this._titleElement.textContent=autotask.localizedText.confirmationDialogDefaultTitle}this._iconElement.classList.add(e),this._dialogElement.classList.add("Themed")}},t.prototype._applyOptions=function(t){null!==t.get_confirmButtonText()?this._confirmButton.set_text(t.get_confirmButtonText()):this._confirmButton.set_text(autotask.localizedText.confirmButtonText),null!==t.get_denyButtonText()?this._denyButton.set_text(t.get_denyButtonText()):this._denyButton.set_text(autotask.localizedText.denyButtonText),null!==t.get_description()?this._descriptionElement.textContent=t.get_description():this._descriptionElement.textContent="",null!==t.get_heading()?this._headingElement.textContent=t.get_heading():this._headingElement.textContent="",null!==t.get_title()?this._titleElement.textContent=t.get_title():this._titleElement.textContent=autotask.localizedText.confirmationDialogDefaultTitle,this._applyOperationTheme(t),this.set_confirmPointer(t.get_confirmPointer()),this.set_denyPointer(t.get_denyPointer())},t.prototype._reset=function(){this._dialogElement.style.height=this._startingHeight.toString()+"px",this._titleElement.textContent=autotask.localizedText.confirmationDialogDefaultTitle,this._headingElement.textContent=""},t}(),function(){"use strict";window.Autotask.ConfirmationDialogOptions=function(){this._operation=Autotask.ConfirmationDialogOptions.Operation.None},window.Autotask.ConfirmationDialogOptions.prototype={_confirmButtonText:null,_confirmPointer:null,_denyButtonText:null,_denyPointer:null,_description:null,_heading:null,_operation:null,_question:null,_title:null,get_confirmButtonText:function(){return this._confirmButtonText},set_confirmButtonText:function(t){this._confirmButtonText=t},get_confirmPointer:function(){return this._confirmPointer},set_confirmPointer:function(t){this._confirmPointer=t},get_denyButtonText:function(){return this._denyButtonText},set_denyButtonText:function(t){this._denyButtonText=t},get_denyPointer:function(){return this._denyPointer},set_denyPointer:function(t){this._denyPointer=t},get_description:function(){return this._description},set_description:function(t){this._description=t},get_heading:function(){return this._heading},set_heading:function(t){this._heading=t},get_operation:function(){return this._operation},set_operation:function(t){this._operation=t},get_title:function(){return this._title},set_title:function(t){this._title=t}},window.Autotask.ConfirmationDialogOptions.Operation={None:"None",Confirmation:"Confirmation",Warning:"Warning"}}(),window.Autotask.Dialog=function(t){"use strict";function e(e,i,n){t.call(this,e,i),this._fieldContainer=document.getElementById(n),this._immutableData=[],this._submittingPointers=[]}return autotask.inherit(e,t),e.prototype._fieldContainer=null,e.prototype._fieldValidation=null,e.prototype._immutableData=null,e.prototype._notificationSlideOut=null,e.prototype._submittingPointers=null,e.prototype.addSubmitting=function(t){this._submittingPointers.push(t)},e.prototype.ajaxSubmit=function(t,e){if(this.validate()){var i=new AutotaskAjaxSystem.SubmittingEventArgs;this._submitting(i);var n=i.requestData;if(null!==this._notificationSlideOut){var o=this._notificationSlideOut.get_panel();n.addFieldData(o.__get_postingModelParameterName(),o.__createSerializedRequestData())}var a=new Autotask.SubmitRoute(t),s=this.get_customValidationSummary();a.makeRequest(n,(function(t){s.clearMessages();for(var i=0;i<t.customValidationMessages.length;i++)s.addMessage(i.toString(),t.customValidationMessages[i]);var n={};n.validationFailure=t.customValidationMessages.length>0,n.responseData=t.responseData,e(n)}))}},e.prototype.deprecatedAjaxSubmit=function(t,e){if(this.validate()){var i=new Autotask.DialogSubmittingEventArgs;this._submitting(i);var n=i.__get_data(),o=this.get_customValidationSummary();if(null!==this._notificationSlideOut){var a=this._notificationSlideOut.get_panel();n[a.__get_postingModelParameterName()]=a.__createSerializedRequestData()}autotask.ajax.__restrictedPostRequest(t,n,e).__deprecatedSubmit(o)}},e.prototype.generateFieldData=function(){for(var t=[this._fieldContainer],e=new AutotaskRequestDataSystem.SerializedRequestData(t),i=0;i<this._immutableData.length;i++)e.__addImmutableData(this._immutableData[i]);return e},e.prototype.validate=function(){return this._validate(!1)},e.prototype.validateEditor=function(t){return"function"==typeof t.validate?t.validate():this._fieldValidation.__validateLegacyEditor(t.__get_id(),!1)},e.prototype.__addImmutableData=function(t){this._immutableData.push(t)},e.prototype.__setNotificationSlideOut=function(t){this._notificationSlideOut=t},e.prototype.__finalize=function(){this._fieldValidation.__parse()},e.prototype.__initialize=function(){t.prototype.__initialize.call(this),this.___get_validationSummary().__addValidationFailed(autotask.proxy(this._validationFailedHandler,this)),this._fieldValidation=new Autotask.PostedContainerValidation(this._fieldContainer),this._fieldValidation.__registerValidationSummary(this.___get_validationSummary())},e.prototype.__resetValidation=function(){this._fieldValidation.__reset(),this.___get_validationSummary().__get_isActive()&&this._validate(!0)},e.prototype._submitting=function(t){for(var e=0;e<this._submittingPointers.length;e++)this._submittingPointers[e](t)},e.prototype._validate=function(t){var e=this._fieldValidation.__validate();return e||this._fieldValidation.__validationFailed(),this._fieldValidation.__validationCompleted(e,t),e},e.prototype._validationFailedHandler=function(){null!==this._notificationSlideOut&&this._notificationSlideOut.hide()},e}(Autotask.ValidatingDialog),Autotask.DialogManagement=function(){"use strict";function t(){this._minimizedDialogs=0;var t=this;this._mouseMoveListener=function(e){t._windowMouseMoveListener(e)},this._mouseUpListener=function(e){t._windowMouseUpListener(e)}}return t.prototype._isMinimizedDialogDraggingEnabled=null,t.prototype._minimizedDialogs=null,t.prototype._minimizedDialogContainer=null,t.prototype._mouseMoveListener=null,t.prototype._mouseUpListener=null,t.prototype._mousePosition=null,t.prototype.maximizeDialog=function(){if(this._minimizedDialogs>0){var t=this._minimizedDialogContainer.querySelector("div[data-minimized-dialog-id]").dataset.minimizedDialogId;autotask.find(t).maximize()}},t.prototype.__closeDialog=function(t){var e=t.target.closest(".Dialog2").getAttribute("id"),i=autotask.find(e);void 0!==i.close?i.close():i.hide()},t.prototype.__loadDialog=function(t){var e=this._appendHtmlToBody(t.htmlForInstanceTrackerContainer).getAttribute("id"),i=this._appendHtmlToBody(t.deferredHtml),n=new Autotask.InstanceTracker(e,null);n.__clearInstancesAndLoadScript(t.script);var o=autotask.find(e);if(void 0!==o.__set_registeredHtml)o.__set_registeredHtml(i),o.__turnOffPersistence(n),o.show();else{o.addClosedHandler((function(){null!==i&&i.remove(),n.__dispose()})),o.open()}},t.prototype.__addMinimizedBar=function(t,e){var i=this._createMinimizedBar(t,e);0===this._minimizedDialogs?(this._minimizedDialogContainer=document.createElement("div"),this._minimizedDialogContainer.className="MinimizedDialogContainer",document.body.appendChild(this._minimizedDialogContainer),this._minimizedDialogContainer.appendChild(i)):this._minimizedDialogContainer.insertBefore(i,this._minimizedDialogContainer.firstElementChild),this._minimizedDialogs++},t.prototype.__removeMinimizedBar=function(t){var e=this._minimizedDialogContainer.querySelector('div[data-minimized-dialog-id="'+t.id+'"]');e.parentNode.removeChild(e),this._minimizedDialogs--,0===this._minimizedDialogs&&(this._minimizedDialogContainer.parentNode.removeChild(this._minimizedDialogContainer),this._minimizedDialogContainer=null)},t.prototype._createMinimizedBar=function(t,e){var i=document.createElement("div");i.setAttribute("data-minimized-dialog-id",t.id),i.className="MinimizedDialogBar";var n=this,o=document.createElement("div");o.className="Grip",o.addEventListener("mousedown",(function(t){n._minimizedBarMouseDown(t)})),i.appendChild(o);var a=document.createElement("div");if(a.className="Text",a.textContent=t.getTitleText(),a.addEventListener("mousedown",(function(t){n._minimizedBarMouseDown(t)})),i.appendChild(a),e){var s=this._createMinimizedBarButton("PopOut");s.addEventListener("click",(function(){t.popOut()})),i.appendChild(s)}var r=this._createMinimizedBarButton("Maximize");r.addEventListener("click",(function(){t.maximize()})),i.appendChild(r);var l=this._createMinimizedBarButton("Close");return l.addEventListener("click",(function(){t.closeEmulatingCloseButtonClick()})),i.appendChild(l),i},t.prototype._minimizedBarMouseDown=function(t){this._isMinimizedDialogDraggingEnabled||(t.stopPropagation(),t.preventDefault(),window.addEventListener("mousemove",this._mouseMoveListener),window.addEventListener("mouseup",this._mouseUpListener),this._isMinimizedDialogDraggingEnabled=!0)},t.prototype._windowMouseUpListener=function(){this._isMinimizedDialogDraggingEnabled&&(window.removeEventListener("mousemove",this._mouseMoveListener),window.removeEventListener("mouseup",this._mouseUpListener),this._isMinimizedDialogDraggingEnabled=!1,this._mousePosition=null)},t.prototype._windowMouseMoveListener=function(t){t.stopPropagation(),t.preventDefault();var e=window.innerWidth,i=t.pageX,n=null,o=this._minimizedDialogContainer.getBoundingClientRect(),a=o.left;null!==this._mousePosition&&((n=a+i-this._mousePosition)<=26?n=26:n>=e-o.width-26&&(n=e-o.width-26),n!==a&&(this._minimizedDialogContainer.style.left=n+"px",this._minimizedDialogContainer.style.right="auto")),this._mousePosition=i},t.prototype._createMinimizedBarButton=function(t){var e=document.createElement("div");e.classList.add("MinimizedDialogBarIcon"),e.classList.add(t);var i=document.createElement("div");return i.className="MinimizedBarButton",i.appendChild(e),i},t.prototype._appendHtmlToBody=function(t){var e=null;null!==t&&(document.body.insertAdjacentHTML("beforeend",t),e=document.body.lastElementChild);return e},t}(),window.Autotask.DialogSubmittingEventArgs=function(){"use strict";function t(){this._data={},this._hasLegacyData=!1,this._hasRequestData=!1}return t.prototype._data=null,t.prototype._hasLegacyData=null,t.prototype._hasRequestData=null,t.prototype.__get_data=function(){return this._data},t.prototype.add=function(t,e){"string"!=typeof t&&window.autotask.throwException("When adding key/value pairs to StandardDialogSubmittingEventArgs, the key must be a string."),this._hasRequestData&&window.autotask.throwException("Do not use legacy data and request data simultaneously."),this._hasLegacyData=!0,this._data[t]=e},t.prototype.addRequestData=function(t){this._hasLegacyData&&window.autotask.throwException("Do not use legacy data and request data simultaneously."),this._hasRequestData=!0,this._data=t.__data},t}(),function(){"use strict";Autotask.FormTemplateSearchDialog=function(){},Autotask.FormTemplateSearchDialog.prototype={_formTemplateSelectorToken:null,_gridFormTemplateInstance:null,_searchDialogInstance:null,_stateChangeParameterName:null,_stateChangeParameterValue:null,_onRowClick:function(t){this._searchDialogInstance.hide();var e=autotask.formTemplateManagement.findSelectorId(this._formTemplateSelectorToken);autotask.find(e).__setSelectionFromDialog(t.get_keyFieldValue())},_onStateChanging:function(t){t.add(this._stateChangeParameterName,this._stateChangeParameterValue)},initialize:function(){this._gridFormTemplateInstance.addRowClick(autotask.proxy(this._onRowClick,this)),null!==this._stateChangeParameterName&&this._gridFormTemplateInstance.addStateChanging(autotask.proxy(this._onStateChanging,this))}}}(),window.Autotask.GridDialog=function(t){"use strict";function e(e,i,n,o){t.call(this,e,n),this._gridId=i,null!==o&&(this._fieldContainer=document.getElementById(o)),this._submittingPointers=[]}return autotask.inherit(e,t),e.prototype._fieldContainer=null,e.prototype._grid=null,e.prototype._gridId=null,e.prototype._submittingPointers=null,e.prototype.addSubmitting=function(t){this._submittingPointers.push(t)},e.prototype.ajaxSubmit=function(t,e){var i=new AutotaskAjaxSystem.SubmittingEventArgs;this._submitting(i);var n=i.requestData,o=new Autotask.SubmitRoute(t),a=this.get_customValidationSummary();o.makeRequest(n,(function(t){a.clearMessages();for(var i=0;i<t.customValidationMessages.length;i++)a.addMessage(i.toString(),t.customValidationMessages[i]);var n={};n.validationFailure=t.customValidationMessages.length>0,n.responseData=t.responseData,e(n)}))},e.prototype.deprecatedAjaxSubmit=function(t,e){var i=new Autotask.DialogSubmittingEventArgs;this._submitting(i);var n=i.__get_data(),o=this.get_customValidationSummary();autotask.ajax.__restrictedPostRequest(t,n,e).__deprecatedSubmit(o)},e.prototype.generateFieldData=function(){var t=[];return null!==this._fieldContainer&&t.push(this._fieldContainer),new AutotaskRequestDataSystem.SerializedRequestData(t)},e.prototype.__initialize=function(){t.prototype.__initialize.call(this),this._grid=autotask.find(this._gridId)},e.prototype._submitting=function(t){for(var e=0;e<this._submittingPointers.length;e++)this._submittingPointers[e](t)},e}(Autotask.ValidatingDialog),window.Autotask.GridDialogFacade=function(){"use strict";function t(t,e,i,n,o){autotask.instanceManagement.__addRegistrationKey(this,t),this._backingDialogId=e,this._fieldContainer=document.getElementById(i),this._gridId=n,this._helpPageBehavior=o,this._immutableData=[],this._submittingPointers=[];var a=document.getElementById(e).firstElementChild.firstElementChild;this._validationSummaryElement=a.firstElementChild.nextElementSibling}return t.prototype._backingDialog=null,t.prototype._backingDialogId=null,t.prototype._fieldContainer=null,t.prototype._fieldValidation=null,t.prototype._helpPageBehavior=null,t.prototype._grid=null,t.prototype._gridId=null,t.prototype._immutableData=null,t.prototype._notificationSlideOut=null,t.prototype._submittingPointers=null,t.prototype._validationSummary=null,t.prototype._validationSummaryElement=null,t.prototype.hide=function(){this._backingDialog.close()},t.prototype.get_customValidationSummary=function(){return this._validationSummary.__get_customValidationSummary()},t.prototype.___get_validationSummary=function(){return this._validationSummary},t.prototype.addSubmitting=function(t){this._submittingPointers.push(t)},t.prototype.ajaxSubmit=function(t,e){if(this.validate()){var i=new AutotaskAjaxSystem.SubmittingEventArgs;this._submitting(i);var n=i.requestData;if(null!==this._notificationSlideOut){var o=this._notificationSlideOut.get_panel();n.addFieldData(o.__get_postingModelParameterName(),o.__createSerializedRequestData())}var a=new Autotask.SubmitRoute(t),s=this.get_customValidationSummary();a.makeRequest(n,(function(t){s.clearMessages();for(var i=0;i<t.customValidationMessages.length;i++)s.addMessage(i.toString(),t.customValidationMessages[i]);var n={};n.validationFailure=t.customValidationMessages.length>0,n.responseData=t.responseData,e(n)}))}},t.prototype.deprecatedAjaxSubmit=function(t,e){if(this.validate()){var i=new Autotask.DialogSubmittingEventArgs;this._submitting(i);var n=i.__get_data(),o=this.get_customValidationSummary();if(null!==this._notificationSlideOut){var a=this._notificationSlideOut.get_panel();n[a.__get_postingModelParameterName()]=a.__createSerializedRequestData()}autotask.ajax.__restrictedPostRequest(t,n,e).__deprecatedSubmit(o)}},t.prototype.generateFieldData=function(){for(var t=[this._fieldContainer],e=new AutotaskRequestDataSystem.SerializedRequestData(t),i=0;i<this._immutableData.length;i++)e.__addImmutableData(this._immutableData[i]);return e},t.prototype.validate=function(){return this._validate(!1)},t.prototype.validateEditor=function(t){return"function"==typeof t.validate?t.validate():this._fieldValidation.__validateLegacyEditor(t.__get_id(),!1)},t.prototype.__addImmutableData=function(t){this._immutableData.push(t)},t.prototype.__setNotificationSlideOut=function(t){this._notificationSlideOut=t},t.prototype.__finalize=function(){this._fieldValidation.__parse()},t.prototype.__initialize=function(){var t=this;this._backingDialog=autotask.find(this._backingDialogId),this._backingDialog._addResetValidationHandler((function(){t.__resetValidation()})),this._backingDialog.set_helpButtonClickedHandler((function(){t._helpButtonClicked()})),this._validationSummary=autotask.find(this._validationSummaryElement.id),this._validationSummary.__addValidationFailed(autotask.proxy(this._validationFailedHandler,this)),this._fieldValidation=new Autotask.PostedContainerValidation(this._fieldContainer),this._fieldValidation.__registerValidationSummary(this._validationSummary),this._grid=autotask.find(this._gridId)},t.prototype.__resetValidation=function(){this._fieldValidation.__reset(),this._validationSummary.__get_isActive()&&this._validate(!0)},t.prototype._helpButtonClicked=function(){this._helpPageBehavior.open(null)},t.prototype._submitting=function(t){for(var e=0;e<this._submittingPointers.length;e++)this._submittingPointers[e](t)},t.prototype._validate=function(t){var e=this._fieldValidation.__validate();return e||this._fieldValidation.__validationFailed(),this._fieldValidation.__validationCompleted(e,t),e},t.prototype._validationFailedHandler=function(){null!==this._notificationSlideOut&&this._notificationSlideOut.hide()},t}(),Autotask.ImageUploadDialog=function(t){"use strict";function e(e,i,n,o,a,s){t.call(this,e,i,n,null),this._dialogId=e,this._fileBoxId=o,this._htmlEditorId=a,this._uploadId=s,this._streamUrl=new Autotask.Url("/autotask/StreamTemporaryFile.aspx")}return autotask.inherit(e,t),e.prototype._dialogInstance=null,e.prototype._dialogId=null,e.prototype._fileBox=null,e.prototype._fileBoxId=null,e.prototype._htmlEditor=null,e.prototype._htmlEditorId=null,e.prototype._streamUrl=null,e.prototype._uploadId=null,e.prototype._onFileBoxChange=function(){this.validate()&&this._fileBox.uploadFile(this._uploadId)},e.prototype.onUploadCancel=function(){},e.prototype.onUploadComplete=function(){var t=this._streamUrl.toString({id:this._uploadId});this._htmlEditor.__insertTemporaryImage(t,this._uploadId),this._dialogInstance.hide()},e.prototype.onUploadFail=function(){autotask.throwException("Image upload failed.")},e.prototype.__initialize=function(){t.prototype.__initialize.call(this),this._dialogInstance=autotask.find(this._dialogId),this._fileBox=autotask.find(this._fileBoxId),this._htmlEditor=autotask.find(this._htmlEditorId),this._fileBox.addChange(autotask.proxy(this._onFileBoxChange,this))},e}(Autotask.Dialog),window.Autotask.InternalRecipientSelectionDialog=function(t){function e(e,i,n,o,a,s,r){t.call(this,e,i,n,o),this._selectedRowKeys=a,this._chipList=s,this._chipInformationRowAccessoryKey=r}return autotask.inherit(e,t),e.prototype._chipInformationRowAccessoryKey=null,e.prototype._chipList=null,e.prototype._selectedHandler=null,e.prototype._selectedRowKeys=null,e.prototype.get_selectedValues=function(){return this._chipList.values},e.prototype.___get_chipList=function(){return this._chipList},e.prototype.___addRowKeys=function(t){for(var e,i=0;i<t.length;i++)null===(e=this.___get_grid().getAccessoryDataValue(t[i],this._chipInformationRowAccessoryKey))&&autotask.throwException("Unexpected row key."),this._chipList.insert(e)},e.prototype.___clearSelections=function(){this._chipList.clear()},e.prototype.___findRowKey=function(t){for(var e=null,i=null,n=0;n<this._chipList.values.length;n++)if(AutotaskItemSelectionSystem.ItemValueComparer.equals(t,this._chipList.values[n])){i=n;break}return null!==i&&(e=this.___get_grid().get_values()[i]),e},e.prototype.___raiseSelectedEvent=function(){if(null!==this._selectedHandler){var t=new AutotaskMultipleDataSelector.DialogSelectedEventArgs(this._chipList.chipInformation);this._selectedHandler(t)}},e.prototype.___removeRowKeys=function(t){for(var e,i=0;i<t.length;i++)null===(e=this.___get_grid().getAccessoryDataValue(t[i],this._chipInformationRowAccessoryKey))&&autotask.throwException("Unexpected row key."),this._chipList.removeByValue(e.value)},e.prototype.__configure=function(t,e,i){this._selectedHandler=t,this.___enableMaximumSelection(e,i),this._grid.selectValues(this._selectedRowKeys)},e}(Autotask.MultipleItemSelectionDialog),Autotask.InternetExplorerImageUploadPage=function(t){"use strict";function e(e,i,n,o,a,s,r){t.call(this,e,i,null),this._insertButtonId=n,this._fileBoxId=o,this._uploadId=a,this._saveMethodName=s,this._focusMessageText=r,this._isFileUploaded=!1,this._streamUrl=new Autotask.Url("/autotask/StreamTemporaryFile.aspx")}return autotask.inherit(e,t),e.prototype._fileBox=null,e.prototype._fileBoxId=null,e.prototype._focusMessageText=null,e.prototype._insertButton=null,e.prototype._insertButtonId=null,e.prototype._isFileUploaded=null,e.prototype._saveMethodName=null,e.prototype._streamUrl=null,e.prototype._uploadId=null,e.prototype._onFileBoxChange=function(){var t=null!==this._fileBox.get_value()&&this.validate();this._insertButton.set_enabled(t)},e.prototype.onCancelClick=function(){window.close()},e.prototype.onInsertClick=function(){this._isFileUploaded?this._insertImage():this._fileBox.uploadFile(this._uploadId)},e.prototype.onUploadCancel=function(){},e.prototype.onUploadComplete=function(){this._isFileUploaded=!0,this._insertImage()},e.prototype.onUploadFail=function(){autotask.throwException("Image upload failed.")},e.prototype.__initialize=function(){t.prototype.__initialize.call(this),this._insertButton=autotask.find(this._insertButtonId),this._fileBox=autotask.find(this._fileBoxId),this._fileBox.addChange(autotask.proxy(this._onFileBoxChange,this))},e.prototype._insertImage=function(){var t=this._streamUrl.toString({id:this._uploadId});if(window.opener&&window.opener[this._saveMethodName])if(window.opener[this._saveMethodName](t,this._uploadId))window.close();else{this._fileBox.set_enabled(!1);var e=new Autotask.AlertDialogOptions;e.set_description(this._focusMessageText),e.set_operation(Autotask.AlertDialogOptions.Operation.Information),autotask.alertDialog.show(e)}},e}(Autotask.Page),window.Autotask.MultipleDataSelectionDialog=function(t){function e(e,i,n,o,a,s,r){t.call(this,e,i,n,o),a.length!==s.values.length&&autotask.throwException("Unexpected multiple data selection dialog construction."),this._selectedRowKeys=a,this._chipList=s,this._chipInformationRowAccessoryKey=r}return autotask.inherit(e,t),e.prototype._chipInformationRowAccessoryKey=null,e.prototype._chipList=null,e.prototype._selectedHandler=null,e.prototype._selectedRowKeys=null,e.prototype.get_selectedValues=function(){return this._chipList.values},e.prototype.___get_chipList=function(){return this._chipList},e.prototype.___addRowKeys=function(t){for(var e,i=0;i<t.length;i++)null===(e=this.___get_grid().getAccessoryDataValue(t[i],this._chipInformationRowAccessoryKey))&&autotask.throwException("Unexpected row key."),this._chipList.insert(e)},e.prototype.___clearSelections=function(){this._chipList.clear()},e.prototype.___findRowKey=function(t){for(var e=null,i=null,n=0;n<this._chipList.values.length;n++)if(AutotaskItemSelectionSystem.ItemValueComparer.equals(t,this._chipList.values[n])){i=n;break}return null!==i&&(e=this.___get_grid().get_values()[i]),e},e.prototype.___raiseSelectedEvent=function(){if(null!==this._selectedHandler){var t=new AutotaskMultipleDataSelector.DialogSelectedEventArgs(this._chipList.chipInformation);this._selectedHandler(t)}},e.prototype.___removeRowKeys=function(t){for(var e,i=0;i<t.length;i++)null===(e=this.___get_grid().getAccessoryDataValue(t[i],this._chipInformationRowAccessoryKey))&&autotask.throwException("Unexpected row key."),this._chipList.removeByValue(e.value)},e.prototype.__configure=function(t,e,i,n){this._selectedHandler=t,this._chipList.defaultContextOverlayRoute=e,this.___enableMaximumSelection(i,n),this._grid.selectValues(this._selectedRowKeys)},e}(Autotask.MultipleItemSelectionDialog),window.Autotask.MultipleTagSelectionDialog=function(t){function e(e,i,n,o,a,s){t.call(this,e,i,n,o,[]),this._chipList=a,this._chipInformationRowAccessoryKey=s}return autotask.inherit(e,t),e.prototype._chipInformationRowAccessoryKey=null,e.prototype._chipList=null,e.prototype._selectedHandler=null,e.prototype.get_selectedValues=function(){return this._chipList.value},e.prototype.___get_chipList=function(){return this._chipList},e.prototype.___addRowKeys=function(t){for(var e,i=0;i<t.length;i++)null===(e=this.___get_grid().getAccessoryDataValue(t[i],this._chipInformationRowAccessoryKey))&&autotask.throwException("Unexpected row key."),this._chipList.insert(e)},e.prototype.___clearSelections=function(){this._chipList.clear()},e.prototype.___findRowKey=function(t){for(var e=null,i=null,n=0;n<this._chipList.value.length;n++)if(AutotaskItemSelectionSystem.ItemValueComparer.equals(t,this._chipList.value[n])){i=n;break}return null!==i&&(e=this.___get_grid().get_values()[i]),e},e.prototype.___raiseSelectedEvent=function(){if(null!==this._selectedHandler){var t=new AutotaskMultipleDataSelector.DialogSelectedEventArgs(this._chipList.chipInformation);this._selectedHandler(t)}},e.prototype.___removeRowKeys=function(t){for(var e,i=0;i<t.length;i++)null===(e=this.___get_grid().getAccessoryDataValue(t[i],this._chipInformationRowAccessoryKey))&&autotask.throwException("Unexpected row key."),this._chipList.removeByValue(e.itemValue)},e.prototype.__configure=function(t,e,i){this._selectedHandler=t,this.___enableMaximumSelection(e,i)},e}(Autotask.MultipleItemSelectionDialog),window.Autotask.PrintPreviewDialog=function(t){"use strict";function e(e,i,n,o,a){t.call(this,e,i,n,null),this._inlineframe=document.getElementById(o),this._inlineframe.addEventListener("load",autotask.proxy(this._inlineframeLoaded,this),!0),this._defaultUrl=a,this._refreshingPointers=[],this._successPointer=null}return autotask.inherit(e,t),e.prototype._inlineframe=null,e.prototype._refreshingPointers=null,e.prototype._successPointer=null,e.prototype._defaultUrl=null,e.prototype._inlineframeLoaded=function(){this._resizeInlineFrame(),autotask.overlayManagement.__hideLoadingIndicator(),null!==this._successPointer&&this._successPointer()},e.prototype.addRefreshingHandler=function(t){this._refreshingPointers.push(t)},e.prototype.print=function(){autotask.browserDetection.isInternetExplorer()?this._inlineframe.contentWindow.document.execCommand("print",!1,null):this._inlineframe.contentWindow.print(),this._resizeInlineFrame()},e.prototype.refreshPreview=function(t,e){if(this.validate()){this._successPointer=e,autotask.overlayManagement.__showLoadingIndicator();var i=new AutotaskAjaxSystem.SubmittingEventArgs;this._onRefreshing(i);var n=i.requestData,o=new RetrievePrintPreviewUrlRoute(t),a=this;o.makeRequest(n,(function(t){var e=a.get_customValidationSummary();e.clearMessages();for(var i=0;i<t.customValidationMessages.length;i++)e.addMessage(i.toString(),t.customValidationMessages[i]);0===t.customValidationMessages.length&&(a._inlineframe.src=t.url)}))}},e.prototype.__initialize=function(){t.prototype.__initialize.call(this),autotask.overlayManagement.__showLoadingIndicator(),this._inlineframe.src=this._defaultUrl},e.prototype._onRefreshing=function(t){for(var e=0;e<this._refreshingPointers.length;e++)this._refreshingPointers[e](t)},e.prototype._resizeInlineFrame=function(){this._inlineframe.style.height=null,this._inlineframe.style.width=null,this._inlineframe.style.height=this._inlineframe.contentWindow.document.documentElement.scrollHeight+"px",this._inlineframe.style.width=this._inlineframe.contentWindow.document.documentElement.scrollWidth+"px"},e}(Autotask.Dialog),function(){"use strict";window.Autotask.ProgressBarDialog=function(){},window.Autotask.ProgressBarDialog.prototype={_dialogInstance:null,_hidePointer:null,_maximumWidth:null,_progressBarElement:null,_progressBarContainerElement:null,_progressBarDescriptionTextElement:null,hide:function(){null!==this._hidePointer&&this._hidePointer(),this._dialogInstance.hide()},setProgress:function(t){(isNaN(t)||t<0||t>100)&&autotask.throwException("The progress set on the progress bar dialog must be >= 0 and <= 100.");var e=Math.floor(this._progressBarContainerElement.clientWidth),i=Math.floor(t),n=Math.floor(i*e/100);this._progressBarElement.style.width=n.toString()+"px"},show:function(t,e){this._progressBarDescriptionTextElement.textContent=null!=t?t:"",this._hidePointer=null!=e?e:null,this._dialogInstance.show()},__initialize:function(){this._dialogInstance=autotask.find("ProgressBarDialog");var t=this._dialogInstance.__get_dialog();this._progressBarElement=t.querySelector(".ProgressBar"),this._progressBarContainerElement=t.querySelector(".ProgressBarContainer"),this._progressBarDescriptionTextElement=t.querySelector(".ProgressBarDescription .StandardText")},_close:function(){null!==this._hidePointer&&this._hidePointer()}}}(),window.Autotask.RecipientSelectionDialog=function(t){function e(e,i,n,o,a,s,r,l,_,u,c,d){t.call(this,e,i,n,o),this._chipList=a,this._chipInformationRowAccessoryKey=s,this._externalResourcesItemValues=r,this._externalResourcesRowKeys=l,this._internalResourcesItemValues=_,this._internalResourcesRowKeys=u,this._internalResourcesSelectionType=c,this._selectionTypeParameterName=d,this._internalResourcesCountElement=this._getSelectedCountElement("InternalResources"),this._externalResourcesCountElement=this._getSelectedCountElement("ExternalContacts"),this._updateExternalSelectionCount(),this._updateInternalSelectionCount(),this._isDisplayingInternalResourceGrid=!0}return autotask.inherit(e,t),e.prototype._chipInformationRowAccessoryKey=null,e.prototype._chipList=null,e.prototype._currentSelectionType=null,e.prototype._externalResourcesCountElement=null,e.prototype._externalResourcesItemValues=null,e.prototype._externalResourcesRowKeys=null,e.prototype._internalResourcesCountElement=null,e.prototype._internalResourcesItemValues=null,e.prototype._internalResourcesRowKeys=null,e.prototype._internalResourcesSelectionType=null,e.prototype._isDisplayingInternalResourceGrid=null,e.prototype._selectedHandler=null,e.prototype._selectionTypeParameterName=null,e.prototype._onGridStateChanging=function(t){t.add(this._selectionTypeParameterName,this._currentSelectionType)},e.prototype.get_selectedValues=function(){return this._chipList.values},e.prototype.___get_chipList=function(){return this._chipList},e.prototype.___addRowKeys=function(t){for(var e=0;e<t.length;e++)this._isDisplayingInternalResourceGrid?(this._addSelectionByRowKey(t[e],this._internalResourcesRowKeys,this._internalResourcesItemValues),this._updateInternalSelectionCount()):(this._addSelectionByRowKey(t[e],this._externalResourcesRowKeys,this._externalResourcesItemValues),this._updateExternalSelectionCount())},e.prototype.___clearSelections=function(){this._isDisplayingInternalResourceGrid?(this._clearSelections(this._internalResourcesRowKeys,this._internalResourcesItemValues),this._updateInternalSelectionCount()):(this._clearSelections(this._externalResourcesRowKeys,this._externalResourcesItemValues),this._updateInternalSelectionCount())},e.prototype.___findRowKey=function(t){var e=null,i=this._findRowKeyIndexByValue(t,this._internalResourcesItemValues);return i>=0?(e=this._internalResourcesRowKeys[i],this._internalResourcesRowKeys.splice(i,1),this._internalResourcesItemValues.splice(i,1),this._updateInternalSelectionCount()):(i=this._findRowKeyIndexByValue(t,this._externalResourcesItemValues))>=0&&(e=this._externalResourcesRowKeys[i],this._externalResourcesRowKeys.splice(i,1),this._externalResourcesItemValues.splice(i,1),this._updateExternalSelectionCount()),e},e.prototype.___raiseSelectedEvent=function(){if(null!==this._selectedHandler){var t=new AutotaskMultipleDataSelector.DialogSelectedEventArgs(this._chipList.chipInformation);this._selectedHandler(t)}},e.prototype.___removeRowKeys=function(t){for(var e=0;e<t.length;e++)this._isDisplayingInternalResourceGrid?(this._removeSelectionByRowKey(t[e],this._internalResourcesRowKeys,this._internalResourcesItemValues),this._updateInternalSelectionCount()):(this._removeSelectionByRowKey(t[e],this._externalResourcesRowKeys,this._externalResourcesItemValues),this._updateExternalSelectionCount())},e.prototype.__initialize=function(){t.prototype.__initialize.call(this),this.___get_grid().addStateChanging(autotask.proxy(this._onGridStateChanging,this))},e.prototype.__configure=function(t,e,i){this._selectedHandler=t,this.___enableMaximumSelection(e,i),this._internalResourcesRowKeys.length>0&&this.___get_grid().selectValues(this._internalResourcesRowKeys),this._externalResourcesRowKeys.length>0&&this.___get_grid().selectValues(this._externalResourcesRowKeys)},e.prototype.__selectionTypeChanged=function(t){this._currentSelectionType=t.editorInstance.value,this._isDisplayingInternalResourceGrid=this._currentSelectionType===this._internalResourcesSelectionType,this.___get_grid().refresh()},e.prototype._addSelectionByRowKey=function(t,e,i){var n=this.___get_grid().getAccessoryDataValue(t,this._chipInformationRowAccessoryKey);null===n&&autotask.throwException("Unexpected row key."),this._chipList.insert(n),e.push(t),i.push(n.value)},e.prototype._clearSelections=function(t,e){for(var i=0;i<e.length;i++)this._chipList.removeByValue(e[i]);t.splice(0),e.splice(0)},e.prototype._findRowKeyIndexByValue=function(t,e){for(var i=-1,n=0;n<e.length;n++)if(AutotaskItemSelectionSystem.ItemValueComparer.equals(t,e[n])){i=n;break}return i},e.prototype._getSelectedCountElement=function(t){return document.getElementsByClassName(t)[0].getElementsByClassName("SelectedCount")[0]},e.prototype._removeSelectionByRowKey=function(t,e,i){var n=e.indexOf(t);n>=0&&(this._chipList.removeByValue(i[n]),e.splice(n,1),i.splice(n,1))},e.prototype._updateExternalSelectionCount=function(){this._externalResourcesCountElement.textContent=this._externalResourcesRowKeys.length.toString()},e.prototype._updateInternalSelectionCount=function(){this._internalResourcesCountElement.textContent=this._internalResourcesRowKeys.length.toString()},e}(Autotask.MultipleItemSelectionDialog),function(){"use strict";Autotask.RichTextBoxAdjustLayoutDialog=function(){},Autotask.RichTextBoxAdjustLayoutDialog.prototype={_checkbox:null,_dialog:null,_heightDropDownList:null,_richTextBoxId:null,_widthDropDownList:null,adjustTable:function(){if(this._dialog.validate()){var t=autotask.find(this._richTextBoxId),e=null;this._widthDropDownList.get_enabled()&&(e=this._widthDropDownList.get_value()),t.adjustTableLayout(e,this._heightDropDownList.get_value()),this._dialog.hide()}},checkboxChanged:function(){this._widthDropDownList.set_enabled(this._checkbox.get_value())}}}(),function(){"use strict";Autotask.RichTextBoxAdjustPropertiesDialog=function(){},Autotask.RichTextBoxAdjustPropertiesDialog.prototype={_checkbox:null,_dialog:null,_richTextBoxId:null,adjustTable:function(){this._dialog.validate()&&(autotask.find(this._richTextBoxId).adjustTableProperties(this._checkbox.get_value()),this._dialog.hide())}}}(),function(){"use strict";Autotask.RichTextBoxAnchorDialog=function(){this._usedAnchorNames=[]},Autotask.RichTextBoxAnchorDialog.prototype={_dialog:null,_nameTextBox:null,_richTextBoxId:null,_usedAnchorNames:null,_validationMessage:null,addUsedAnchorNames:function(t){this._usedAnchorNames=t},saveAnchor:function(){this._validateUniqueAnchorName()&&this._dialog.validate()&&(autotask.find(this._richTextBoxId).createAnchor(this._nameTextBox.get_value()),this._dialog.hide())},_validateUniqueAnchorName:function(){this._dialog.get_customValidationSummary().clearMessages();var t=this._usedAnchorNames.indexOf(this._nameTextBox.get_value())<0;return t||this._dialog.get_customValidationSummary().addMessage("key",this._validationMessage),t}}}(),function(){"use strict";Autotask.RichTextBoxLinkDialog=function(){},Autotask.RichTextBoxLinkDialog.prototype={_anchorDropDownList:null,_dialog:null,_anchorLinkType:null,_radioButton:null,_richTextBoxId:null,_urlLinkType:null,_urlTextBox:null,saveLink:function(){if(this._dialog.validate()){var t,e=autotask.find(this._richTextBoxId);t=this._radioButton.get_value()===this._urlLinkType?this._urlTextBox.get_value():"#"+this._anchorDropDownList.get_value(),e.createLink(t),this._dialog.hide()}},radioButtonChanged:function(t){if(t.isSelected)switch(t.clientInstance.get_value()){case this._anchorLinkType:this._anchorDropDownList.set_enabled(!0),this._urlTextBox.set_enabled(!1),this._anchorDropDownList.focus();break;case this._urlLinkType:this._anchorDropDownList.set_enabled(!1),this._urlTextBox.set_enabled(!0),this._urlTextBox.focus();break;default:autotask.throwException("The link type is not implemented.")}}}}(),function(){"use strict";Autotask.RichTextBoxTableDialog=function(){},Autotask.RichTextBoxTableDialog.prototype={_columnCountIntegerBox:null,_dialog:null,_includeHeadersCheckBox:null,_richTextBoxId:null,_rowCountIntegerBox:null,insertTable:function(){this._dialog.validate()&&(autotask.find(this._richTextBoxId).insertTable(this._columnCountIntegerBox.get_value(),this._rowCountIntegerBox.get_value(),this._includeHeadersCheckBox.get_value()),this._dialog.hide())}}}(),window.Autotask.SessionNoticeDialog=function(t){"use strict";function e(e,i){t.call(this,e,null),this._timerElement=document.getElementById(i)}return autotask.inherit(e,t),e.prototype._keepAlivePointer=null,e.prototype._timerElement=null,e.prototype.set_keepAlivePointer=function(t){this._keepAlivePointer=t},e.prototype.keepAlive=function(){null!==this._keepAlivePointer&&this._keepAlivePointer()},e.prototype.updateTimerText=function(t){this._timerElement.innerText=t},e}(Autotask.StandardDialog),window.Autotask.SimpleGridDialogFacade=function(){"use strict";function t(t,e,i){autotask.instanceManagement.__addRegistrationKey(this,t),this._backingDialogId=e,this._gridId=i,this._submittingPointers=[];var n=document.getElementById(e).firstElementChild.firstElementChild;this._validationSummaryElement=n.firstElementChild.nextElementSibling}return t.prototype._backingDialog=null,t.prototype._backingDialogId=null,t.prototype._grid=null,t.prototype._gridId=null,t.prototype._notificationSlideOut=null,t.prototype._submittingPointers=null,t.prototype._validationSummary=null,t.prototype._validationSummaryElement=null,t.prototype.hide=function(){this._backingDialog.close()},t.prototype.get_customValidationSummary=function(){return this._validationSummary.__get_customValidationSummary()},t.prototype.___get_validationSummary=function(){return this._validationSummary},t.prototype.addSubmitting=function(t){this._submittingPointers.push(t)},t.prototype.ajaxSubmit=function(t,e){var i=new AutotaskAjaxSystem.SubmittingEventArgs;this._submitting(i);var n=i.requestData;if(null!==this._notificationSlideOut){var o=this._notificationSlideOut.get_panel();n.addFieldData(o.__get_postingModelParameterName(),o.__createSerializedRequestData())}var a=new Autotask.SubmitRoute(t),s=this.get_customValidationSummary();a.makeRequest(n,(function(t){s.clearMessages();for(var i=0;i<t.customValidationMessages.length;i++)s.addMessage(i.toString(),t.customValidationMessages[i]);var n={};n.validationFailure=t.customValidationMessages.length>0,n.responseData=t.responseData,e(n)}))},t.prototype.deprecatedAjaxSubmit=function(t,e){var i=new Autotask.DialogSubmittingEventArgs;this._submitting(i);var n=i.__get_data(),o=this.get_customValidationSummary();if(null!==this._notificationSlideOut){var a=this._notificationSlideOut.get_panel();n[a.__get_postingModelParameterName()]=a.__createSerializedRequestData()}autotask.ajax.__restrictedPostRequest(t,n,e).__deprecatedSubmit(o)},t.prototype.__setNotificationSlideOut=function(t){this._notificationSlideOut=t},t.prototype.__initialize=function(){var t=this;this._backingDialog=autotask.find(this._backingDialogId),this._backingDialog._addResetValidationHandler((function(){t.__resetValidation()})),this._validationSummary=autotask.find(this._validationSummaryElement.id),this._validationSummary.__addValidationFailed(autotask.proxy(this._validationFailedHandler,this)),this._grid=autotask.find(this._gridId)},t.prototype._submitting=function(t){for(var e=0;e<this._submittingPointers.length;e++)this._submittingPointers[e](t)},t.prototype._validationFailedHandler=function(){null!==this._notificationSlideOut&&this._notificationSlideOut.hide()},t}(),window.Autotask.SingleDataSelectionDialog=function(t){function e(e,i,n,o){t.call(this,e,i,n),this._chipInformationRowAccessoryKey=o}return autotask.inherit(e,t),e.prototype._chipInformationRowAccessoryKey=null,e.prototype._selectedHandler=null,e.prototype.___raiseSelectedEvent=function(t){if(null!==this._selectedHandler){var e=this.___get_grid().getAccessoryDataValue(t,this._chipInformationRowAccessoryKey);null===e&&autotask.throwException("Unexpected row key.");var i=new AutotaskSingleDataSelector.DialogSelectedEventArgs(e);this._selectedHandler(i)}},e.prototype.__configure=function(t){this._selectedHandler=t},e}(Autotask.SingleItemSelectionDialog),window.Autotask.StandardDialogFacade=function(){"use strict";function t(t,e,i,n,o,a,s){autotask.instanceManagement.__addRegistrationKey(this,t),this._backingDialogId=e,this._fieldContainer=document.getElementById(i),this._popOutPageBehavior=n,this._bookmarkPageCode=o,this._bookmarkPrimaryKey=a,this._helpPageBehavior=s,this._immutableData=[],this._submittingPointers=[];var r=document.getElementById(e).firstElementChild.firstElementChild;this._validationSummaryElement=r.firstElementChild.nextElementSibling}return t.prototype._backingDialog=null,t.prototype._backingDialogId=null,t.prototype._bookmarkPageCode=null,t.prototype._bookmarkPrimaryKey=null,t.prototype._fieldContainer=null,t.prototype._fieldValidation=null,t.prototype._helpPageBehavior=null,t.prototype._immutableData=null,t.prototype._maximizedHandler=null,t.prototype._minimizedHandler=null,t.prototype._notificationSlideOut=null,t.prototype._openedHandler=null,t.prototype._popOutPageBehavior=null,t.prototype._poppingOutHandler=null,t.prototype._submittingPointers=null,t.prototype._validationSummary=null,t.prototype._validationSummaryElement=null,t.prototype.hide=function(){this._backingDialog.close()},t.prototype.get_customValidationSummary=function(){return this._validationSummary.__get_customValidationSummary()},t.prototype.set_maximizedHandler=function(t){this._maximizedHandler=t},t.prototype.set_minimizedHandler=function(t){this._minimizedHandler=t},t.prototype.set_openedHandler=function(t){this._openedHandler=t},t.prototype.set_poppingOutHandler=function(t){this._poppingOutHandler=t},t.prototype.___get_validationSummary=function(){return this._validationSummary},t.prototype.addSubmitting=function(t){this._submittingPointers.push(t)},t.prototype.ajaxSubmit=function(t,e){if(this.validate()){var i=new AutotaskAjaxSystem.SubmittingEventArgs;this._submitting(i);var n=i.requestData;if(null!==this._notificationSlideOut){var o=this._notificationSlideOut.get_panel();n.addFieldData(o.__get_postingModelParameterName(),o.__createSerializedRequestData())}var a=new Autotask.SubmitRoute(t),s=this.get_customValidationSummary();a.makeRequest(n,(function(t){s.clearMessages();for(var i=0;i<t.customValidationMessages.length;i++)s.addMessage(i.toString(),t.customValidationMessages[i]);var n={};n.validationFailure=t.customValidationMessages.length>0,n.responseData=t.responseData,e(n)}))}},t.prototype.deprecatedAjaxSubmit=function(t,e){if(this.validate()){var i=new Autotask.DialogSubmittingEventArgs;this._submitting(i);var n=i.__get_data(),o=this.get_customValidationSummary();if(null!==this._notificationSlideOut){var a=this._notificationSlideOut.get_panel();n[a.__get_postingModelParameterName()]=a.__createSerializedRequestData()}autotask.ajax.__restrictedPostRequest(t,n,e).__deprecatedSubmit(o)}},t.prototype.generateFieldData=function(){for(var t=[this._fieldContainer],e=new AutotaskRequestDataSystem.SerializedRequestData(t),i=0;i<this._immutableData.length;i++)e.__addImmutableData(this._immutableData[i]);return e},t.prototype.validate=function(){return this._validate(!1)},t.prototype.validateEditor=function(t){return"function"==typeof t.validate?t.validate():this._fieldValidation.__validateLegacyEditor(t.__get_id(),!1)},t.prototype.__addImmutableData=function(t){this._immutableData.push(t)},t.prototype.__setNotificationSlideOut=function(t){this._notificationSlideOut=t},t.prototype.__finalize=function(){this._fieldValidation.__parse()},t.prototype.__initialize=function(){var t=this;this._backingDialog=autotask.find(this._backingDialogId),this._backingDialog._addResetValidationHandler((function(){t.__resetValidation()})),this._backingDialog._addValidateEditorHandler((function(e){t.validateEditor(e)})),this._backingDialog.addMinimizedHandler((function(){t._minimized()})),this._backingDialog.addMaximizedHandler((function(){t._maximized()})),this._backingDialog.addOpenedHandler((function(){t._opened()})),this._backingDialog.set_bookmarkButtonClickedHandler((function(e,i){t._bookmarkButtonClicked(e,i)})),this._backingDialog.set_helpButtonClickedHandler((function(){t._helpButtonClicked()})),null!==this._popOutPageBehavior&&this._backingDialog.addPoppingOutHandler((function(){t._poppingOut()})),this._validationSummary=autotask.find(this._validationSummaryElement.id),this._validationSummary.__addValidationFailed(autotask.proxy(this._validationFailedHandler,this)),this._fieldValidation=new Autotask.PostedContainerValidation(this._fieldContainer),this._fieldValidation.__registerValidationSummary(this._validationSummary)},t.prototype.__resetValidation=function(){this._fieldValidation.__reset(),this._validationSummary.__get_isActive()&&this._validate(!0)},t.prototype._bookmarkButtonClicked=function(t){null!==this._bookmarkPageCode&&(t?autotask.bookmarkManagement.__addBookmark(this._bookmarkPageCode,this._bookmarkPrimaryKey):autotask.bookmarkManagement.__removeBookmark(this._bookmarkPageCode,this._bookmarkPrimaryKey))},t.prototype._helpButtonClicked=function(){this._helpPageBehavior.open(null)},t.prototype._maximized=function(){null!==this._maximizedHandler&&this._maximizedHandler()},t.prototype._minimized=function(){null!==this._minimizedHandler&&this._minimizedHandler()},t.prototype._opened=function(){null!==this._openedHandler&&this._openedHandler()},t.prototype._poppingOut=function(){var t=new AutotaskDialogSystem.PoppingOutEventArgs;null!==this._poppingOutHandler&&this._poppingOutHandler(t),this._popOutPageBehavior.applyDynamicRequestData(t.data),this._popOutPageBehavior.open(null)},t.prototype._submitting=function(t){for(var e=0;e<this._submittingPointers.length;e++)this._submittingPointers[e](t)},t.prototype._validate=function(t){var e=this._fieldValidation.__validate();return e||this._fieldValidation.__validationFailed(),this._fieldValidation.__validationCompleted(e,t),e},t.prototype._validationFailedHandler=function(){null!==this._notificationSlideOut&&this._notificationSlideOut.hide()},t}(),Autotask.UserDefinedFieldMultipleDataSelectorCreateValueDialog=function(t){"use strict";function e(e,i){t.call(this,e,null,i)}return autotask.inherit(e,t),e.prototype._saveHandler=null,e.prototype.configure=function(t){this._saveHandler=t},e.prototype.showErrorMessage=function(t){this.get_customValidationSummary().addMessage("key",t)},e.prototype.__initialize=function(){t.prototype.__initialize.call(this)},e.prototype.__saveAndClose=function(){if(this.get_customValidationSummary().clearMessages(),this.validate()){var t=this.generateFieldData();this._saveHandler(t)}},e}(Autotask.Dialog),window.AutotaskDocumentationManagerPages.ReplaceNavigationContentRoute=function(){"use strict";function t(t){this._requestCoordinator=new Autotask.AjaxRequestCoordinator("GET",t)}return t.prototype._requestCoordinator=null,t.prototype._onResponseProcessing=function(t,e){var i=new Autotask.AjaxResponseHtmlAndJavaScript(t.htmlJavaScriptPair);e(t.navigationContentInstanceId,i.htmlForInstanceTrackerContainer,i.script)},t.prototype.__makeRequest=function(t,e){var i=new Autotask.AjaxRequestData(t.__data,!1).__serialize(),n=this;this._requestCoordinator.__sendRequest(i,(function(t){n._onResponseProcessing(t,e)}),null,!0,"DocumentationManagerNavigationContent")},t}(),window.AutotaskDocumentationManagerPages.ReplacePrimaryContentRoute=function(){"use strict";function t(t){this._requestCoordinator=new Autotask.AjaxRequestCoordinator("GET",t)}return t.prototype._requestCoordinator=null,t.prototype._onResponseProcessing=function(t,e){var i=new Autotask.AjaxResponseHtmlAndJavaScript(t.htmlJavaScriptPair);e(i.htmlForInstanceTrackerContainer,i.script)},t.prototype.__makeRequest=function(t,e){var i=new Autotask.AjaxRequestData(t.__data,!1).__serialize(),n=this;this._requestCoordinator.__sendRequest(i,(function(t){n._onResponseProcessing(t,e)}),null,!0,"DocumentationManagerPrimaryContent")},t}(),Autotask.DragState=function(){"use strict";var t="None",e="Start",i="Tearing",n="Torn";function o(e,i){this._moveDeltaX=e,this._moveDeltaY=i,this._state=t}return o.prototype._originX=null,o.prototype._originY=null,o.prototype._moveDeltaX=null,o.prototype._moveDeltaY=null,o.prototype._state=null,o.prototype.__get_isDragInProgress=function(){return this.__get_isTornOff()},o.prototype.__get_isStarting=function(){return this._state==e||this._state==i},o.prototype.__get_isTornOff=function(){return this._state==n},o.prototype.__adjustPosition=function(t,o){if(this._state==e)this._originX=t,this._originY=o,this._state=i;else if(this._state==i){var a=!!t&&Math.abs(t-this._originX)>this._moveDeltaX,s=!!o&&Math.abs(o-this._originY)>this._moveDeltaY;(a||s)&&(this._state=n)}},o.prototype.__adjustPositionX=function(t){this.__adjustPosition(t,null)},o.prototype.__adjustPositionY=function(t){this.__adjustPosition(null,t)},o.prototype.__reset=function(){this._state=t},o.prototype.__start=function(){this._state=e},o}(),Autotask.DropIndicator=function(){"use strict";function t(t,e){this._elementDragging=e,this._id=t,this._initialize(t)}return t.prototype._elementDragging=null,t.prototype._dropIndicator=null,t.prototype._id=null,t.prototype.__addAttribute=function(t,e){this._dropIndicator.setAttribute(t,e)},t.prototype.__addClass=function(t){this._dropIndicator.classList.add(t)},t.prototype.__dispose=function(){this._dropIndicator.before(this._elementDragging),document.getElementById(this._id).remove()},t.prototype.__getNext=function(){return this._dropIndicator.nextElementSibling},t.prototype.__height=function(t){this._dropIndicator.style.height=t.toString()+"px"},t.prototype.__isEqual=function(t){return t===this._dropIndicator},t.prototype.__isMouseOver=function(t,e){return this._isMouseOverHorizontally(t)&&this._isMouseOverVertically(e)},t.prototype.__putAfter=function(t){t.after(this._dropIndicator)},t.prototype.__putBefore=function(t){t.before(this._dropIndicator)},t.prototype.__removeClass=function(t){this._dropIndicator.classList.remove(t)},t.prototype.__width=function(t){this._dropIndicator.style.width=t.toString()+"px"},t.prototype._initialize=function(t){var e=document.createElement("div");e.id=this._id,e.classList.add(t),this._dropIndicator=e,this.__putBefore(this._elementDragging)},t.prototype._isMouseOverHorizontally=function(t){if(null===t)return!0;var e=this._dropIndicator.offsetWidth,i=AutotaskDomSystem.Other.positionOffset(this._dropIndicator).left;return i<=t&&t<=i+e},t.prototype._isMouseOverVertically=function(t){if(null===t)return!0;var e=this._dropIndicator.offsetHeight,i=AutotaskDomSystem.Other.positionOffset(this._dropIndicator).top;return i<=t&&t<=i+e},t}(),window.Autotask.CurrencyBoxContextOverlayRoute=function(){"use strict";function t(t,e,i,n,o,a){this._valueParameterName=e,this._numberOfDecimalPlacesParameterName=i,this._externalCurrencyIdParameterName=n,this._isValueInternalCurrencyParameterName=o,this._alternateCurrencyIdParameterName=a,this._requestCoordinator=new Autotask.AjaxRequestCoordinator("GET",t)}return t.prototype._alternateCurrencyIdParameterName=null,t.prototype._externalCurrencyIdParameterName=null,t.prototype._isValueInternalCurrencyParameterName=null,t.prototype._numberOfDecimalPlacesParameterName=null,t.prototype._requestCoordinator=null,t.prototype._valueParameterName=null,t.prototype._onResponseProcessing=function(t,e,i){var n=new Autotask.AjaxResponseHtmlAndJavaScript(t.htmlJavaScriptPair);i.__loadHtmlAndJavaScript(n.htmlForInstanceTrackerContainer,n.script),null!=e&&e()},t.prototype.__currencyBoxContextOverlay=function(t,e,i,n,o,a,s){var r={};r[this._valueParameterName]=new AutotaskAjaxSystem.AjaxDecimalData(t),r[this._numberOfDecimalPlacesParameterName]=e,r[this._externalCurrencyIdParameterName]=i,r[this._isValueInternalCurrencyParameterName]=n,r[this._alternateCurrencyIdParameterName]=o;var l=new Autotask.AjaxRequestData(r,!1).__serialize(),_=this;this._requestCoordinator.__sendRequest(l,(function(t){_._onResponseProcessing(t,a,s)}),null,!1,"ContextOverlay")},t}(),window.Autotask.GetUploadTrackingKeyRoute=function(){"use strict";function t(t){this._url=t}return t.prototype._url=null,t.prototype._onResponseProcessing=function(t,e){e({trackingKey:t.trackingKey})},t.prototype.__makeRequest=function(t){var e=new Autotask.AjaxRequestData({},!1).__serialize(),i=this;new Autotask.AjaxRequestCoordinator("GET",this._url).__sendRequest(e,(function(e){i._onResponseProcessing(e,t)}),null,!1,"GetFileUploadTrackingKey")},t}(),window.PopulateDropDownListRoute=function(){"use strict";function t(t){this._requestCoordinator=new Autotask.AjaxRequestCoordinator("GET",t)}return t.prototype._requestCoordinator=null,t.prototype._onResponseProcessing=function(t,e,i){e.populate(t.value),null!==i&&i()},t.prototype.populate=function(t,e,i){var n=new Autotask.AjaxRequestData(e,!1).__serialize(),o=this;this._requestCoordinator.__sendRequest(n,(function(e){o._onResponseProcessing(e,t,i)}),null,!1,"PopulateSelect")},t}(),window.PopulateListBoxRoute=function(){"use strict";function t(t,e){this._requestCoordinator=e?new Autotask.AjaxRequestCoordinator("POST",t):new Autotask.AjaxRequestCoordinator("GET",t),this._isPostRequest=e}return t.prototype._isPostRequest=null,t.prototype._requestCoordinator=null,t.prototype._onResponseProcessing=function(t,e,i){e.populate(t.value),null!==i&&i()},t.prototype.populate=function(t,e,i){var n=new Autotask.AjaxRequestData(e,this._isPostRequest).__serialize(),o=this;this._requestCoordinator.__sendRequest(n,(function(e){o._onResponseProcessing(e,t,i)}),null,!1,"PopulateSelect")},t}(),window.Autotask.UnmaskUserDefinedFieldRoute=function(){"use strict";function UnmaskUserDefinedFieldRoute(t){this._requestCoordinator=new Autotask.AjaxRequestCoordinator("GET",t)}return UnmaskUserDefinedFieldRoute.prototype._requestCoordinator=null,UnmaskUserDefinedFieldRoute.prototype._onResponseProcessing=function(t,e){e(t.value)},UnmaskUserDefinedFieldRoute.prototype.getMaskedNumericValue=function(successHandler){var localSuccessHandler=function(responseValue){var value=null;if(null!==responseValue)try{value=eval(responseValue)}catch(t){autotask.throwException("An exception occurred while evaluating the value returned from the server. Error message: "+t.message)}successHandler(value)};this._getMaskedValue(localSuccessHandler)},UnmaskUserDefinedFieldRoute.prototype.getMaskedStringValue=function(t){this._getMaskedValue(t)},UnmaskUserDefinedFieldRoute.prototype._getMaskedValue=function(t){var e=new Autotask.AjaxRequestData(null,!1).__serialize(),i=this;this._requestCoordinator.__sendRequest(e,(function(e){i._onResponseProcessing(e,t)}),null,!1,"UnmaskUserDefinedField")},UnmaskUserDefinedFieldRoute}(),function(){"use strict";window.Autotask.DataSelectorManagement=function(){this._selectionDelegates={}},window.Autotask.DataSelectorManagement.prototype={_selectionDelegates:null,addSelectionDelegate:function(t,e){this._selectionDelegates[t]=e},saveSelection:function(t,e,i){this._selectionDelegates.hasOwnProperty(t)&&(this._selectionDelegates[t](e,i),delete this._selectionDelegates[t])},saveSelections:function(t,e){this._selectionDelegates.hasOwnProperty(t)&&(this._selectionDelegates[t](e),delete this._selectionDelegates[t])}}}(),window.Autotask.EditorLayoutManagement=function(){"use strict";function t(){}return t.prototype.__findEditorContainer=function(t){return t.closest(".Editor")},t.prototype.__findLabelContainer=function(t){var e=null,i=this.__findEditorContainer(t).id,n=document.querySelector("label[for="+i+"]");return null!==n&&(e=n.closest(".EditorLabelContainer")),e},t}(),window.Autotask.EditorMutableLabel=function(){"use strict";function t(t){autotask.instanceManagement.__addRegistrationKey(this,t);var e=document.getElementById(t).children[0];this._primaryTextElement=e.children[0],this._secondaryTextElement=e.children[1]}return t.prototype._primaryTextElement=null,t.prototype._secondaryTextElement=null,t.prototype.__updatePrimaryText=function(t){this._primaryTextElement.textContent=t},t.prototype.__updateSecondaryText=function(t){this._secondaryTextElement.textContent=t},t.prototype.__updateText=function(t,e){this._primaryTextElement.textContent=t,this._secondaryTextElement.textContent=e},t}(),Autotask.RichTextBox=function(){function t(t,e){autotask.instanceManagement.__addRegistrationKey(this,t),this._backingEditorId=e,this._backingRichTextBoxEditor=void 0}return t.prototype._backingEditorId=null,t.prototype._backingRichTextBoxEditor=null,t.prototype.set_disabledTitle=function(t){this._get_backingEditor().disabledTitle=t},t.prototype.get_enabled=function(){return this._get_backingEditor().isEnabled},t.prototype.set_enabled=function(t){this._get_backingEditor().isEnabled=t},t.prototype.get_plainTextValue=function(){return this._get_backingEditor().plainTextValue},t.prototype.get_richTextValue=function(){return this._get_backingEditor().value},t.prototype._get_backingEditor=function(){return void 0===this._backingRichTextBoxEditor&&autotask.throwException("_backingRichTextBoxEditor is undefined."),this._backingRichTextBoxEditor},t.prototype.adjustTableLayout=function(t,e){this._backingRichTextBoxEditor.adjustTableLayout(t,e)},t.prototype.adjustTableProperties=function(t,e){this._backingRichTextBoxEditor.adjustTableProperties(t,e)},t.prototype.createAnchor=function(t){this._backingRichTextBoxEditor.createAnchor(t)},t.prototype.createLink=function(t){this._backingRichTextBoxEditor.createLink(t)},t.prototype.focus=function(){this._backingRichTextBoxEditor.focus()},t.prototype.insertTable=function(t,e,i){this._backingRichTextBoxEditor.insertTable(t,e,i)},t.prototype.__initialize=function(){this._backingRichTextBoxEditor=autotask.find(this._backingEditorId),this._backingRichTextBoxEditor.imageFileUploadValidationFailedHandler=autotask.proxy(this._imageFileUploadValidationFailed,this)},t.prototype._imageFileUploadValidationFailed=function(t){var e=new Autotask.AlertDialogOptions;e.set_description(t),autotask.alertDialog.show(e)},t}(),window.AutotaskEditorSystem.BroadcastedEnterKeyPressEventArgs=function(){"use strict";function t(t,e){this._frameworkInstanceElement=t,this._preventDefaultPointer=e}return t.prototype._frameworkInstanceElement=null,t.prototype._preventDefaultPointer=null,t.prototype.get_frameworkInstanceElement=function(){return this._frameworkInstanceElement},t.prototype.preventDefault=function(){return this._preventDefaultPointer()},t}(),window.AutotaskEditorSystem.BroadcastedEscapeKeyPressEventArgs=function(){"use strict";function t(t,e){this._preventDefaultPointer=t,this._stopPropagationPointer=e}return t.prototype._preventDefaultPointer=null,t.prototype._stopPropagationPointer=null,t.prototype.preventDefault=function(){return this._preventDefaultPointer()},t.prototype.stopPropagation=function(){return this._stopPropagationPointer()},t}(),window.AutotaskEditorSystem.BroadcastedTabKeyPressEventArgs=function(){"use strict";function t(t,e,i){this._frameworkInstanceElement=t,this._isShiftKeyPressed=e,this._preventDefaultPointer=i}return t.prototype._frameworkInstanceElement=null,t.prototype._isShiftKeyPressed=null,t.prototype._preventDefaultPointer=null,t.prototype.get_frameworkInstanceElement=function(){return this._frameworkInstanceElement},t.prototype.get_isShiftKeyPressed=function(){return this._isShiftKeyPressed},t.prototype.preventDefault=function(){return this._preventDefaultPointer()},t}(),Autotask.MultipleDataSelectorAlertDialog=function(){function t(){}return t.prototype.show=function(t,e){var i=new Autotask.AlertDialogOptions;i.set_description(t),i.set_operation(Autotask.AlertDialogOptions.Operation.Information),i.set_okayPointer(e),autotask.alertDialog.show(i)},t}(),Autotask.MultipleItemSelectorAlertDialog=function(){function t(){}return t.prototype.show=function(t,e){var i=new Autotask.AlertDialogOptions;i.set_description(t),i.set_operation(Autotask.AlertDialogOptions.Operation.Information),i.set_okayPointer(e),autotask.alertDialog.show(i)},t}(),window.Autotask.FormSubmittingEventArgs=function(){"use strict";function t(){this._data={}}return t.prototype._data=null,t.prototype.__get_data=function(){return this._data},t.prototype.add=function(t,e){"string"!=typeof t&&window.autotask.throwException("When adding key/value pairs to FormSubmittingEventArgs, the key must be a string."),this._data[t]=e},t}(),window.Autotask.FormValidatingEventArgs=function(){"use strict";function t(){this._grids=[]}return t.prototype._grids=null,t.prototype.__get_grids=function(){return this._grids},t.prototype.addGrid=function(t){this._grids.push(t)},t}(),function(){"use strict";window.Autotask.HiddenField=function(t){autotask.instanceManagement.__addRegistrationKey(this,t),this._hiddenFieldElement=document.getElementById(t)},window.Autotask.HiddenField.prototype={_hiddenFieldElement:null,get_value:function(){return this._hiddenFieldElement.value},set_value:function(t){t=null===t?"":t,this._hiddenFieldElement.value=t}}}(),function(){"use strict";window.Autotask.HiddenFieldList=function(t,e){this._forceRetrieval=e,this._hiddenFieldId=t},window.Autotask.HiddenFieldList.prototype={_forceRetrieval:null,_hiddenFieldId:null,_hiddenField:null,_get_hiddenField:function(){if(null===this._hiddenField){var t=document.getElementById(this._hiddenFieldId);if(!0===this._forceRetrieval)return t;this._hiddenField=t}return this._hiddenField},_get_array:function(){var t=this._get_hiddenField().value;return t?JSON.parse(t):[]},_set_array:function(t){this._get_hiddenField().value=JSON.stringify(t)},add:function(t,e){t=this._wrapParameter(t);for(var i=this._get_array(),n=0;n<t.length;n++){var o=t[n];-1==this._indexOf(i,o,e)&&(i.push(o),this._set_array(i))}},clear:function(){this._set_array([])},contains:function(t,e){return this._indexOf(this._get_array(),t,e)>-1},count:function(){return this._get_array().length},remove:function(t,e){t=this._wrapParameter(t);for(var i=this._get_array(),n=0;n<t.length;n++){var o=t[n],a=this._indexOf(i,o,e);a>=0&&(i.splice(a,1),this._set_array(i))}},_indexOf:function(t,e,i){var n=-1;if(i){for(var o=0;o<t.length;o++)if(i(e,t[o])){n=o;break}}else n=t._indexOf(e);return n},_intersect:function(t,e){var i,n,o=[],a=this._get_array();if(e)for(i=0;i<t.length;i++){var s=t[i];for(n=0;n<a.length;n++)e(s,a[i])&&o.push(s)}else{var r={};for(i=0;i<t.length;i++)r[t[i]]=!0;for(i=0;i<a.length;i++){var l=a[i];l in r&&o.push(l)}}return o},_wrapParameter:function(t){return t instanceof Array||(t=[t]),t}}}(),function(){"use strict";window.Autotask.HtmlSelect=function(t){this._element=t},window.Autotask.HtmlSelect.prototype={_element:null,__populate:function(t){var e=!1;this._element.options.length>0&&""===this._element.options[0].value&&(e=!0),this._element.innerHTML="",e&&this._element.appendChild(this._createOptionHtml("","",!1));for(var i=0;i<t.length;i++)this._element.appendChild(this._createOptionHtml(t[i].Value,t[i].Text,t[i].Selected))},_createOptionHtml:function(t,e,i){var n=document.createElement("option");return n.text=e,n.title=e,n.value=t,i&&(n.selected=!0),n}}}(),function(){"use strict";Autotask.TextSelection=function(t){this._startIndex=null,this._endIndex=null,this._element=t,this._initialize()},Autotask.TextSelection.prototype={get_startIndex:function(){return this._startIndex},get_endIndex:function(){return this._endIndex},get_length:function(){return this._endIndex-this._startIndex},restoreSelection:function(){this._setSelection(this._startIndex,this._endIndex)},replaceSelection:function(t){var e=this._element.value,i=null;if(e.length>0){var n=e.slice(0,this.get_startIndex()),o=e.slice(this.get_endIndex(),e.length);i=n+t,this._element.value=i+o}else this._element.value=t,i=t;var a=i.length;this._setSelection(a,a)},_initialize:function(){if(void 0===this._element.selectionStart){this._element.focus();var t=document.selection.createRange();if(t&&t.parentElement()==this._element){var e=0,i=0,n=this._element.value.length,o=this._element.value.replace(/\r\n/g,"\n"),a=this._element.createTextRange();a.moveToBookmark(t.getBookmark());var s=this._element.createTextRange();s.collapse(!1),a.compareEndPoints("StartToEnd",s)>-1?e=i=n:(e=-a.moveStart("character",-n),e+=o.slice(0,e).split("\n").length-1,a.compareEndPoints("EndToEnd",s)>-1?i=n:(i=-a.moveEnd("character",-n),i+=o.slice(0,i).split("\n").length-1)),this._startIndex=e,this._endIndex=i}}else this._startIndex=this._element.selectionStart,this._endIndex=this._element.selectionEnd},_setSelection:function(t,e){if(void 0===this._element.selectionStart){var i=this._element.createTextRange();i.collapse(!0),i.moveEnd("character",e),i.moveStart("character",t),i.select()}else this._element.setSelectionRange(t,e);this._startIndex=t,this._endIndex=e}}}(),window.Autotask.RefreshEmailContentRoute=function(){"use strict";function t(t){this._requestCoordinator=new Autotask.AjaxRequestCoordinator("GET",t)}return t.prototype._requestCoordinator=null,t.prototype._onResponseProcessing=function(t,e){var i=new Autotask.InstanceTracker(t.selectionInstanceId,null);i.__loadScript(t.script);var n=autotask.find(t.selectionInstanceId).value,o=null;null!==t.itemCreatorContainerId&&(o=autotask.find(t.itemCreatorContainerId).itemCreators);i.__dispose(),e(t.itemSetHtml,t.lockedTextItemHtml,n,o,t.subjectText)},t.prototype.makeRequest=function(t,e){var i=new Autotask.AjaxRequestData(t.__data,!1).__serialize(),n=this;this._requestCoordinator.__sendRequest(i,(function(t){n._onResponseProcessing(t,e)}),null,!1,"RefreshNotificationPanelEmailContent");return new Autotask.AjaxRequestCanceler((function(){n._requestCoordinator.__cancelRequest()}))},t}(),window.Autotask.ReplaceDynamicRecipientRoute=function(){"use strict";function t(t){this._requestCoordinator=new Autotask.AjaxRequestCoordinator("POST",t)}return t.prototype._requestCoordinator=null,t.prototype._onResponseProcessing=function(t,e){var i=new Autotask.InstanceTracker(t.updateContainerId,null);i.__loadScript(t.script);var n=autotask.find(t.updateContainerId).updateInformation;i.__dispose(),e(n)},t.prototype.makeRequest=function(t,e){var i=null;i=t instanceof AutotaskRequestDataSystem.RequestData?t.__data:t;var n=new Autotask.AjaxRequestData(i,!0).__serialize(),o=this;this._requestCoordinator.__sendRequest(n,(function(t){o._onResponseProcessing(t,e)}),null,!0,"UpdateDynamicRecipient")},t}(),window.Autotask.TemplateChangeRoute=function(){"use strict";function t(t){this._requestCoordinator=new Autotask.AjaxRequestCoordinator("GET",t)}return t.prototype._requestCoordinator=null,t.prototype._onResponseProcessing=function(t,e){var i=null;if(null!==t.selectionInstanceId){var n=new Autotask.InstanceTracker(t.selectionInstanceId,null);n.__loadScript(t.selectionInstanceScript),i=autotask.find(t.selectionInstanceId).value,n.__dispose()}var o={sendFromEmailSetting:i,subject:t.subject};null!=e&&e(o)},t.prototype.__notificationTemplateChange=function(t,e){var i=new Autotask.AjaxRequestData(t,!1).__serialize(),n=this;this._requestCoordinator.__sendRequest(i,(function(t){n._onResponseProcessing(t,e)}),null,!1,"NotificationTemplateChange")},t}(),Autotask.NotificationPanel=function(){"use strict";function t(t,e,i,n,o,a,s,r,l,_,u,c,d,h,p,y,g,m){autotask.instanceManagement.__addRegistrationKey(this,t),this._toSelectorId=e,this._toClearLinkId=i,this._carbonCopySelectorId=n,this._carbonCopyClearLinkId=o,this._blindCarbonCopySelectorId=a,this._blindCarbonCopyClearLinkId=s,this._templateSelectorId=r,this._subjectTextBoxId=l,this._additionalEmailTextTextBoxId=_,this._sendFromEmailSelectorId=u,this._customItemSelectorOneId=c,this._customItemSelectorTwoId=d,this._hideBlindCarbonCopyCssClass="HideBlindCarbonCopy",this._hideCarbonCopyCssClass="HideCarbonCopy",this._inactiveCssClass="Inactive",this._applyFilterPointers=[],this._toSelectorImmedaietChangePointers=[],this._isBlindCarbonCopySelectorVisible=!1,this._isCarbonCopySelectorVisible=!1,this._notificationPanelElement=document.getElementById(t);var f=this._notificationPanelElement.firstChild;this._recipientEditorsElement=f.children[0],this._toLabelElement=this._recipientEditorsElement.children[0],this._carbonCopyLabelElement=this._recipientEditorsElement.children[2],this._blindCarbonCopyLabelElement=this._recipientEditorsElement.children[4],this._defaultSettingsDialogUrl=m,this._id=t,this._notificationTemplateChangedRoute=p,this._notificationTemplateItemValueParameterName=y,this._notificationTemplatePreviewHandler=g,this._postingModelParameterName=h,this._isTemplatePreviewEnabled=null!==this._notificationTemplatePreviewHandler}return t.prototype._toLabelElement=null,t.prototype._carbonCopyLabelElement=null,t.prototype._blindCarbonCopyElement=null,t.prototype._additionalEmailTextTextBox=null,t.prototype._additionalEmailTextTextBoxId=null,t.prototype._applyFilterPointers=null,t.prototype._blindCarbonCopyClearLink=null,t.prototype._blindCarbonCopyClearLinkId=null,t.prototype._blindCarbonCopySelector=null,t.prototype._blindCarbonCopySelectorId=null,t.prototype._carbonCopyClearLink=null,t.prototype._carbonCopyClearLinkId=null,t.prototype._carbonCopySelector=null,t.prototype._carbonCopySelectorId=null,t.prototype._customItemSelectorOne=null,t.prototype._customItemSelectorOneId=null,t.prototype._customItemSelectorTwo=null,t.prototype._customItemSelectorTwoId=null,t.prototype._defaultSettingsDialogUrl=null,t.prototype._hideBlindCarbonCopyCssClass=null,t.prototype._hideCarbonCopyCssClass=null,t.prototype._id=null,t.prototype._inactiveCssClass=null,t.prototype._isBlindCarbonCopySelectorVisible=null,t.prototype._isCarbonCopySelectorVisible=null,t.prototype._isTemplatePreviewEnabled=null,t.prototype._notificationPanelElement=null,t.prototype._notificationTemplateChangedRoute=null,t.prototype._notificationTemplateItemValueParameterName=null,t.prototype._notificationTemplatePreviewHandler=null,t.prototype._postingModelParameterName=null,t.prototype._recipientEditorsElement=null,t.prototype._recipientsChangedHandler=null,t.prototype._sendFromEmailSelector=null,t.prototype._sendFromEmailSelectorId=null,t.prototype._subjectTextBox=null,t.prototype._subjectTextBoxId=null,t.prototype._templateSelector=null,t.prototype._templateSelectorId=null,t.prototype._toClearLink=null,t.prototype._toClearLinkId=null,t.prototype._toSelector=null,t.prototype._toSelectorId=null,t.prototype._toSelectorImmedaietChangePointers=null,t.prototype.__get_formTemplateApplicator=function(){return new Autotask.FormTemplateNotificationPanelApplicator(this)},t.prototype.__get_id=function(){return this._id},t.prototype.__get_postingModelParameterName=function(){return this._postingModelParameterName},t.prototype.__get_uniqueEmailCount=function(){return this._calculateUniqueEmailCount()},t.prototype._onApplyFilters=function(t){for(var e=0;e<this._applyFilterPointers.length;e++)this._applyFilterPointers[e](t)},t.prototype._onNotificationTemplateChange=function(t){this.__setSubject(t.subject),null!==t.sendFromEmailSetting&&this.__set_sendFromEmailSetting(t.sendFromEmailSetting)},t.prototype._onRecipientSelectorChanged=function(){this._recipientsChanged(),this._updateClearLinkVisibility(this._toSelector,this._toLabelElement,this._toClearLink),this._updateClearLinkVisibility(this._carbonCopySelector,this._carbonCopyLabelElement,this._carbonCopyClearLink),this._updateClearLinkVisibility(this._blindCarbonCopySelector,this._blindCarbonCopyLabelElement,this._blindCarbonCopyClearLink)},t.prototype._onToRecipientSelectorChanged=function(t){this._recipientsChanged(),this._updateClearLinkVisibility(this._toSelector,this._toLabelElement,this._toClearLink),this._raiseToSelectorImmediateChangeEvent(t.currentValue,t.previousValue)},t.prototype.addToRecipientSelectionByValue=function(t){this._toSelector.addSelectionByValue(t),this._recipientsChanged(),this._updateClearLinkVisibility(this._toSelector,this._toLabelElement,this._toClearLink)},t.prototype.addApplyFilters=function(t){this._applyFilterPointers.push(t)},t.prototype.addToSelectorImmediateChange=function(t){this._toSelectorImmedaietChangePointers.push(t)},t.prototype.clearBlindCarbonCopySelections=function(){this._blindCarbonCopySelector.clearSelection(),this._recipientsChanged(),this._updateClearLinkVisibility(this._blindCarbonCopySelector,this._blindCarbonCopyLabelElement,this._blindCarbonCopyClearLink)},t.prototype.clearCarbonCopySelections=function(){this._carbonCopySelector.clearSelection(),this._recipientsChanged(),this._updateClearLinkVisibility(this._carbonCopySelector,this._carbonCopyLabelElement,this._carbonCopyClearLink)},t.prototype.clearToSelections=function(){this._toSelector.clearSelection(),this._recipientsChanged(),this._updateClearLinkVisibility(this._toSelector,this._toLabelElement,this._toClearLink)},t.prototype.getRecipientSelections=function(){var t=this._toSelector.value.get_itemValues(),e=this._carbonCopySelector.value.get_itemValues(),i=this._blindCarbonCopySelector.value.get_itemValues();return[].concat(t,e,i)},t.prototype.getToRecipientSelections=function(){return this._toSelector.value.get_itemValues()},t.prototype.generateFieldData=function(){return this.__createSerializedRequestData()},t.prototype.getSendFromEmailSelection=function(){return this._sendFromEmailSelector.get_value()},t.prototype.refreshEmailContent=function(t,e){new Autotask.RefreshEmailContentRoute(t).makeRequest(e,autotask.proxy(this.__refreshEmailContentHandler,this))},t.prototype.removeRecipientSelectionsByValue=function(t){this._toSelector.removeSelectionByValue(t),this._isCarbonCopySelectorVisible&&this._carbonCopySelector.removeSelectionByValue(t),this._isBlindCarbonCopySelectorVisible&&this._blindCarbonCopySelector.removeSelectionByValue(t),this._recipientsChanged(),this._updateClearLinkVisibility(this._toSelector,this._toLabelElement,this._toClearLink),this._updateClearLinkVisibility(this._carbonCopySelector,this._carbonCopyLabelElement,this._carbonCopyClearLink),this._updateClearLinkVisibility(this._blindCarbonCopySelector,this._blindCarbonCopyLabelElement,this._blindCarbonCopyClearLink)},t.prototype.removeToRecipientSelectionByValue=function(t){this._toSelector.removeSelectionByValue(t),this._recipientsChanged(),this._updateClearLinkVisibility(this._toSelector,this._toLabelElement,this._toClearLink)},t.prototype.replaceDynamicRecipient=function(t,e){this._beginReplaceDynamicRecipient(),new Autotask.ReplaceDynamicRecipientRoute(t).makeRequest(e,autotask.proxy(this._updateDynamicRecipients,this))},t.prototype.__applyRecipientSelectionChanges=function(t,e,i,n,o){this._toSelector.applyFormTemplateChanges(t,i,n),this._blindCarbonCopySelector.applyFormTemplateChanges(null,i,n);var a=[];null===i||i||(null!==n&&(a=n),null!==o&&(a=a.concat(o))),this._carbonCopySelector.applyFormTemplateChanges(e,i,a),!this._isCarbonCopySelectorVisible&&this._carbonCopySelector.value.get_itemValues().length>0&&this.__showCarbonCopy(),this._recipientsChanged(),this._updateClearLinkVisibility(this._toSelector,this._toLabelElement,this._toClearLink),this._updateClearLinkVisibility(this._carbonCopySelector,this._carbonCopyLabelElement,this._carbonCopyClearLink),this._updateClearLinkVisibility(this._blindCarbonCopySelector,this._blindCarbonCopyLabelElement,this._blindCarbonCopyClearLink)},t.prototype.__clearBlindCopySelections=function(){this._blindCarbonCopySelector.clearSelection(),this._recipientsChanged(),this._updateClearLinkVisibility(this._blindCarbonCopySelector,this._blindCarbonCopyLabelElement,this._blindCarbonCopyClearLink)},t.prototype.__clearCarbonCopySelections=function(){this._carbonCopySelector.clearSelection(),this._recipientsChanged(),this._updateClearLinkVisibility(this._carbonCopySelector,this._carbonCopyLabelElement,this._carbonCopyClearLink)},t.prototype.__clearCarbonCopySelectionsByValue=function(t){this._clearSelectionsByValue(this._carbonCopySelector,t)},t.prototype.__clearToSelections=function(){var t=this._toSelector.value;this._toSelector.clearSelection(),this._recipientsChanged(),this._updateClearLinkVisibility(this._toSelector,this._toLabelElement,this._toClearLink),this._raiseToSelectorImmediateChangeEvent(this._toSelector.value,t)},t.prototype.__clearToSelectionsByValue=function(t){this._clearSelectionsByValue(this._toSelector,t)},t.prototype.__createSerializedRequestData=function(){var t=[this._notificationPanelElement];return new AutotaskRequestDataSystem.SerializedRequestData(t)},t.prototype.__focusToSelector=function(){this._toSelector.focus()},t.prototype.__hideEmptySecondarySelectors=function(){0===this._carbonCopySelector.value.get_itemValues().length&&(this._recipientEditorsElement.classList.add(this._hideCarbonCopyCssClass),this._carbonCopySelector.isEnabled=!1,this._isCarbonCopySelectorVisible=!1),0===this._blindCarbonCopySelector.value.get_itemValues().length&&(this._recipientEditorsElement.classList.add(this._hideBlindCarbonCopyCssClass),this._blindCarbonCopySelector.isEnabled=!1,this._isBlindCarbonCopySelectorVisible=!1)},t.prototype.__initialize=function(){this._toSelector=autotask.find(this._toSelectorId),this._toClearLink=autotask.find(this._toClearLinkId),this._carbonCopySelector=autotask.find(this._carbonCopySelectorId),this._carbonCopyClearLink=autotask.find(this._carbonCopyClearLinkId),this._blindCarbonCopySelector=autotask.find(this._blindCarbonCopySelectorId),this._blindCarbonCopyClearLink=autotask.find(this._blindCarbonCopyClearLinkId),this._templateSelector=autotask.find(this._templateSelectorId),this._subjectTextBox=autotask.find(this._subjectTextBoxId),this._additionalEmailTextTextBox=autotask.find(this._additionalEmailTextTextBoxId),this._sendFromEmailSelector=autotask.find(this._sendFromEmailSelectorId),null!==this._customItemSelectorOneId&&(this._customItemSelectorOne=autotask.find(this._customItemSelectorOneId)),null!==this._customItemSelectorTwoId&&(this._customItemSelectorTwo=autotask.find(this._customItemSelectorTwoId)),this._isCarbonCopySelectorVisible=this._carbonCopySelector.value.get_itemValues().length>0,this._carbonCopySelector.isEnabled=this._isCarbonCopySelectorVisible,this._carbonCopyClearLink.set_enabled(this._isCarbonCopySelectorVisible),this._isBlindCarbonCopySelectorVisible=this._blindCarbonCopySelector.value.get_itemValues().length>0,this._blindCarbonCopySelector.isEnabled=this._isBlindCarbonCopySelectorVisible,this._blindCarbonCopyClearLink.set_enabled(this._isBlindCarbonCopySelectorVisible)},t.prototype.__onTemplateChanged=function(t){var e={};e[this._notificationTemplateItemValueParameterName]=t.clientInstance.get_value(),this._notificationTemplateChangedRoute.__notificationTemplateChange(e,autotask.proxy(this._onNotificationTemplateChange,this))},t.prototype.__onTemplatePreview=function(t){var e={templateId:autotask.find(t).get_value().get_primaryValue()};this._notificationTemplatePreviewHandler(e)},t.prototype.__openDefaultSettingsDialog=function(){autotask.ajax.postRequest(this._defaultSettingsDialogUrl,null,null).dialog()},t.prototype.__registerHandlers=function(){var t=autotask.proxy(this._onApplyFilters,this),e=autotask.proxy(this._onRecipientSelectorChanged,this),i=autotask.proxy(this._onToRecipientSelectorChanged,this);this._toSelector.addApplyFiltersHandler(t),this._toSelector.addImmediateChangeHandler(i),this._carbonCopySelector.addApplyFiltersHandler(t),this._carbonCopySelector.addImmediateChangeHandler(e),this._blindCarbonCopySelector.addApplyFiltersHandler(t),this._blindCarbonCopySelector.addImmediateChangeHandler(e)},t.prototype.__setAdditionalEmailText=function(t){this._additionalEmailTextTextBox.set_value(t)},t.prototype.__set_sendFromEmailSetting=function(t){this._sendFromEmailSelector.set_value(t)},t.prototype.__set_customItemSelectorOne=function(t){null!==this._customItemSelectorOne?this._customItemSelectorOne.set_value(t):autotask.throwException("The first custom item selector is not in the notification panel.")},t.prototype.__set_customItemSelectorTwo=function(t){null!==this._customItemSelectorTwo?this._customItemSelectorTwo.set_value(t):autotask.throwException("The second custom item selector is not in the notification panel.")},t.prototype.__setSubject=function(t){this._subjectTextBox.set_value(t)},t.prototype.__setTemplate=function(t){this._templateSelector.set_value(t)},t.prototype.__setRecipientsChangedHandler=function(t){this._recipientsChangedHandler=t},t.prototype.__showBlindCarbonCopy=function(){this._recipientEditorsElement.classList.remove(this._hideBlindCarbonCopyCssClass),this._blindCarbonCopySelector.isEnabled=!0,this._isBlindCarbonCopySelectorVisible=!0},t.prototype.__showCarbonCopy=function(){this._recipientEditorsElement.classList.remove(this._hideCarbonCopyCssClass),this._carbonCopySelector.isEnabled=!0,this._isCarbonCopySelectorVisible=!0},t.prototype.__refreshEmailContentHandler=function(t,e,i,n,o){this._templateSelector.__populateResponseHandler(t,e,i,n,null),this._subjectTextBox.set_value(o)},t.prototype._addUniqueSelectedEmails=function(t,e){for(var i=e.getAllEmails(),n=null,o=0;o<i.length;o++)n=i[o].toLowerCase(),t.indexOf(n)<0&&t.push(n)},t.prototype._beginReplaceDynamicRecipient=function(){this._toSelector.showLoadingIndicator(),this._carbonCopySelector.showLoadingIndicator(),this._blindCarbonCopySelector.showLoadingIndicator()},t.prototype._calculateUniqueEmailCount=function(){var t=[];return this._addUniqueSelectedEmails(t,this._toSelector),this._isCarbonCopySelectorVisible&&this._addUniqueSelectedEmails(t,this._carbonCopySelector),this._isBlindCarbonCopySelectorVisible&&this._addUniqueSelectedEmails(t,this._blindCarbonCopySelector),t.length},t.prototype._clearSelectionsByValue=function(t,e){},t.prototype._endReplaceDynamicRecipient=function(){this._toSelector.hideLoadingIndicator(),this._carbonCopySelector.hideLoadingIndicator(),this._blindCarbonCopySelector.hideLoadingIndicator()},t.prototype._raiseToSelectorImmediateChangeEvent=function(t,e){if(this._toSelectorImmedaietChangePointers.length>0)for(var i=new Autotask.RecipientSelectorImmediateChangeEventArgs(t,e),n=0;n<this._toSelectorImmedaietChangePointers.length;n++)this._toSelectorImmedaietChangePointers[n](i)},t.prototype._recipientsChanged=function(){null!==this._recipientsChangedHandler&&this._recipientsChangedHandler()},t.prototype._updateDynamicRecipients=function(t){this._toSelector.updateDynamicRecipients(t),this._carbonCopySelector.updateDynamicRecipients(t),this._blindCarbonCopySelector.updateDynamicRecipients(t),this._recipientsChanged(),this._endReplaceDynamicRecipient()},t.prototype._updateClearLinkVisibility=function(t,e,i){0===t.value.get_itemValues().length?(e.classList.add(this._inactiveCssClass),i.set_enabled(!1)):(e.classList.remove(this._inactiveCssClass),i.set_enabled(!0))},t}(),Autotask.NotificationSlideOut=function(){"use strict";function t(t,e,i){autotask.instanceManagement.__addRegistrationKey(this,t),this._id=t,this._panelId=e,this._ownerId=i,this._isActive=!1,this._activeCssClass="Active",this._slideOutElement=document.getElementById(t);var n=this._slideOutElement.firstChild.firstChild;this._handleElement=n.firstChild,this._badgeElement=this._handleElement.children[1],this._tabbingSystem=new AutotaskTabbingSystem.TabbingSystem(this._slideOutElement,autotask.proxy(this._tabbingAwayHandler,this)),this._tabbingAwayHandlers=[]}return t.prototype._activeCssClass=null,t.prototype._badgeElement=null,t.prototype._handleElement=null,t.prototype._id=null,t.prototype._isActive=null,t.prototype._ownerId=null,t.prototype._panel=null,t.prototype._panelId=null,t.prototype._slideOutElement=null,t.prototype._tabbingAwayHandlers=null,t.prototype._tabbingSystem=null,t.prototype._recipientsChanged=function(){var t=this._panel.__get_uniqueEmailCount();this._badgeElement.textContent=t;var e="HasRecipients";t>0?this._badgeElement.classList.add(e):this._badgeElement.classList.remove(e)},t.prototype._toggleActiveState=function(){this._isActive?this._hide():this._show()},Object.defineProperty(t.prototype,"id",{get:function(){return this._id}}),Object.defineProperty(t.prototype,"isEnabled",{get:function(){return this._isActive&&this._tabbingSystem.hasFocusableParticipants}}),t.prototype.get_panel=function(){return this._panel},t.prototype.addTabbingAwayHandler=function(t){this._tabbingAwayHandlers.push(t),this._tabbingSystem.isEnabled||(this._tabbingSystem.reset(),this._tabbingSystem.isEnabled=!0)},t.prototype.focus=function(){this._tabbingSystem.focusFirstParticipant()},t.prototype.focusEnd=function(){this._tabbingSystem.focusLastParticipant()},t.prototype.focusStart=function(){this._tabbingSystem.focusFirstParticipant()},t.prototype.hide=function(){this._hide()},t.prototype.__initialize=function(){this._panel=autotask.find(this._panelId),autotask.find(this._ownerId).__setNotificationSlideOut(this)},t.prototype.__registerHandlers=function(){var t=this;this._handleElement.addEventListener("click",(function(){t._toggleActiveState()}));this._panel.__setRecipientsChangedHandler((function(){t._recipientsChanged()}))},t.prototype._hide=function(){this._isActive=!1,this._slideOutElement.focus(),this._slideOutElement.blur(),this._slideOutElement.classList.remove(this._activeCssClass)},t.prototype._show=function(){this._panel.__focusToSelector(),this._panel.__hideEmptySecondarySelectors(),this._isActive=!0,this._slideOutElement.classList.add(this._activeCssClass)},t.prototype._tabbingAwayHandler=function(t){if(this._tabbingAwayHandlers.length>0)for(var e=new AutotaskTabbingSystem.TabbingAwayEventArgs(this._id,t,(function(){})),i=0;i<this._tabbingAwayHandlers.length;i++)this._tabbingAwayHandlers[i](e)},t}(),window.Autotask.RecipientSelectorImmediateChangeEventArgs=function(){"use strict";function t(t,e){this._currentValue=t,this._previousValue=e}return t.prototype._currentValue=null,t.prototype._previousValue=null,t.prototype.get_currentValue=function(){return this._currentValue},t.prototype.get_previousValue=function(){return this._previousValue},t}(),function(){"use strict";window.Autotask.EventManagement=function(){},window.Autotask.EventManagement.prototype={__executeEditorChangeEvent:function(t,e,i){var n=new Autotask.EditorChangeEventArgs;return null!==t&&void 0!==t.currentTarget&&(n.__id=t.currentTarget.id),n.clientInstance=i,this._executeEditorEvent(n,e)},__executeEditorDoubleClickEvent:function(t,e,i){var n=new Autotask.EditorDoubleClickEventArgs;return n.__id=t.currentTarget.id,n.clientInstance=i,this._executeEditorEvent(n,e)},__executeHandlers:function(t,e,i){for(var n=!0,o=0;o<e.length&&!1!==(n=e[o](t));o++);return!1!==n&&null!==i&&(n=i(t)),n},__stopPropagation:function(t){void 0!==t.stopPropagation?t.stopPropagation():window.event.cancelBubble=!0},_executeEditorEvent:function(t,e){for(var i=!0,n=0;n<e.length&&!1!==(i=e[n](t));n++);return i}}}(),window.Autotask.ApplyFormTemplateRoute=function(){"use strict";function t(t){this._requestCoordinator=new Autotask.AjaxRequestCoordinator("POST",t)}return t.prototype._requestCoordinator=null,t.prototype._onResponseProcessing=function(t,e,i,n,o){var a=new window.AutotaskFormTemplateSystem.FormTemplateStartApplyingEventArgs(t.data);if(i(a),!a.isCanceled){var s=null,r=null,l=null,_=null,u=null,c=null,d=[],h=new Autotask.InstanceTracker(t.formTemplateTrackerKey,null);for(s in h.__loadScript(t.formTemplateScript),t.formTemplateValues)Object.prototype.hasOwnProperty.call(t.formTemplateValues,s)&&(r=t.formTemplateValues[s],l=autotask.find(r),_=t.formTemplateHtml[s],null!==(u=autotask.formTemplateManagement.findParticipantId(e,l.participantToken))&&(c=l.createApplicator(u,_),d.push(c)));h.__dispose(),d.length>0?o(d,t.data):n(t.data)}},t.prototype.__applyFormTemplate=function(t,e,i,n,o,a){var s={};s[t]=e;var r=new Autotask.AjaxRequestData(s,!0).__serialize(),l=this;this._requestCoordinator.__sendRequest(r,(function(t){l._onResponseProcessing(t,i,n,o,a)}),null,!0,"ApplyFormTemplate")},t}(),window.FormTemplateDialogRoute=function(){"use strict";function t(t){this._requestCoordinator=new Autotask.AjaxRequestCoordinator("POST",t)}return t.prototype._requestCoordinator=null,t.prototype._onResponseProcessing=function(t){var e=new Autotask.AjaxResponseHtmlAndJavaScript(t.htmlJavaScriptPair);autotask.dialogManagement.__loadDialog(e)},t.prototype.formTemplateDialog=function(){var t=new Autotask.AjaxRequestData(null,!0).__serialize(),e=this;this._requestCoordinator.__sendRequest(t,(function(t){e._onResponseProcessing(t)}),null,!0,"Dialog")},t}(),Autotask.NotificationPanelApplicator=function(t){"use strict";function e(e,i,n,o,a,s,r,l,_,u,c,d,h,p){t.call(this,e,i,n),this._template=o,this._subject=a,this._additionalEmailText=s,this._sendFromEmailSetting=r,this._toRecipientChipInformationList=l,this._ccRecipientChipInformationList=_,this._customItemSelectorOneValue=u,this._customItemSelectorTwoValue=c,this._isFullSelectionClearingEnabled=d,this._selectionsToClearFromAll=h,this._selectionsToClearFromCarbonCopy=p,this._panel=autotask.find(this.participantId)}return autotask.inherit(e,t),e.prototype._additionalEmailText=null,e.prototype._ccRecipientChipInformationList=null,e.prototype._customItemSelectorOneValue=null,e.prototype._customItemSelectorTwoValue=null,e.prototype._isFullSelectionClearingEnabled=null,e.prototype._panel=null,e.prototype._sendFromEmailSetting=null,e.prototype._selectionsToClearFromAll=null,e.prototype._selectionsToClearFromCarbonCopy=null,e.prototype._subject=null,e.prototype._template=null,e.prototype._toRecipientChipInformationList=null,e.prototype.___get_isParticipantEnabled=function(){return!0},e.prototype.applyValue=function(){this._panel.__setTemplate(this._template),this._panel.__setSubject(this._subject),this._panel.__setAdditionalEmailText(this._additionalEmailText),this._panel.__applyRecipientSelectionChanges(this._toRecipientChipInformationList,this._ccRecipientChipInformationList,this._isFullSelectionClearingEnabled,this._selectionsToClearFromAll,this._selectionsToClearFromCarbonCopy),null!==this._sendFromEmailSetting&&this._panel.__set_sendFromEmailSetting(this._sendFromEmailSetting),null!==this._customItemSelectorOneValue&&this._panel.__set_customItemSelectorOne(this._customItemSelectorOneValue),null!==this._customItemSelectorTwoValue&&this._panel.__set_customItemSelectorTwo(this._customItemSelectorTwoValue)},e}(Autotask.FormTemplateApplicator),Autotask.FormTemplateValueContainer=function(){"use strict";function t(t,e,i){autotask.instanceManagement.__addRegistrationKey(this,t),this.participantToken=e,this._sortIndex=i}return t.prototype.participantToken=null,t.prototype._sortIndex=null,t.prototype.get_sortIndex=function(){return this._sortIndex},t}(),Autotask.NotificationPanelValueContainer=function(t){"use strict";function e(e,i,n,o,a,s,r,l,_,u,c,d,h,p){t.call(this,e,i,n),this._template=o,this._subject=a,this._additionalEmailText=s,this._sendFromEmailSetting=r,this._toRecipientChipInformationList=l,this._ccRecipientChipInformationList=_,this._customItemSelectorOneValue=u,this._customItemSelectorTwoValue=c,this._isFullSelectionClearingEnabled=d,this._selectionsToClearFromAll=h,this._selectionsToClearFromCarbonCopy=p}return autotask.inherit(e,t),e.prototype._additionalEmailText=null,e.prototype._ccRecipientChipInformationList=null,e.prototype._customItemSelectorOneValue=null,e.prototype._customItemSelectorTwoValue=null,e.prototype._isFullSelectionClearingEnabled=null,e.prototype._selectionsToClearFromAll=null,e.prototype._selectionsToClearFromCarbonCopy=null,e.prototype._sendFromEmailSetting=null,e.prototype._subject=null,e.prototype._template=null,e.prototype._toRecipientChipInformationList=null,e.prototype.createApplicator=function(t){return new Autotask.NotificationPanelApplicator(this.participantToken,t,this.sortIndex,this._template,this._subject,this._additionalEmailText,this._sendFromEmailSetting,this._toRecipientChipInformationList,this._ccRecipientChipInformationList,this._customItemSelectorOneValue,this._customItemSelectorTwoValue,this._isFullSelectionClearingEnabled,this._selectionsToClearFromAll,this._selectionsToClearFromCarbonCopy)},e}(Autotask.FormTemplateValueContainer),Autotask.ApproveOrRejectDisplayCell=function(){"use strict";function t(t,e,i,n,o){autotask.instanceManagement.__addRegistrationKey(this,i),this._commentBox=document.getElementById(i),this._approveButtonId=n,this._approveHandler=t,this._rejectButtonId=o,this._rejectHandler=e}return t.prototype._commentBox=null,t.prototype._approveButton=null,t.prototype._approveButtonId=null,t.prototype._approveHandler=null,t.prototype._rejectButton=null,t.prototype._rejectButtonId=null,t.prototype._rejectHandler=null,t.prototype.__initialize=function(){this._approveButton=autotask.find(this._approveButtonId),this._rejectButton=autotask.find(this._rejectButtonId)},t.prototype.__registerHandlers=function(){var t=new AutotaskButtonSystem.ClickEventHandler(autotask.proxy(this._approve,this));this._approveButton.addEventHandler(t);var e=new AutotaskButtonSystem.ClickEventHandler(autotask.proxy(this._reject,this));this._rejectButton.addEventHandler(e)},t.prototype._approve=function(){var t=this._commentBox.value,e=new Autotask.ApproveOrRejectEventArgs(t);this._approveHandler(e)},t.prototype._reject=function(){var t=this._commentBox.value,e=new Autotask.ApproveOrRejectEventArgs(t);this._rejectHandler(e)},t}(),Autotask.ApproveOrRejectEventArgs=function(){"use strict";function t(t){this._comment=t}return t.prototype._comment=null,t.prototype.get_comment=function(){return this._comment},t}(),Autotask.ButtonAndTextBoxEditCell=function(){"use strict";function t(t,e,i,n){autotask.instanceManagement.__addRegistrationKey(this,t),this._bindingPropertyName=e,this._buttonId=n,this._textBoxId=i,this._textBoxElement=document.getElementById(this._textBoxId),this._broadcastedEscapeKeyPressPointers=[],this._broadcastedTabKeyPressPointers=[],this._editDataProviderKeyEventHandler=new AutotaskGridSystem.EditDataProviderKeyEventHandler(this)}return t.prototype._bindingPropertyName=null,t.prototype._broadcastedEscapeKeyPressPointers=null,t.prototype._broadcastedTabKeyPressPointers=null,t.prototype._button=null,t.prototype._buttonId=null,t.prototype._editDataProviderKeyEventHandler=null,t.prototype._originalValue=null,t.prototype._textBox=null,t.prototype._textBoxElement=null,t.prototype._textBoxId=null,t.prototype._onButtonKeyDown=function(t){var e=function(){t.preventDefault()};if(AutotaskDomSystem.KeyCode.isEscape(t.which)){this._broadcastEscapeKeyPress(e,(function(){t.stopPropagation()}))}else AutotaskDomSystem.KeyCode.isTab(t.which)&&this._broadcastTabKeyPress(e,t.shiftKey)},t.prototype.get_isDirty=function(){return null===this._originalValue?null!==this.get_value():this.get_value()!==this._originalValue},t.prototype.get_value=function(){return this._textBox.value},t.prototype.__get_gridEditDataProvider=function(){var t=this,e=new AutotaskGridSystem.EditCellBehaviorCoordinator((function(){return!0}),!1,autotask.proxy(this.get_isDirty,this),(function(){t._textBox.focus()}),null,null);return new AutotaskGridSystem.EditDataProvider(this._editDataProviderKeyEventHandler,null,e,autotask.proxy(this.__get_requestData,this))},t.prototype.__get_requestData=function(){var t={};return t[this._bindingPropertyName]=this.get_value(),t},t.prototype.modifyText=function(t){this._textBox.value=t},t.prototype.__addBroadcastedEnterKeyPress=function(){},t.prototype.__addBroadcastedEscapeKeyPress=function(t){this._broadcastedEscapeKeyPressPointers.push(t)},t.prototype.__addBroadcastedTabKeyPress=function(t){this._broadcastedTabKeyPressPointers.push(t)},t.prototype.__initialize=function(){this._button=autotask.find(this._buttonId),this._textBox=autotask.find(this._textBoxId),this._originalValue=this.get_value()},t.prototype.__registerHandlers=function(){this._button.__addKeyDown(autotask.proxy(this._onButtonKeyDown,this))},t.prototype._broadcastEscapeKeyPress=function(t,e){for(var i=new AutotaskEditorSystem.BroadcastedEscapeKeyPressEventArgs(t,e),n=0;n<this._broadcastedEscapeKeyPressPointers.length;n++)this._broadcastedEscapeKeyPressPointers[n](i)},t.prototype._broadcastTabKeyPress=function(t,e){for(var i=new AutotaskEditorSystem.BroadcastedTabKeyPressEventArgs(this._textBoxElement,e,!1,t),n=0;n<this._broadcastedTabKeyPressPointers.length;n++)this._broadcastedTabKeyPressPointers[n](i)},t}(),Autotask.ButtonAndTextEditCell=function(){"use strict";function t(t,e,i,n,o){autotask.instanceManagement.__addRegistrationKey(this,t),this._bindingPropertyName=e,this._buttonId=o,this._originalValue=i,this._textElement=document.getElementById(n),this._value=i,this._broadcastedEscapeKeyPressPointers=[],this._broadcastedTabKeyPressPointers=[],this._editDataProviderKeyEventHandler=new AutotaskGridSystem.EditDataProviderKeyEventHandler(this)}return t.prototype._bindingPropertyName=null,t.prototype._broadcastedEscapeKeyPressPointers=null,t.prototype._broadcastedTabKeyPressPointers=null,t.prototype._button=null,t.prototype._buttonId=null,t.prototype._editDataProviderKeyEventHandler=null,t.prototype._originalValue=null,t.prototype._textElement=null,t.prototype._value=null,t.prototype._onButtonKeyDown=function(t){var e=function(){t.preventDefault()};if(AutotaskDomSystem.KeyCode.isEscape(t.which)){this._broadcastEscapeKeyPress(e,(function(){t.stopPropagation()}))}else AutotaskDomSystem.KeyCode.isTab(t.which)&&this._broadcastTabKeyPress(e,t.shiftKey)},t.prototype.get_isDirty=function(){return null===this._originalValue?null!==this._value:this._value!==this._originalValue},t.prototype.get_value=function(){return this._value},t.prototype.__get_gridEditDataProvider=function(){var t=this,e=new AutotaskGridSystem.EditCellBehaviorCoordinator((function(){return!0}),!1,autotask.proxy(this.get_isDirty,this),(function(){t._button.__focus()}),null,null);return new AutotaskGridSystem.EditDataProvider(this._editDataProviderKeyEventHandler,null,e,autotask.proxy(this.__get_requestData,this))},t.prototype.__get_requestData=function(){var t={};return t[this._bindingPropertyName]=this._value,t},t.prototype.modifyText=function(t,e){this._textElement.textContent=t,this._value=e},t.prototype.__addBroadcastedEnterKeyPress=function(){},t.prototype.__addBroadcastedEscapeKeyPress=function(t){this._broadcastedEscapeKeyPressPointers.push(t)},t.prototype.__addBroadcastedTabKeyPress=function(t){this._broadcastedTabKeyPressPointers.push(t)},t.prototype.__initialize=function(){this._button=autotask.find(this._buttonId)},t.prototype.__registerHandlers=function(){this._button.__addKeyDown(autotask.proxy(this._onButtonKeyDown,this))},t.prototype._broadcastEscapeKeyPress=function(t,e){for(var i=new AutotaskEditorSystem.BroadcastedEscapeKeyPressEventArgs(t,e),n=0;n<this._broadcastedEscapeKeyPressPointers.length;n++)this._broadcastedEscapeKeyPressPointers[n](i)},t.prototype._broadcastTabKeyPress=function(t,e){for(var i=new AutotaskEditorSystem.BroadcastedTabKeyPressEventArgs(this._textElement,e,!1,t),n=0;n<this._broadcastedTabKeyPressPointers.length;n++)this._broadcastedTabKeyPressPointers[n](i)},t}(),window.Autotask.DateFiltering=function(t){"use strict";function e(e,i,n){t.call(this,e,i,n),this._isCalendarOpen=!1}return autotask.inherit(e,t),e.prototype._isCalendarOpen=null,e.prototype._calendarClosed=function(){this._isCalendarOpen=!1,this.___triggerFilterTimer()},e.prototype._calendarOpened=function(){this._isCalendarOpen=!0,this.___stopFilterTimer()},e.prototype.__registerHandlers=function(){t.prototype.__registerHandlers.call(this),this.___get_editor().addCalendarClosedHandler(autotask.proxy(this._calendarClosed,this)),this.___get_editor().addCalendarOpenedHandler(autotask.proxy(this._calendarOpened,this))},e}(Autotask.ValueFiltering),window.Autotask.DropDownListFiltering=function(t){"use strict";function e(e,i,n){t.call(this,e,i,n)}return autotask.inherit(e,t),e.prototype._onImmediateValueChange=function(){this.___triggerImmediateExecution()},e.prototype.__registerHandlers=function(){this.___get_editor().addChangeHandler(autotask.proxy(this._onImmediateValueChange,this))},e}(Autotask.ValueFiltering),Autotask.GridAggregateValuesShowingEventArgs=function(t){"use strict";function e(){t.call(this),this._filters={}}return autotask.inherit(e,t),e.prototype._filters=null,e.prototype.add=function(t,e){this._filters[t]=e},e.prototype.__applyValues=function(t){var e={};if(null!==t)for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);if("string"==typeof t)autotask.throwException("Data must be an associative array.");else for(var i in this._filters)this._filters.hasOwnProperty(i)&&(e[i]=this._filters[i]);return e},e}(Autotask.GridConfirmationEventArgs),Autotask.GridColumnConfigurationShowingEventArgs=function(t){"use strict";function e(){t.call(this)}return autotask.inherit(e,t),e}(Autotask.GridConfirmationEventArgs),Autotask.GridFilteringEventArgs=function(t){"use strict";function e(){t.call(this)}return autotask.inherit(e,t),e}(Autotask.GridConfirmationEventArgs),Autotask.GridPageSizeChangingEventArgs=function(t){"use strict";function e(){t.call(this)}return autotask.inherit(e,t),e}(Autotask.GridConfirmationEventArgs),Autotask.GridPagingEventArgs=function(t){"use strict";function e(){t.call(this)}return autotask.inherit(e,t),e}(Autotask.GridConfirmationEventArgs),Autotask.GridRowDroppingEventArgs=function(t){"use strict";function e(e){t.call(this),this._filters={},this._isCanceled=!1,this._hasUnselectedChildWithinSelectedParent=e}return autotask.inherit(e,t),e.prototype._filters=null,e.prototype._hasUnselectedChildWithinSelectedParent=null,e.prototype._isCanceled=null,e.prototype.add=function(t,e){this._filters[t]=e},e.prototype.cancel=function(){this._isCanceled=!0},e.prototype.hasUnselectedChildWithinSelectedParent=function(){return this._hasUnselectedChildWithinSelectedParent},e.prototype.__applyValues=function(t){var e={};if(null!==t)for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);if("string"==typeof t)autotask.throwException("Data must be an associative array.");else for(var i in this._filters)this._filters.hasOwnProperty(i)&&(e[i]=this._filters[i]);return e},e.prototype.__isCanceled=function(){return this._isCanceled},e}(Autotask.GridConfirmationEventArgs),Autotask.GridSortingEventArgs=function(t){"use strict";function e(){t.call(this)}return autotask.inherit(e,t),e}(Autotask.GridConfirmationEventArgs),Autotask.GridStateChangeEventArgs=function(t){"use strict";function e(){t.call(this)}return autotask.inherit(e,t),e}(Autotask.GridChangeEventArgs),Autotask.Grid=function(){"use strict";function t(t){autotask.gridInstanceManagement.__registerInstance(this,t),this._grid=document.getElementById(t),this._id=t,this._editEventRegistration=new AutotaskGridSystem.EditEventRegistration,this._eventCoordinator=new AutotaskGridSystem.EventCoordinator(this._editEventRegistration),this._content=new AutotaskGridSystem.Content(t,this._eventCoordinator,this._grid),this._content.__initialize(),this._gridEditorIdGenerator=new Autotask.GridEditorIdGenerator(t),this._gridDisplayData=new Autotask.GridDisplayData(this,this._grid,!0),this._modifiedGridDisplayData=new Autotask.GridDisplayData(this,this._grid,!1),this._tabbingSystem=new AutotaskTabbingSystem.TabbingSystem(this._grid,autotask.proxy(this._tabbingAwayHandler,this))}return t.prototype._grid=null,t.prototype._content=null,t.prototype._eventCoordinator=null,t.prototype._id=null,t.prototype._containingDialogInstance=null,t.prototype._containingTabInstance=null,t.prototype._dialogOpenedHandler=null,t.prototype._editEventRegistration=null,t.prototype._gridDisplayData=null,t.prototype._gridEditorIdGenerator=null,t.prototype._instanceTracker=null,t.prototype._modifiedGridDisplayData=null,t.prototype._tabbingSystem=null,t.prototype._visibleBodyRowData=null,t.prototype.__bulkMenuButtonClick=function(t){var e=this._content.__getRowKeys();t.isSelected?this._content.__selectRowKeys(e,!0,!0):this._content.__unselectRowKeys(e,!0,!0)},t.prototype.__bulkMenuShowing=function(t){var e=this._content.__getSelectedRowKeys();t.data.addStringArray("keyFieldValues",e)},Object.defineProperty(t.prototype,"id",{get:function(){return this._id}}),Object.defineProperty(t.prototype,"isEnabled",{get:function(){return this._tabbingSystem.hasFocusableParticipants}}),t.prototype.get_displayData=function(){return this._gridDisplayData},t.prototype.get_editEventRegistration=function(){return this._editEventRegistration},t.prototype.get_modifiedDisplayData=function(){return this._modifiedGridDisplayData},t.prototype.get_rowKeyCount=function(){return this._content.__getRowKeyCount()},t.prototype.get_rowKeys=function(){return this._content.__getRowKeys()},t.prototype.get_values=function(){return this._content.__getSelectedRowKeys()},t.prototype.get_exportableRowCountForDefaultFormat=function(){return this._content.__getExportableRowCountForDefaultFormat()},t.prototype.get_exportableRowCountForImportFormat=function(){return this._content.__getExportableRowCountForImportFormat()},t.prototype.__get_id=function(){return this._id},t.prototype.addAggregateValuesShowing=function(t){this._eventCoordinator.__addAggregateValuesShowing(t)},t.prototype.addColumnConfigurationShowing=function(t){this._eventCoordinator.__addColumnConfigurationShowing(t)},t.prototype.addExporting=function(t){this._eventCoordinator.__addExporting(t)},t.prototype.addFiltering=function(t){this._eventCoordinator.__addFiltering(t)},t.prototype.addPageSizeChanging=function(t){this._eventCoordinator.__addPageSizeChanging(t)},t.prototype.addPaging=function(t){this._eventCoordinator.__addPaging(t)},t.prototype.addRemovingRows=function(t){this._eventCoordinator.__addRemovingRows(t)},t.prototype.addRowClick=function(t){this._eventCoordinator.__addRowClick(t)},t.prototype.addRowDropped=function(t){this._eventCoordinator.__addRowDropped(t)},t.prototype.addRowDropping=function(t){this._eventCoordinator.__addRowDropping(t)},t.prototype.addSelectionChanged=function(t){this._eventCoordinator.__addSelectionChanged(t)},t.prototype.addSelectionChanging=function(t){this._eventCoordinator.__addSelectionChanging(t)},t.prototype.addSorting=function(t){this._eventCoordinator.__addSorting(t)},t.prototype.addStateChanging=function(t){this._eventCoordinator.__addStateChanging(t)},t.prototype.addTabbingAwayHandler=function(t){this._eventCoordinator.__addTabbingAwayHandler(t),this._tabbingSystem.isEnabled||(this._tabbingSystem.reset(),this._eventCoordinator.__addStateChangedHandler(autotask.proxy(this._stateChangedHandler,this)),this._tabbingSystem.isEnabled=!0)},t.prototype.clearSelections=function(){this._content.__unselectAllRowKeys(!0)},t.prototype.collapseAllRows=function(){this._content.__collapseAllRows()},t.prototype.editRow=function(t){this._content.__editExistingRow(t)},t.prototype.expandAllRows=function(){this._content.__expandAllRows()},t.prototype.exportInDefaultFormat=function(){this._content.__exportInDefaultFormat()},t.prototype.exportInImportFormat=function(){this._content.__exportInImportFormat()},t.prototype.findEditor=function(t,e){var i=this._gridEditorIdGenerator.__generateEditorId(e,t);return autotask.find(i)},t.prototype.focus=function(){this._tabbingSystem.focusFirstParticipant()},t.prototype.focusEnd=function(){this._tabbingSystem.focusLastParticipant()},t.prototype.focusStart=function(){this._tabbingSystem.focusFirstParticipant()},t.prototype.getAccessoryDataValue=function(t,e){return this._content.__getAccessoryDataValue(t,e)},t.prototype.getAccessoryDataValueCount=function(t,e){return this._content.__getAccessoryDataValueCount(t,e)},t.prototype.getRowKeysByAccessoryDataValue=function(t,e){return this._content.__getRowKeysByAccessoryDataValue(t,e)},t.prototype.insertNewRow=function(){this._content.__editNewRow()},t.prototype.refresh=function(t){this.__refresh(null,!1,!1,!1,t)},t.prototype.refreshAndClearState=function(t,e,i){e||this._content.__unselectAllRowKeys(!1);var n=!i;this.__refresh(null,!t,n,n,null)},t.prototype.removeRows=function(t,e,i,n){this._content.__removeRows(t,e,i,n)},t.prototype.selectValues=function(t){this._content.__selectRowKeys(t,!0,!1)},t.prototype.unselectValues=function(t){this._content.__unselectRowKeys(t,!0,!1)},t.prototype.__addShowAllRecords=function(t){this._eventCoordinator.__addShowAllRecords(t)},t.prototype.__arrangeColumns=function(t){this._content.__arrangeColumns(t)},t.prototype.__connectToGateway=function(){return this._content.__connectToGateway()},t.prototype.__dispose=function(){this._content.__dispose(),this._unregisterWithContainingLayoutContainer(),autotask.gridInstanceManagement.__unregisterInstance(this._id),autotask.instanceTrackerManagement.__findInstanceTracker(this._id).__dispose()},t.prototype.__executeFilterRequest=function(){this._content.__executeFilterRequest()},t.prototype.__finalize=function(){this._content.__finalize()},t.prototype.__getImmutableData=function(t){return this._content.__getImmutableData(t)},t.prototype.__initialize=function(){this._registerWithContainingLayoutContainers()||this.__initializeLayout()},t.prototype.__initializeLayout=function(){this._content.__resetLayout()},t.prototype.__isFilterDirty=function(){return this._content.__isFilterDirty()},t.prototype.__refresh=function(t,e,i,n,o){return this._content.__refresh(t,e,i,n,o)},t.prototype.__refreshLayout=function(){this._content.__resizeLayout()},t.prototype.__registerEditCellChangeEventDispatcher=function(t,e){this._content.__registerEditCellChangeEventDispatcher(t,e)},t.prototype.__registerUserInteractionEventHandlers=function(t,e){this._eventCoordinator.__addUserInteractionEventStarted(t),this._eventCoordinator.__addUserInteractionEventEnded(e)},t.prototype.__saveEditing=function(){this._content.__saveEdit()},t.prototype.__showAllRecords=function(t){this._eventCoordinator.__showAllRecords(t)},t.prototype.__showAggregateValuesDialog=function(){this._content.__showAggregateValuesDialog()},t.prototype.__showColumnArrangementDialog=function(){this._content.__showColumnArrangementDialog()},t.prototype.__showDeleteConfirmation=function(t,e){var i=new Autotask.ConfirmationDialogOptions;i.set_confirmPointer(t),i.set_denyPointer(e),i.set_description(autotask.localizedText.gridDeleteConfirmationDescription),i.set_heading(autotask.localizedText.gridDeleteConfirmationHeading),i.set_operation(Autotask.ConfirmationDialogOptions.Operation.Warning),autotask.confirmationDialog.show(i)},t.prototype.__startFilterTimer=function(){this._content.__startFilterTimer()},t.prototype.__stopFilterTimer=function(){this._content.__stopFilterTimer()},t.prototype.__validate=function(t){return this._content.__validateDisplayCells(t)},t.prototype.__validateLegacyEditor=function(t){return this._content.__validateDisplayCellLegacyEditor(t)},t.prototype._registerWithContainingLayoutContainers=function(){var t=!1,e=this._grid.closest(".TabContainer");if(null!==e&&e.id.length>0&&(this._containingTabInstance=autotask.find(e.id),this._containingTabInstance.__registerGrid(this._id),t=!0),null===this._containingTabInstance){var i=this._grid.closest(".Dialog");if(null!==i)this._containingDialogInstance=autotask.find(i.id),this._containingDialogInstance.__registerGrid(this._id),t=!0;else{var n=this._grid.closest(".Dialog1");if(null!==n){this._containingDialogInstance=autotask.find(n.id);var o=this;this._dialogOpenedHandler=function(){o.__initializeLayout()},this._containingDialogInstance.addOpenedHandler(this._dialogOpenedHandler),t=!0}}}return t},t.prototype._stateChangedHandler=function(){this._tabbingSystem.reset()},t.prototype._tabbingAwayHandler=function(t){this._eventCoordinator.__raiseTabbingAwayEvent(this._id,t)},t.prototype._unregisterWithContainingLayoutContainer=function(){null!==this._containingTabInstance&&this._containingTabInstance.__unregisterGrid(this._id),null!==this._containingDialogInstance&&(null!==this._dialogOpenedHandler?this._containingDialogInstance.removeOpenedHandler(this._dialogOpenedHandler):this._containingDialogInstance.__unregisterGrid(this._id))},t}(),window.Autotask.GridAlertDialogManagement=function(){"use strict";function t(){}return t.prototype.__deleteGridRow=function(t){var e=new Autotask.ConfirmationDialogOptions;e.set_confirmPointer(t),e.set_description(autotask.localizedText.gridDeleteConfirmationDescription),e.set_heading(autotask.localizedText.gridDeleteConfirmationHeading),e.set_operation(Autotask.ConfirmationDialogOptions.Operation.Warning),autotask.confirmationDialog.show(e)},t}(),window.Autotask.GridBodyData=function(){"use strict";function t(t,e){this._isIncludeUnmodifiedRowDataEnabled=e;var i=this._generateData(t);this._auxiliaryData=i.auxiliaryData,this._data=i.value,this._isDirty=i.isDirty}return t.prototype._auxiliaryData=null,t.prototype._data=null,t.prototype._isDirty=null,t.prototype._isIncludeUnmodifiedRowDataEnabled=null,t.prototype.__get_auxiliaryData=function(){return this._auxiliaryData},t.prototype.__get_data=function(){return this._data},t.prototype.__get_isDirty=function(){return this._isDirty},t.prototype._generateData=function(t){var e={auxiliaryData:{},isDirty:!1,value:{}},i=null,n=null,o=null;if(null!==t)for(var a=t.rows,s=0;s<a.length;s++)i=a[s],n=new Autotask.GridRowData(i),(this._isIncludeUnmodifiedRowDataEnabled||n.__get_isDirty())&&(o=n.__get_rowKey(),e.auxiliaryData[o]=new Autotask.GridRowAuxiliaryData(n),e.value[o]=n.__get_data(),e.isDirty=e.isDirty||n.__get_isDirty());return e},t}(),window.Autotask.GridCellData=function(){"use strict";function t(t){var e=this._generateData(t.getAttribute("data-alpha-id"));this._data=e.value,this._hasData=e.hasData,this._isDirty=e.isDirty}return t.prototype._data=null,t.prototype._hasData=null,t.prototype._isDirty=null,t.prototype.__get_data=function(){return this._data},t.prototype.__get_hasData=function(){return this._hasData},t.prototype.__get_isDirty=function(){return this._isDirty},t.prototype._generateData=function(t){var e={hasData:!1,isDirty:!1,value:null},i=autotask.find(t);if("function"==typeof i.__get_gridDisplayDataProvider){var n=i.__get_gridDisplayDataProvider();(n.get_isEnabled()||n.get_isDataProvidedWhenDisabled())&&(e.hasData=!0,e.isDirty=n.get_isDirty(),e.value=n.__getRequestData())}else{e.isDirty=i.isDirty;var o=i.createRequestData();null!==o&&(e.hasData=!0,e.value=o)}return e},t}(),function(){"use strict";var t=function(t,e){this._firstVisibleRowIndex=t,this._pageSize=e};t.prototype={_firstVisibleRowIndex:null,_pageSize:null,__get_firstVisibleRowIndex:function(){return this._firstVisibleRowIndex},__set_firstVisibleRowIndex:function(t){this._firstVisibleRowIndex=t},__get_pageSize:function(){return this._pageSize},__moveToPage:function(t){this._firstVisibleRowIndex=(t-1)*this._pageSize+1},__nextPage:function(){this._firstVisibleRowIndex=this._firstVisibleRowIndex+this._pageSize},__previousPage:function(){this._firstVisibleRowIndex=this._firstVisibleRowIndex-this._pageSize}},window.Autotask.GridChangeState=function(t){this._columnsToGroup=[],this._columnsToShow=[],this._prefix="gridState",this._replaceExistingSort=!1,this._gridId=t},window.Autotask.GridChangeState.prototype={_columnToGroup:null,_columnsToShow:null,_gridId:null,_paging:null,_prefix:null,_replaceExistingSort:null,_resetToDefault:null,_sort:null,__get_paging:function(){return this._paging},__get_resetToDefault:function(){return this._resetToDefault},__set_resetToDefault:function(t){this._resetToDefault=t},__get_replaceExistingSort:function(){return this._replaceExistingSort},__set_replaceExistingSort:function(t){this._replaceExistingSort=t},__addColumnToShow:function(t){this._columnsToShow.push(t)},__addColumnToGroup:function(t){this._columnToGroup.push(t)},__addSort:function(t,e){null===this._sort&&(this._sort=[]);var i=e?"Ascending":"Descending";this._sort.push(t+","+i)},__appendPostData:function(t,e){this._appendSimplePostData(t,"GridId",this._gridId),this._appendSimplePostData(t,"ResetToDefault",this._resetToDefault),this._appendEnumerablePostData(t,"ColumnsToShow",this._columnsToShow),this._appendEnumerablePostData(t,"ColumnsToGroup",this._columnToGroup),this._paging&&(this._appendSimplePostData(t,"PagingChanges.FirstVisibleRowIndex",this._paging.__get_firstVisibleRowIndex()),this._appendSimplePostData(t,"PagingChanges.PageSize",this._paging.__get_pageSize())),this._sort&&this._sort.length&&(this._appendSimplePostData(t,"SortingChanges.ReplaceExistingSort",this._replaceExistingSort),this._appendEnumerablePostData(t,"SortingChanges.SortStates",this._sort)),null!==e&&(t[e.parameterName]=e.value)},__initializePaging:function(e,i){this._paging=new t(e,i)},_appendSimplePostData:function(t,e,i){i&&(t[this._prefix+"."+e]=i)},_appendEnumerablePostData:function(t,e,i){if(i)for(var n=0;n<i.length;n++)t[this._prefix+"."+e+"["+n+"]"]=i[n]}}}(),window.Autotask.GridDisplayData=function(){"use strict";function t(t,e,i){this._grid=t,this._gridElement=e,this._isIncludeUnmodifiedRowDataEnabled=i}return t.prototype._grid=null,t.prototype._gridElement=null,t.prototype.get_isDirty=function(){return this._generateGridBodyData().__get_isDirty()},t.prototype.validate=function(){return this._grid.__validate(!1)},t.prototype.validateEditor=function(t){return"function"==typeof t.validate?t.validate():this._grid.__validateLegacyEditor(t)},t.prototype.__mergeWithData=function(t,e){null===e&&window.autotask.throwException("The data object cannot be null when merging GridDisplayData.");var i=this._generateGridBodyData(),n=i.__get_auxiliaryData(),o=i.__get_data(),a=null,s=null,r=0,l=null;for(var _ in o)o.hasOwnProperty(_)&&(l=t+"["+r.toString()+"].",n[_].__get_hasData()&&(a=o[_],this._mergeCellDataForRowKey(a,l,e)),null!==(s=this._grid.__getImmutableData(_))&&this._mergeImmutableDataForRowKey(s,l,e),(n[_].__get_hasData()||null!==s)&&(e[l+"KeyFieldValue"]=_,r++))},t.prototype._generateGridBodyData=function(){var t=this._gridElement.querySelector(".Body").querySelector("tbody");return new Autotask.GridBodyData(t,this._isIncludeUnmodifiedRowDataEnabled)},t.prototype._mergeCellDataForRowKey=function(t,e,i){for(var n in t)t.hasOwnProperty(n)&&(i[e+n]=t[n])},t.prototype._mergeImmutableDataForRowKey=function(t,e,i){var n=t.__get_requestData();for(var o in n)n.hasOwnProperty(o)&&(i[e+o]=n[o])},t}(),Autotask.GridDisplayDataProvider=function(){"use strict";function t(t,e,i,n){this._getIsEnabledPointer=e,this._getIsDirtyPointer=i,this._getRequestDataPointer=t,this._isDataProvidedWhenDisabled=n}return t.prototype._getIsDirtyPointer=null,t.prototype._getIsEnabledPointer=null,t.prototype._getRequestDataPointer=null,t.prototype._isDataProvidedWhenDisabled=null,t.prototype.get_isDirty=function(){return this._getIsDirtyPointer()},t.prototype.get_isEnabled=function(){return this._getIsEnabledPointer()},t.prototype.get_isDataProvidedWhenDisabled=function(){return this._isDataProvidedWhenDisabled},t.prototype.__dispose=function(){this._getIsDirtyPointer=null,this._getIsEnabledPointer=null,this._getRequestDataPointer=null},t.prototype.__getRequestData=function(){return this._getRequestDataPointer()},t}(),function(){"use strict";window.Autotask.GridEditingRow=function(t,e,i,n,o,a,s,r,l,_,u,c,d){this._bodyContainer=n,this._editorIdPrefix=t,this._reconstructionCoordinator=o,this._stateCoordinator=s,this._rowKeySystem=r,this._layoutSystem=l,this._selectionSystem=_,this._contextOverlaySystem=u,this._contextMenuSystem=c,this._refreshSystem=d,this._content=new Autotask.GridEditingRowContent,this._content.__initialize(n),this._eventRegistration=a.__get_editEventRegistration(),this._startExistingRowRoute=e.startEditingExistingRowRoute,this._finishExistingRowRoute=e.finishEditingExistingRowRoute,e.isNewRowEditEnabled&&(this._startNewRowRoute=e.startEditingNewRowRoute,this._finishNewRowRoute=e.finishEditingNewRowRoute),this._postedRowModelParameterName=i.editPostedRowModelParameterName,this._changeEventKey=0,this._pendingChangeEventKeys=[],this._changeEventDispatchers={},this._isActive=!1,this._isSavingActionPending=!1,this._systemsAttribute="data-systems";var h=this._get_editingRow();if(null!==h){if(this._isActive=!0,this._selectionSystem.__preventSelecting(),this._initializeValidation(h),this._registerRowEvents(h),this._focusClosestEditCell(h),this._hasEditCells(h)){var p=this._rowKeySystem.__getRowKeyByRow(h);null===p||0===p.length?this._newRowInitializing(h):this._existingRowInitializing(p,h)}this._content.__adjustScrollPostion()}},window.Autotask.GridEditingRow.prototype={_bodyContainer:null,_changeEventKey:null,_content:null,_contextOverlaySystem:null,_contextMenuSystem:null,_changeEventDispatchers:null,_editorIdPrefix:null,_eventRegistration:null,_finishExistingRowRoute:null,_finishNewRowRoute:null,_gridEditingValidation:null,_isActive:null,_isSavingActionPending:null,_layoutSystem:null,_pendingChangeEventKeys:null,_postedRowModelParameterName:null,_reconstructionCoordinator:null,_refreshSystem:null,_requestCanceler:null,_rowKeySystem:null,_selectionSystem:null,_startExistingRowRoute:null,_startNewRowRoute:null,_stateCoordinator:null,_systemsAttribute:null,__get_isActive:function(){return this._isActive},_get_editingRow:function(){return this._bodyContainer.querySelector("tr.Edit")},_get_editCells:function(){for(var t=[],e=this._get_editingRow().querySelectorAll("["+this._systemsAttribute+"]"),i=0;i<e.length;i++)this._isGridEditRowSystemParticipant(e[i].dataset.systems)&&t.push(e[i]);return t},_continueFirstParticipantTabbedAway:function(t,e){this._removePendingChangeEventKey(t),this._isChangeEventPending()||this._attemptToSaveAndMoveToPreviousLine(e)},_continueLastParticipantTabbedAway:function(t,e){this._removePendingChangeEventKey(t),this._isChangeEventPending()||this._attemptToSaveAndMoveToNextLine(e,!1)},_continueParticipantEnterKeyUp:function(t,e){this._removePendingChangeEventKey(t),this._isChangeEventPending()||this._attemptToSaveAndMoveToNextLine(e,!1)},_continueParticipantChange:function(t){this._removePendingChangeEventKey(t)},_editCellParticipantChange:function(t){if(this._changeEventDispatchers.hasOwnProperty(t.instanceId)){var e=this._addPendingChangeEvent();this._changeEventDispatchers[t.instanceId].dispatchChangeEvent(autotask.proxy(this._continueParticipantChange,this,e))}},_editCellParticipantKeyUp:function(t,e){if(e.isEnter)if(this._changeEventDispatchers.hasOwnProperty(e.broadcasterId)){var i=this._addPendingChangeEvent();this._changeEventDispatchers[e.broadcasterId].dispatchChangeEvent(autotask.proxy(this._continueParticipantEnterKeyUp,this,i,t))}else this._isChangeEventPending()||this._attemptToSaveAndMoveToNextLine(t,!1);else e.isEscape&&this._refreshGrid()},_editCellProviderChange:function(t){if(this._changeEventDispatchers.hasOwnProperty(t.instanceId)){var e=this._addPendingChangeEvent();this._changeEventDispatchers[t.instanceId].dispatchChangeEvent(autotask.proxy(this._continueParticipantChange,this,e))}},_firstEditCellParticipantTabbedAway:function(t,e){if(e.isShiftKeyPressed)if(e.isChangeEventPending&&this._changeEventDispatchers.hasOwnProperty(e.instanceId)){var i=this._addPendingChangeEvent();this._changeEventDispatchers[e.instanceId].dispatchChangeEvent(autotask.proxy(this._continueFirstParticipantTabbedAway,this,i,t))}else this._isChangeEventPending()||this._attemptToSaveAndMoveToPreviousLine(t)},_firstEditCellParticipantTabbingAway:function(t){t.isShiftKeyPressed&&t.cancel()},_lastEditCellParticipantTabbedAway:function(t,e){if(!e.isShiftKeyPressed)if(e.isChangeEventPending&&this._changeEventDispatchers.hasOwnProperty(e.instanceId)){var i=this._addPendingChangeEvent();this._changeEventDispatchers[e.instanceId].dispatchChangeEvent(autotask.proxy(this._continueLastParticipantTabbedAway,this,i,t))}else this._isChangeEventPending()||this._attemptToSaveAndMoveToNextLine(t,!1)},_lastEditCellParticipantTabbingAway:function(t){t.isShiftKeyPressed||t.cancel()},_onEditCellUserTriggeredCancel:function(t){this._refreshGrid(),t.preventDefault(),t.stopPropagation()},_onEditCellUserTriggeredSave:function(t){if(this._changeEventDispatchers.hasOwnProperty(t.broadcasterId)){var e=this._addPendingChangeEvent();this._changeEventDispatchers[t.broadcasterId].dispatchChangeEvent(autotask.proxy(this._continueParticipantEnterKeyUp,this,e,t.get_cell()))}else this._isChangeEventPending()||this._attemptToSaveAndMoveToNextLine(t.get_cell(),!1)},_onFirstEditCellTabOutBackward:function(t){if(this._changeEventDispatchers.hasOwnProperty(t.broadcasterId)){var e=this._addPendingChangeEvent();this._changeEventDispatchers[t.broadcasterId].dispatchChangeEvent(autotask.proxy(this._continueFirstParticipantTabbedAway,this,e,t.get_cell()))}else this._isChangeEventPending()||this._attemptToSaveAndMoveToPreviousLine(t.get_cell())},_onLastEditCellTabOutForward:function(t){if(this._changeEventDispatchers.hasOwnProperty(t.broadcasterId)){var e=this._addPendingChangeEvent();this._changeEventDispatchers[t.broadcasterId].dispatchChangeEvent(autotask.proxy(this._continueLastParticipantTabbedAway,this,e,t.get_cell()))}else this._isChangeEventPending()||this._attemptToSaveAndMoveToNextLine(t.get_cell(),!1)},_startEditingSuccess:function(t){this._requestCanceler=null,this._reconstructionCoordinator.__reconstruct(t.gridContentHtml,t.script,!0)},__cancel:function(){var t=this._get_editingRow();if(null!==t){this._validateSavingState(),autotask.globalValidationOverlay.hide(null),this._layoutSystem.__storeScrollTop();var e=this._rowKeySystem.__getRowKeyByRow(t),i=null===e||0===e.length;this._rowCanceled(i)}},__dispose:function(){this._cancelRequest()},__generateFieldData:function(){var t=this._get_editingRow();return new AutotaskGridSystem.SerializedEditData(t)},__generatePreserveEditingData:function(){var t=this._get_editingRow(),e=null;null!==t&&(e=this._rowKeySystem.__getRowKeyByRow(t));var i=null===e||0===e.length,n=null,o=null;i&&(n=this._rowKeySystem.__getPreviousRowKeyByRowKey(e),o=this._rowKeySystem.__getNextRowKeyByRowKey(e));var a={};return a.rowKey=e,a.isNewRow=i,a.previousRowKey=n,a.nextRowKey=o,a},__registerEditCellChangeEventDispatcher:function(t,e){this._changeEventDispatchers[t]=e},__save:function(){var t=this._get_editingRow();this._save(t,null,!1)},__saveAndEdit:function(t){var e=this._get_editingRow();this._save(e,t,!0)},__startEditing:function(t,e){this._contextOverlaySystem.__get_isEnabled()&&this._contextOverlaySystem.__hideOverlay(),this._contextMenuSystem.__get_isEnabled()&&this._contextMenuSystem.__get_contextOverlay().hide(),null===e?this._stateCoordinator.__storeFocusIndex(0):this._stateCoordinator.__storeFocusIndex(e);var i=!1,n=null;null!==t&&(n=this._rowKeySystem.__getRowKeyByRow(t));var o=this._get_editingRow();if(null!==o&&this._hasChanges()&&(i=!0,this._save(o,n,!0)),!i){this._validateSavingState();var a=this._rowStarting(!1);if(!a.__get_isCanceled()){this._cancelRequest(),this._selectionSystem.__get_isEnabled()&&this._selectionSystem.__unselectAll(!0);var s={};this._applyStartEditingExistingData(s,n),s=a.__applyValues(s);var r=autotask.proxy(this._startEditingSuccess,this);this._requestCanceler=this._startExistingRowRoute.__startEditing(s,r)}}},__startEditingByKeyFieldValue:function(t){var e=this._rowKeySystem.__getRowByRowKey(t);this.__startEditing(e,null)},__startEditingNewRow:function(t){if(this._contextOverlaySystem.__get_isEnabled()&&this._contextOverlaySystem.__hideOverlay(),this._contextMenuSystem.__get_isEnabled()&&this._contextMenuSystem.__get_contextOverlay().hide(),this._isNewRowAllowed()){var e=0;null!==t&&(e=t),this._stateCoordinator.__storeFocusIndex(e);var i=!1,n=this._get_editingRow();if(null!==n&&this._hasChanges()&&(i=!0,this._save(n,null,!0)),!i){this._validateSavingState();var o=this._rowStarting(!0);if(!o.__get_isCanceled()){this._cancelRequest(),this._selectionSystem.__get_isEnabled()&&this._selectionSystem.__unselectAll(!0);var a=o.__applyValues({}),s=autotask.proxy(this._startEditingSuccess,this);this._requestCanceler=this._startNewRowRoute.__startEditing(a,s)}}}else autotask.throwException("New row editing is not configured for this grid.  Please enable new row editing on the grid configuration settings.")},_addPendingChangeEvent:function(){var t=this._changeEventKey+1;return this._changeEventKey=t,this._pendingChangeEventKeys.push(t),t},_attemptToSaveAndMoveToNextLine:function(t,e){var i=this._findEditDataProvider(t);if(null!==i&&(i.forceFormatting(),i.__dispose()),this._gridEditingValidation.__validate()){for(var n=t.closest("tr");!n.classList.contains("Display")&&null!==(n=n.nextElementSibling););var o=null;null!==n?(o=e?this._getEndPoints(n).first:t.cellIndex,this.__startEditing(n,o)):this._isNewRowAllowed()?(o=e?0:t.cellIndex,this.__startEditingNewRow(o)):this._hasChanges()?this._save(t.parentElement,null,!1):this._refreshGrid()}},_attemptToSaveAndMoveToPreviousLine:function(t){var e=this._findEditDataProvider(t);if(null!==e&&(e.forceFormatting(),e.__dispose()),this._gridEditingValidation.__validate()){for(var i=t.closest("tr");!i.classList.contains("Display")&&null!==(i=i.previousElementSibling););if(null!==i){var n=this._getEndPoints(i).last;this.__startEditing(i,n)}else this._hasChanges()?this._save(t.parentElement,null,!1):this._refreshGrid()}},_applyFinishEditingExistingData:function(t,e,i,n){var o="finishEditingExistingData.";t[o+"RowKey"]=e,i&&(t[o+"IsEditingNextRowRequested"]=!0),t[o+"NextRowKey"]=n},_applyFinishEditingNewData:function(t,e,i){var n="finishEditingNewData.";e&&(t[n+"IsEditingNextRowRequested"]=!0),t[n+"NextRowKey"]=i},_applyStartEditingExistingData:function(t,e){t["startEditingExistingData.RowKey"]=e},_cancelRequest:function(){null!==this._requestCanceler&&this._requestCanceler.__cancelRequest()},_existingRowInitializing:function(t,e){for(var i=new AutotaskGridSystem.ExistingEditRowInitializingEventArgs(t,e,this._editorIdPrefix),n=this._eventRegistration.__get_existingRowInitializingPointers(),o=0;o<n.length;o++)n[o](i)},_findEditDataProvider:function(t){var e=null;if(void 0!==t.dataset.alphaId){var i=autotask.find(t.dataset.alphaId);"function"==typeof i.__get_gridEditDataProvider&&(e=i.__get_gridEditDataProvider())}return e},_findFocusCapableParticipant:function(t){var e=null;if(void 0!==t.dataset.systems&&this._isGridEditRowSystemParticipant(t.dataset.systems)){var i=this._findParticipant(t);if("function"==typeof i.__get_gridEditDataProvider){var n=i.__get_gridEditDataProvider();n.get_isEnabled()&&n.get_isFocusCapable()&&(e=i),n.__dispose()}else i.isEnabled&&(e=i)}return e},_findNextClosestFocusCapableParticipant:function(t){for(var e=null,i=t.nextElementSibling;null!==i&&!i.hasAttribute(this._systemsAttribute);)i=i.nextElementSibling;return null!==i&&null===(e=this._findFocusCapableParticipant(i))&&(e=this._findNextClosestFocusCapableParticipant(i)),e},_findParticipant:function(t){return autotask.find(t.dataset.alphaId)},_findPreviousClosestFocusCapableParticipant:function(t){for(var e=null,i=t.previousElementSibling;null!==i&&!i.hasAttribute(this._systemsAttribute);)i=i.previousElementSibling;return null!==i&&null===(e=this._findFocusCapableParticipant(i))&&(e=this._findPreviousClosestFocusCapableParticipant(i)),e},_focusClosestEditCell:function(t){var e=this._stateCoordinator.__getFocusIndex();if(null!==e&&null!==t){var i=t.children[e],n=this._findFocusCapableParticipant(i);if(null===n&&null===(n=this._findPreviousClosestFocusCapableParticipant(i))&&(n=this._findNextClosestFocusCapableParticipant(i)),null!==n)if("function"==typeof n.__get_gridEditDataProvider){var o=n.__get_gridEditDataProvider();o.focus(),o.__dispose()}else n.focus()}},_getEndPoints:function(t){var e=null,i=null;if(t.classList.contains("Edit"))for(var n=this._get_editCells(),o=null,a=null,s=0;s<n.length;s++)null!==(a=this._findEditDataProvider(n[s]))?(a.get_isEnabled()&&a.get_isFocusCapable()&&(o=n[s].cellIndex,null===e&&(e=o),(null===i||o>i)&&(i=o)),a.__dispose()):this._findParticipant(n[s]).isEnabled&&(o=n[s].cellIndex,null===e&&(e=o),(null===i||o>i)&&(i=o));else e=0,i=t.lastElementChild.cellIndex;return{first:e,last:i}},_hasChanges:function(){for(var t=!1,e=this._get_editCells(),i=null,n=0;n<e.length;n++)if(null!==(i=this._findEditDataProvider(e[n]))){if(i.get_isDirty()){t=!0,i.__dispose();break}}else if(this._findParticipant(e[n]).isDirty){t=!0;break}return t},_hasEditCells:function(t){for(var e=!1,i=t.querySelectorAll("td["+this._systemsAttribute+"]"),n=0;n<i.length;n++)if(this._isGridEditRowSystemParticipant(i[n].dataset.systems)){e=!0;break}return e},_initializeValidation:function(t){this._gridEditingValidation=new Autotask.GridEditingValidation(t),this._gridEditingValidation.__parse()},_isChangeEventPending:function(){return this._pendingChangeEventKeys.length>0},_isGridEditRowSystemParticipant:function(t){return"1"===t[2]},_isNewRowAllowed:function(){return null!==this._finishNewRowRoute},_newRowInitializing:function(t){for(var e=new AutotaskGridSystem.NewEditRowInitializingEventArgs(t,this._editorIdPrefix),i=this._eventRegistration.__get_newRowInitializingPointers(),n=0;n<i.length;n++)i[n](e)},_processSaveGridRowResponse:function(t,e){this._requestCanceler=null;var i=!1,n=null,o=this._get_editingRow(),a=null;null!==o&&(a=this._rowKeySystem.__getRowKeyByRow(o));var s=null===a||0===a.length;if(null!==t.businessLogicErrors&&void 0!==t.businessLogicErrors){for(var r=o;!r.classList.contains("ValidationResultRow")&&null!==(r=r.nextElementSibling););if(i=t.businessLogicErrors.length>0){var l=t.businessLogicErrors.join(" ");r.querySelector(".Error").textContent=l,r.classList.add("Active")}else r.classList.remove("Active");this._content.__adjustScrollPostion()}else null!==t.savingFailedData&&void 0!==t.savingFailedData&&(n=t.savingFailedData);t.isValidationFailed?this._rowSaveFailed(s,i,n,e):(this._reconstructionCoordinator.__reconstruct(t.gridContentHtml,t.script,!0),this._rowSaved(s))},_refreshGrid:function(){this._refreshSystem.__refresh(null,!1,!1,!1,null)},_registerRowEvents:function(t){var e=this._getEndPoints(t);if(null!==e.first&&e.first>-1){var i=t.children[e.first],n=this._findEditDataProvider(i);if(null!==n)n.addTabOutBackward(autotask.proxy(this._onFirstEditCellTabOutBackward,this)),n.__dispose();else{var o=this._findParticipant(i);o.addTabbingAwayHandler(autotask.proxy(this._firstEditCellParticipantTabbingAway,this)),o.addTabbedAwayHandler(autotask.proxy(this._firstEditCellParticipantTabbedAway,this,i))}}if(null!==e.last&&e.last>-1){var a=t.children[e.last],s=this._findEditDataProvider(a);if(null!==s)s.addTabOutForward(autotask.proxy(this._onLastEditCellTabOutForward,this)),s.__dispose();else{var r=this._findParticipant(a);r.addTabbingAwayHandler(autotask.proxy(this._lastEditCellParticipantTabbingAway,this)),r.addTabbedAwayHandler(autotask.proxy(this._lastEditCellParticipantTabbedAway,this,a))}}for(var l=this._get_editCells(),_=null,u=null,c=0;c<l.length;c++)null!==(_=this._findEditDataProvider(l[c]))?(_.addUserTriggeredCancel(autotask.proxy(this._onEditCellUserTriggeredCancel,this)),_.addUserTriggeredSave(autotask.proxy(this._onEditCellUserTriggeredSave,this)),_.addChangeHandler(autotask.proxy(this._editCellProviderChange,this)),_.__dispose()):((u=this._findParticipant(l[c])).addBroadcastKeyUpHandler(autotask.proxy(this._editCellParticipantKeyUp,this,l[c])),u.addChangeHandler(autotask.proxy(this._editCellParticipantChange,this)))},_removePendingChangeEventKey:function(t){this._pendingChangeEventKeys.splice(this._pendingChangeEventKeys.indexOf(t),1)},_rowCanceled:function(t){var e=null;e=t?this._eventRegistration.__get_newRowCanceledPointers():this._eventRegistration.__get_existingRowCanceledPointers();for(var i=0;i<e.length;i++)e[i]()},_rowSaved:function(t){var e=null;e=t?this._eventRegistration.__get_newRowSavedPointers():this._eventRegistration.__get_existingRowSavedPointers();for(var i=0;i<e.length;i++)e[i]()},_rowSaveFailed:function(t,e,i,n){var o=null;o=t?this._eventRegistration.__get_newRowSaveFailedPointers():this._eventRegistration.__get_existingRowSaveFailedPointers();for(var a=new AutotaskGridSystem.EditRowSaveFailedEventArgs(this,e,i,n),s=0;s<o.length;s++)o[s](a)},_rowSaving:function(t){var e=null;e=t?this._eventRegistration.__get_newRowSavingPointers():this._eventRegistration.__get_existingRowSavingPointers();for(var i=new AutotaskGridSystem.EditRowSavingEventArgs,n=0;n<e.length;n++)e[n](i);return i},_rowStarting:function(t){var e=null;e=t?this._eventRegistration.__get_newRowStartingPointers():this._eventRegistration.__get_existingRowStartingPointers();for(var i=new AutotaskGridSystem.EditRowStartingEventArgs,n=0;n<e.length;n++)e[n](i);return i},_save:function(t,e,i){if(this._validateSavingState(),i&&null===e&&!this._isNewRowAllowed()&&autotask.throwException("New row editing is not configured for this grid.  Please enable new row editing on the grid configuration settings."),null!==t&&this._gridEditingValidation.__validate()){this._cancelRequest();var n=this._rowKeySystem.__getRowKeyByRow(t),o=null===n||0===n.length,a={};if(o?this._applyFinishEditingNewData(a,i,e):this._applyFinishEditingExistingData(a,n,i,e),o&&this._eventRegistration.__get_newRowSavingPointers().length>0||this._eventRegistration.__get_existingRowSavingPointers().length>0)a=this._rowSaving(o).__applyValues(a);a[this._postedRowModelParameterName]=new AutotaskGridSystem.SerializedEditData(t),null==e&&this._layoutSystem.__storeScrollTop();var s=this,r=function(t){s._processSaveGridRowResponse(t,e)};this._requestCanceler=o?this._finishNewRowRoute.__saveRow(a,r):this._finishExistingRowRoute.__saveRow(a,r)}},_validateSavingState:function(){this._isSavingActionPending&&autotask.throwException("The inline edit saving event was handled without executing the abort or save delegate.")},_validateSavingAction:function(){this._isSavingActionPending||autotask.throwException("The inline edit saving abort or save delegate was executed while the grid editing row was in an invalid state.")}}}(),function(){"use strict";window.Autotask.GridEditingRowContent=function(){this._editingSupportRowSelector="tr.Edit, tr.ValidationResultRow, tr.EditingButtonRow"},window.Autotask.GridEditingRowContent.prototype={_bodyContainer:null,_editingSupportRowSelector:null,__adjustScrollPostion:function(){var t=Array.from(this._bodyContainer.querySelectorAll(this._editingSupportRowSelector));autotask.scrolling.__scrollUntilVisible(t,0,!0)},__initialize:function(t){this._bodyContainer=t}}}(),window.Autotask.GridEditorIdGenerator=function(){"use strict";function t(t){this._gridId=t}return t.prototype._gridId=null,t.prototype.__generateEditorId=function(t,e){return this._gridId+t+e},t}(),window.Autotask.GridRowAuxiliaryData=function(){"use strict";function t(t){this._hasData=t.__get_hasData(),this._isDirty=t.__get_isDirty()}return t.prototype._hasData=null,t.prototype._isDirty=null,t.prototype.__get_hasData=function(){return this._hasData},t.prototype.__get_isDirty=function(){return this._isDirty},t}(),window.Autotask.GridRowData=function(){"use strict";function t(t){this._rowKey=t.getAttribute("data-row-key");var e=this._generateData(t);this._data=e.value,this._hasData=e.hasData,this._isDirty=e.isDirty}return t.prototype._data=null,t.prototype._hasData=null,t.prototype._isDirty=null,t.prototype._rowKey=null,t.prototype.__get_data=function(){return this._data},t.prototype.__get_hasData=function(){return this._hasData},t.prototype.__get_isDirty=function(){return this._isDirty},t.prototype.__get_rowKey=function(){return this._rowKey},t.prototype._generateData=function(t){for(var e={hasData:!1,isDirty:!1,value:{}},i=null,n=null,o=null,a=t.querySelectorAll("[data-systems]"),s=0;s<a.length;s++)if(this._isRequestDataSystemParticipant(a[s].dataset.systems))for(o in(i=new Autotask.GridCellData(a[s])).__get_hasData()&&(e.hasData=!0),i.__get_isDirty()&&(e.isDirty=!0),n=i.__get_data())n.hasOwnProperty(o)&&(e.value[o]=n[o]);return e},t.prototype._isRequestDataSystemParticipant=function(t){return"1"===t[1]},t}(),function(){"use strict";window.Autotask.GridSelectionChangedEventArgs=function(t,e,i,n){this._selectionCount=t,this._selectionKeyFieldValues=e,this._keyFieldValueSubtractions=i,this._keyFieldValueAdditions=n},window.Autotask.GridSelectionChangedEventArgs.prototype={_selectionCount:null,_selectionKeyFieldValues:null,_keyFieldValueAdditions:null,_keyFieldValueSubtractions:null,get_selectionCount:function(){return this._selectionCount},get_keyFieldValueAdditions:function(){return this._keyFieldValueAdditions},get_keyFieldValueSubtractions:function(){return this._keyFieldValueSubtractions},get_selectionKeyFieldValues:function(){return this._selectionKeyFieldValues}}}(),function(){"use strict";window.Autotask.GridSelectionChangingEventArgs=function(t,e,i){this._selectionCount=t,this._expectedKeyFieldValueSubtractions=e,this._expectedKeyFieldValueAdditions=i,this._isCancelled=!1},window.Autotask.GridSelectionChangingEventArgs.prototype={_selectionCount:null,_expectedKeyFieldValueAdditions:null,_expectedKeyFieldValueSubtractions:null,_isCancelled:null,get_selectionCount:function(){return this._selectionCount},get_expectedSelectionCount:function(){return this._selectionCount+this._expectedKeyFieldValueAdditions.length-this._expectedKeyFieldValueSubtractions.length},get_expectedKeyFieldValueAdditions:function(){return this._expectedKeyFieldValueAdditions},get_expectedKeyFieldValueSubtractions:function(){return this._expectedKeyFieldValueSubtractions},__get_isCancelled:function(){return this._isCancelled},cancel:function(){this._isCancelled=!0}}}(),function(){"use strict";var t="above",e="below",i="into",n="Hold",o="Drag",a="Off";window.Autotask.InteractionColumnDragAndDrop=function(t,e,i,n,o,s,r,l,_,u,c,d){this._rowDropSystem=t,this._rowKeySystem=e,this._selectionSystem=n,this._contextOverlaySystem=o,this._contextMenuSystem=s,this._rowDropRoute=u,this._rowNestingSystem=i,this._editSystem=r,this._bodyContainer=_,this._scrollContainer=AutotaskDomSystem.Document.getChildElementByClassName(this._bodyContainer,"Scrolling"),this._rowElements=l,this._dragIndicator=this._bodyContainer.querySelector(".DragIndicator"),this._dragInProgressCssClass="DragInProgress",this._droppableCssClass="Droppable",this._state=a,this._document=document,this._lastValidDropPosition={row:null,region:null},this._dragStatus=this._bodyContainer.querySelector(".DragStatus"),this._dragStatusMessages=d,this._isDropIntoEnabled=c,this._scroller=new AutotaskScrollingSystem.AnimatedScroller(this._scrollContainer),this._ieSelectionHack=autotask.browserDetection.isInternetExplorer()&&window.top.location!=window.location,this._registerHandlers()},window.Autotask.InteractionColumnDragAndDrop.prototype={_bodyContainer:null,_dragIndicator:null,_dragStatus:null,_rowElements:null,_scrollContainer:null,_contextOverlaySystem:null,_contextMenuSystem:null,_document:null,_dragTimer:null,_dropIntoMargin:5,_droppableCssClass:null,_dragStatusMessages:null,_editSystem:null,_ieSelectionHack:null,_isDropIntoEnabled:null,_lastRowElement:null,_lastRowHasIndicator:null,_lastValidDropPosition:null,_rowDropSystem:null,_rowDropRoute:null,_rowKeySystem:null,_rowNestingSystem:null,_scroller:null,_selectedIndex:null,_selectedIndexGroups:null,_selectionSystem:null,_state:null,__get_isDragInProgress:function(){return this._state==o},__mouseDown:function(){this._editSystem.__get_isActive()||(this._state=n,this._ieSelectionHack&&(document.body.focus(),this._toggleUnselectable(this._bodyContainer,!0)))},__mouseLeave:function(){this._editSystem.__get_isActive()||this._state==n&&this._enableDrag()},__mouseMove:function(t,e,i,n){if(!this._editSystem.__get_isActive()&&this.__get_isDragInProgress()){var o=this._findRegion(t,e);this._isValidDropPosition(t,o)?(this._positionDragStatus(i,n),this._loadDragStatusText(t,o),this._positionDragIndicator(t,o),this._lastValidDropPosition.row=t,this._lastValidDropPosition.region=o):this._hideDragIndicator()}},__mouseUp:function(t,e){if(!this._editSystem.__get_isActive()&&this.__get_isDragInProgress()){this._disableDrag();var i=this._findRegion(t,e);if(this._isValidDropPosition(t,i)){var n=this._createRowDropAjaxData(t,i);this._rowDrop(n)}}},_bodyContainerMouseEnter:function(t){this._scroller.stopVerticalScrolling()},_bodyContainerMouseLeave:function(t){if(this.__get_isDragInProgress()){this._hideDragIndicator();var e=this._scrollContainer.getBoundingClientRect();if(t.pageY<e.top)this._scroller.scrollUp();else{var i=this._scrollContainer.offsetHeight;t.pageY>=e.top+i&&this._scroller.scrollDown()}}},_dragIndicatorMouseUp:function(t){if(this.__get_isDragInProgress()){this._disableDrag();var e=this._createRowDropAjaxData(this._lastValidDropPosition.row,this._lastValidDropPosition.region);this._rowDrop(e)}},_globalMouseUp:function(t){if(this._lastRowHasIndicator){var e=this._lastRowElement;this.__mouseUp(e,autotask.layoutAnalysis.__calculateOffsetY(t))}else this._disableDrag()},_lastRowMouseLeave:function(t){if(this.__get_isDragInProgress()){var i=t.currentTarget,n=this._findRegion(i,autotask.layoutAnalysis.__calculateOffsetY(t));n==e&&(this._lastRowHasIndicator=!0,this._isValidDropPosition(i,n)&&(this._positionDragStatus(t.pageX,t.pageY),this._loadDragStatusText(i,n),this._positionDragIndicator(i,n)))}},_disableDrag:function(){this._state=a,this._bodyContainer.classList.remove(this._dragInProgressCssClass),this._ieSelectionHack&&this._toggleUnselectable(this._bodyContainer,!1),this._scroller.stopVerticalScrolling(),this._contextOverlaySystem.__resumeOperation(),this._contextMenuSystem.__resumeOperation(),this._hideDragIndicator()},_createRowDropAjaxData:function(t,n){var o=null,a=null,s=null,r=null,l=null;n==e?(o=this._rowKeySystem.__getRowKeyByRow(t),null!==(r=t.nextElementSibling)&&(a=this._rowKeySystem.__getRowKeyByRow(r))):(null!==(l=t.previousElementSibling)&&(o=this._rowKeySystem.__getRowKeyByRow(l)),n==i?(s=this._rowKeySystem.__getRowKeyByRow(t),null!==(r=t.nextElementSibling)&&(a=this._rowKeySystem.__getRowKeyByRow(r))):a=this._rowKeySystem.__getRowKeyByRow(t));var _={selectedKeyFieldValues:this._selectionSystem.__getSelectedRowKeys()};return null!==o&&(_.previousKeyFieldValue=o),null!==a&&(_.nextKeyFieldValue=a),null!==s&&(_.keyFieldValue=s),_},_enableDrag:function(){this._state=o,this._bodyContainer.classList.add(this._dragInProgressCssClass);var t=this._selectionSystem.__getSelectedRowKeys();if(1===t.length)this._selectedIndex=this._rowKeySystem.__getRowIndexByRowKey(t[0]);else{for(var e=[],i=0;i<t.length;i++)e.push(this._rowKeySystem.__getRowIndexByRowKey(t[i]));this._selectedIndexGroups=this._getSelectedIndexGroups(e)}this._contextOverlaySystem.__suspendOperation(),this._contextMenuSystem.__suspendOperation()},_getSelectedIndexGroups:function(t){var e=[];if(t.length){var i=[],n=0;e.push(i);var o=t[0];for(n=0;n<t.length;n++)t[n]===o?(i.push(t[n]),o++):(i=[],e.push(i),i.push(t[n]),o=t[n]+1)}return e},_findRegion:function(n,o){var a=null;if(this._isAdvancedDraggingEnabled()&&this._isDropIntoEnabled){var s=this._getHeight(n)-this._dropIntoMargin;a=o<this._dropIntoMargin?t:o>s?e:i}else{a=o>Math.ceil(this._getHeight(n)/2)?e:t}return a},_formatDragStatusMessage:function(t,e){if(arguments.length>1)for(var i=0;i<arguments.length-1;i++){var n=new RegExp("\\{"+i+"\\}","gm");t=t.replace(n,arguments[i+1])}return t},_getHeight:function(t){return parseFloat(getComputedStyle(t).height.replace("px",""))},_hideDragIndicator:function(){null!==this._dragIndicator&&this._dragIndicator.classList.remove("Active"),this._isAdvancedDraggingEnabled()&&null!==this._dragStatus&&this._dragStatus.classList.remove("Active"),this._lastRowHasIndicator=!1},_isAdvancedDraggingEnabled:function(){return this._rowNestingSystem.__get_isEnabled()},_isValidDropPositionForContinuousSelection:function(i,n,o){var a=!0,s=n,r=i[0]-1;if((r<0?null:this._rowElements[r])==s&&o==e)a=!1;else{var l=i[i.length-1]+1;if((l>this._rowElements.length-1?null:this._rowElements[l])==s&&o==t)a=!1;else for(var _=0;_<i.length;_++)this._rowElements[i[_]]==s&&(a=!1)}return a},_isMultipleSelectionDropValid:function(i,n,o){var a=!0,s=n;if(o!=t&&this._rowElements[i[0]]==s)a=!1;else if(o!=e&&this._rowElements[i[i.length-1]]==s)a=!1;else if(i.length>2)for(var r=1;r<i.length-1;r++)if(this._rowElements[i[r]]==s){a=!1;break}return a},_isValidDropPosition:function(t,e){var n=!0;if(null!==this._selectedIndex){var o=[];o.push(this._selectedIndex),n=this._isValidDropPositionForContinuousSelection(o,t,e)}else if(1==this._selectedIndexGroups.length)n=this._isValidDropPositionForContinuousSelection(this._selectedIndexGroups[0],t,e);else for(var a=t,s=0;s<this._selectedIndexGroups.length;s++){var r=this._selectedIndexGroups[s];if(!1===(n=1==r.length&&this._rowElements[r[0]]==a?e!=i:this._isMultipleSelectionDropValid(r,t,e)))break}return n},_loadDragStatusText:function(n,o){if(this._isAdvancedDraggingEnabled()){var a=this._selectionSystem.__getCount(),s=n,r=null;switch(o){case i:r=a>1?this._dragStatusMessages.itemsInto:this._dragStatusMessages.itemInto;break;case t:r=a>1?this._dragStatusMessages.itemsAbove:this._dragStatusMessages.itemAbove;break;case e:var l=n.nextElementSibling;null!==l?(r=a>1?this._dragStatusMessages.itemsAbove:this._dragStatusMessages.itemAbove,s=l):r=a>1?this._dragStatusMessages.itemsBelow:this._dragStatusMessages.itemBelow}var _=s.querySelector("td.OrderedSelectionCell .Text").textContent;this._dragStatus.textContent=this._formatDragStatusMessage(r,_,1==a?"":a)}},_performRowDropAjaxCall:function(t){this._rowDropSystem.__requestRowDrop(this._rowDropRoute,t)},_positionDragIndicator:function(n,o){switch(o){case i:this._showDragIndicator(n.offsetTop+Math.ceil(this._getHeight(n)/2),!0);break;case t:this._showDragIndicator(n.offsetTop);break;case e:this._showDragIndicator(n.offsetTop+this._getHeight(n))}},_positionDragStatus:function(t,e){if(this._isAdvancedDraggingEnabled()){var i=window.innerHeight-e<60?-60:20;this._dragStatus.style.left=t+20+"px",this._dragStatus.style.top=e+i+"px"}},_registerHandlers:function(){if(this._rowElements.length>0){var t=this._rowElements.slice(-1)[0];t.addEventListener("mouseleave",autotask.proxy(this._lastRowMouseLeave,this)),this._lastRowElement=t}this._scrollContainer.addEventListener("mouseleave",autotask.proxy(this._bodyContainerMouseLeave,this)),this._scrollContainer.addEventListener("mouseenter",autotask.proxy(this._bodyContainerMouseEnter,this)),null!==this._dragIndicator&&this._dragIndicator.addEventListener("mouseup",autotask.proxy(this._dragIndicatorMouseUp,this)),document.addEventListener("mouseup",autotask.proxy(this._globalMouseUp,this))},_resetHideDraggingTimer:function(){window.clearTimeout(this._dragTimer)},_hasUnselectedChildWithinSelectedParent:function(){var t=!1;if(this._isAdvancedDraggingEnabled()){for(var e=[],i=this._selectionSystem.__getSelectedRowKeys(),n=0;n<i.length;n++)e.push(this._rowKeySystem.__getRowIndexByRowKey(i[n]));for(var o=this._rowNestingSystem.__get_rowInformation(),a=0;a<e.length;){var s=e[a];a++;var r=o[s];if(r.isNestingPoint){a++;for(var l=r.depth,_=s+1,u=o[_];void 0!==u&&u.depth>l;){if(a++,e.indexOf(_)<0){t=!0;break}u=o[_+=1]}}if(t)break}}return t},_rowDrop:function(t){var e=this._hasUnselectedChildWithinSelectedParent(),i=new Autotask.GridRowDroppingEventArgs(e);if(this._rowDropSystem.__raiseRowDroppingEvent(i),!1===i.__isCanceled())if(t=i.__applyValues(t),i.__get_isConfirmationDialogEnabled()){var n=this,o=i.__get_confirmationDialogOptions((function(){n._performRowDropAjaxCall(t)}),null);autotask.confirmationDialog.show(o)}else this._performRowDropAjaxCall(t)},_showDragIndicator:function(t,e){this._dragIndicator.setAttribute("style","top:"+t.toString()+"px"),this._dragIndicator.classList.add("Active"),this._isAdvancedDraggingEnabled()&&this._dragStatus.classList.add("Active"),!0===e?this._dragIndicator.classList.add("RowHover"):this._dragIndicator.classList.remove("RowHover")},_toggleUnselectable:function(t,e){1==t.nodeType&&(e?t.setAttribute("unselectable","on"):t.removeAttribute("unselectable"));for(var i=t.firstChild;i;)this._toggleUnselectable(i,e),i=i.nextSibling}}}(),Autotask.LinkAttachmentDisplayCell=function(){"use strict";function t(t,e){autotask.instanceManagement.__addRegistrationKey(this,t),this._dialogRoute=e}return t.prototype._dialogRoute=null,t.prototype.openDialog=function(){this._dialogRoute.__makeRequest(null,null)},t}(),Autotask.Pixel16IconEditCell=function(){"use strict";function t(t,e,i,n,o,a,s){autotask.instanceManagement.__addRegistrationKey(this,t),this._pixel16IconContainer=document.getElementById(e).firstElementChild,this._pixel16Icon=this._pixel16IconContainer.firstElementChild,this._bindingPropertyName=i,this._colorCss=a,this._iconCss=o,this._iconPickerOverlayId=s,this._originalValue=n,this._value=n,this._changePointers=[],this._editDataProviderKeyEventHandler=new AutotaskGridSystem.EditDataProviderKeyEventHandler(this)}return t.prototype._pixel16Icon=null,t.prototype._pixel16IconContainer=null,t.prototype._bindingPropertyName=null,t.prototype._changePointers=null,t.prototype._colorCss=null,t.prototype._editDataProviderKeyEventHandler=null,t.prototype._iconCss=null,t.prototype._iconPickerOverlay=null,t.prototype._iconPickerOverlayId=null,t.prototype._originalValue=null,t.prototype._value=null,t.prototype.get_isDirty=function(){return this._value!==this._originalValue},t.prototype.get_value=function(){return this._value},t.prototype.set_color=function(t){this._setColorCss(t)},t.prototype.__get_gridEditDataProvider=function(){var t=new AutotaskGridSystem.EditCellBehaviorCoordinator((function(){return!0}),!1,autotask.proxy(this.get_isDirty,this),null,null,null);return new AutotaskGridSystem.EditDataProvider(this._editDataProviderKeyEventHandler,null,t,autotask.proxy(this.__get_requestData,this))},t.prototype.__get_requestData=function(){var t={};return t[this._bindingPropertyName]=this._value,t},t.prototype._click=function(){this._iconPickerOverlay.__applyColorCss(this._colorCss),this._iconPickerOverlay.__show(this._pixel16Icon,this._value)},t.prototype._iconSelected=function(t,e){this._setIconCss(e),this._value=autotask.convert.stringToInteger(t);for(var i=0;i<this._changePointers.length;i++)this._changePointers[i](this._value)},t.prototype.addChange=function(t){null!==t&&this._changePointers.push(t)},t.prototype.__addBroadcastedEnterKeyPress=function(){},t.prototype.__addBroadcastedEscapeKeyPress=function(){},t.prototype.__addBroadcastedTabKeyPress=function(){},t.prototype.__initialize=function(){this._iconPickerOverlay=autotask.find(this._iconPickerOverlayId)},t.prototype.__registerHandlers=function(){this._pixel16Icon.addEventListener("click",autotask.proxy(this._click,this)),this._iconPickerOverlay.__set_itemSelectedDelegate(autotask.proxy(this._iconSelected,this))},t.prototype._setColorCss=function(t){var e=autotask.globalColorPicker.getColorCss(t);this._pixel16IconContainer.classList.remove(this._colorCss),this._pixel16IconContainer.classList.add(e),this._colorCss=e},t.prototype._setIconCss=function(t){this._pixel16Icon.classList.remove(this._iconCss),this._pixel16Icon.classList.add(t),this._iconCss=t},t}(),Autotask.PriorityIconEditCell=function(){"use strict";function t(t,e,i,n,o,a,s){autotask.instanceManagement.__addRegistrationKey(this,t),this._priorityIconContainer=document.getElementById(e).firstElementChild,this._priorityIcon=this._priorityIconContainer.firstElementChild,this._bindingPropertyName=i,this._colorCss=a,this._iconCss=o,this._iconPickerOverlayId=s,this._originalValue=n,this._value=n,this._changePointers=[],this._editDataProviderKeyEventHandler=new AutotaskGridSystem.EditDataProviderKeyEventHandler(this)}return t.prototype._priorityIcon=null,t.prototype._priorityIconContainer=null,t.prototype._bindingPropertyName=null,t.prototype._changePointers=null,t.prototype._colorCss=null,t.prototype._editDataProviderKeyEventHandler=null,t.prototype._iconCss=null,t.prototype._iconPickerOverlay=null,t.prototype._iconPickerOverlayId=null,t.prototype._originalValue=null,t.prototype._value=null,t.prototype.get_isDirty=function(){return this._value!==this._originalValue},t.prototype.get_value=function(){return this._value},t.prototype.set_color=function(t){this._setColorCss(t)},t.prototype.__get_gridEditDataProvider=function(){var t=new AutotaskGridSystem.EditCellBehaviorCoordinator((function(){return!0}),!1,autotask.proxy(this.get_isDirty,this),null,null,null);return new AutotaskGridSystem.EditDataProvider(this._editDataProviderKeyEventHandler,null,t,autotask.proxy(this.__get_requestData,this))},t.prototype.__get_requestData=function(){var t={};return t[this._bindingPropertyName]=this._value,t},t.prototype._click=function(){this._iconPickerOverlay.__applyColorCss(this._colorCss),this._iconPickerOverlay.__show(this._priorityIcon,this._value)},t.prototype._iconSelected=function(t,e){this._setIconCss(e),this._value=autotask.convert.stringToInteger(t);for(var i=0;i<this._changePointers.length;i++)this._changePointers[i](this._value)},t.prototype.addChange=function(t){null!==t&&this._changePointers.push(t)},t.prototype.__addBroadcastedEnterKeyPress=function(){},t.prototype.__addBroadcastedEscapeKeyPress=function(){},t.prototype.__addBroadcastedTabKeyPress=function(){},t.prototype.__initialize=function(){this._iconPickerOverlay=autotask.find(this._iconPickerOverlayId)},t.prototype.__registerHandlers=function(){this._priorityIcon.addEventListener("click",autotask.proxy(this._click,this)),this._iconPickerOverlay.__set_itemSelectedDelegate(autotask.proxy(this._iconSelected,this))},t.prototype._setColorCss=function(t){var e=autotask.globalColorPicker.getColorCss(t);this._priorityIconContainer.classList.remove(this._colorCss),this._priorityIconContainer.classList.add(e),this._colorCss=e},t.prototype._setIconCss=function(t){this._priorityIcon.classList.remove(this._iconCss),this._priorityIcon.classList.add(t),this._iconCss=t},t}(),window.Autotask.SingleDataSelectorFiltering=function(t){"use strict";function e(e,i,n){t.call(this,e,i,n)}return autotask.inherit(e,t),e.prototype._onValueChange=function(){this.___triggerImmediateExecution()},e.prototype.__registerHandlers=function(){this.___get_editor().addImmediateChangeHandler(autotask.proxy(this._onValueChange,this))},e}(Autotask.ValueFiltering),window.Autotask.SingleItemSelectorFiltering=function(t){"use strict";function e(e,i,n){t.call(this,e,i,n)}return autotask.inherit(e,t),e.prototype._onValueChange=function(){this.___triggerImmediateExecution()},e.prototype.__registerHandlers=function(){this.___get_editor().addChangeHandler(autotask.proxy(this._onValueChange,this))},e}(Autotask.ValueFiltering),window.AutotaskGridSystem.ContextMenuRoute=function(){"use strict";function t(t,e){this._requestCoordinator=new Autotask.AjaxRequestCoordinator("GET",t),this._rowKeyParameterName=e}return t.prototype._requestCoordinator=null,t.prototype._rowKeyParameterName=null,t.prototype._onPipelineExecution=function(t,e){t.set_alertDialogOkayDelegate(e)},t.prototype._onResponseProcessing=function(t,e){var i={};if(i.isDataUnavailable=t.isDataUnavailable,!0!==t.isDataUnavailable){var n=new Autotask.AjaxResponseHtmlAndJavaScript(t.htmlJavaScriptPair);i.htmlForInstanceTrackerContainer=n.htmlForInstanceTrackerContainer,i.script=n.script}e(i)},t.prototype.__makeRequest=function(t,e,i){var n={};n[this._rowKeyParameterName]=t;var o=new Autotask.AjaxRequestData(n,!1).__serialize(),a=this;this._requestCoordinator.__setPipelineExecutionDelegate((function(t){a._onPipelineExecution(t,e)}));this._requestCoordinator.__sendRequest(o,(function(t){a._onResponseProcessing(t,i)}),null,!1,"ContextOverlay");return new Autotask.AjaxRequestCanceler((function(){a._requestCoordinator.__cancelRequest()}))},t}(),window.AutotaskGridSystem.ContextOverlayRoute=function(){"use strict";function t(t,e,i){this._requestCoordinator=new Autotask.AjaxRequestCoordinator("GET",t),this._rowKeyParameterName=e,this._behavior=i}return t.prototype._behavior=null,t.prototype._requestCoordinator=null,t.prototype._rowKeyParameterName=null,t.prototype._onPipelineExecution=function(t,e){t.set_alertDialogOkayDelegate(e)},t.prototype._onResponseProcessing=function(t,e){var i={};if(i.isDataUnavailable=t.isDataUnavailable,!0!==t.isDataUnavailable){var n=new Autotask.AjaxResponseHtmlAndJavaScript(t.htmlJavaScriptPair);i.htmlForInstanceTrackerContainer=n.htmlForInstanceTrackerContainer,i.script=n.script}e(i)},t.prototype.__makeRequest=function(t,e,i){var n=new AutotaskGridSystem.DisplayCellContextOverlayShowingEventArgs;null!==this._behavior&&this._behavior(n);var o=n.get_data();o.addString(this._rowKeyParameterName,t);var a=o.__data,s=new Autotask.AjaxRequestData(a,!1).__serialize(),r=this;this._requestCoordinator.__setPipelineExecutionDelegate((function(t){r._onPipelineExecution(t,e)}));this._requestCoordinator.__sendRequest(s,(function(t){r._onResponseProcessing(t,i)}),null,!1,"ContextOverlay");return new Autotask.AjaxRequestCanceler((function(){r._requestCoordinator.__cancelRequest()}))},t}(),window.AutotaskGridSystem.FinishEditingRowRoute=function(){"use strict";function t(t){this._requestCoordinator=new Autotask.AjaxRequestCoordinator("POST",t)}return t.prototype._requestCoordinator=null,t.prototype._onResponseProcessing=function(t,e){var i={gridContentHtml:t.gridContentHtml,script:t.script,isValidationFailed:t.isValidationFailed,businessLogicErrors:t.businessLogicErrors,savingFailedData:t.savingFailedData};null!=e&&e(i)},t.prototype.__saveRow=function(t,e){var i=new Autotask.AjaxRequestData(t,!0).__serialize(),n=this;this._requestCoordinator.__sendRequest(i,(function(t){n._onResponseProcessing(t,e)}),null,!0,"FinishGridEditing");return new Autotask.AjaxRequestCanceler((function(){n._requestCoordinator.__cancelRequest()}))},t}(),window.AutotaskGridSystem.RowDropRoute=function(){"use strict";function t(t){this._requestCoordinator=new Autotask.AjaxRequestCoordinator("POST",t)}return t.prototype._requestCoordinator=null,t.prototype._onResponseProcessing=function(t,e){var i={isGridRowDropSuccessful:t.isGridRowDropSuccessful,gridContentHtml:t.gridContentHtml,script:t.script};null!=e&&e(i)},t.prototype.__rowDrop=function(t,e){var i=new Autotask.AjaxRequestData(t,!0).__serialize(),n=this;this._requestCoordinator.__sendRequest(i,(function(t){n._onResponseProcessing(t,e)}),null,!0,"GridRowDrop");return new Autotask.AjaxRequestCanceler((function(){n._requestCoordinator.__cancelRequest()}))},t}(),window.AutotaskGridSystem.StartEditingRowRoute=function(){"use strict";function t(t){this._requestCoordinator=new Autotask.AjaxRequestCoordinator("POST",t)}return t.prototype._requestCoordinator=null,t.prototype._onResponseProcessing=function(t,e){var i={gridContentHtml:t.gridContentHtml,script:t.script};null!=e&&e(i)},t.prototype.__startEditing=function(t,e){var i=new Autotask.AjaxRequestData(t,!0).__serialize(),n=this;this._requestCoordinator.__sendRequest(i,(function(t){n._onResponseProcessing(t,e)}),null,!0,"StartGridEditing");return new Autotask.AjaxRequestCanceler((function(){n._requestCoordinator.__cancelRequest()}))},t}(),window.AutotaskGridSystem.StateChangeRoute=function(){"use strict";function t(t){this._requestCoordinator=new Autotask.AjaxRequestCoordinator("POST",t)}return t.prototype._requestCoordinator=null,t.prototype._onResponseProcessing=function(t,e){var i={gridContentHtml:t.gridContentHtml,script:t.script};null!=e&&e(i)},t.prototype.__stateChange=function(t,e){var i=new Autotask.AjaxRequestData(t,!0).__serialize(),n=this;this._requestCoordinator.__sendRequest(i,(function(t){n._onResponseProcessing(t,e)}),null,!0,"GridStateChange");return new Autotask.AjaxRequestCanceler((function(){n._requestCoordinator.__cancelRequest()}))},t}(),window.AutotaskGridSystem.Content=function(){"use strict";function t(t,e,i){this._id=t,this._eventCoordinator=e,this._grid=i,this._editStateCoordinator=new AutotaskGridSystem.EditStateCoordinator,this._layoutStateCoordinator=new AutotaskGridSystem.LayoutStateCoordinator,this._nestingStorage=new AutotaskGridSystem.NestingStorage,this._reconstructionCoordinator=new AutotaskGridSystem.ReconstructionCoordinator(this,t,e,i),this._selectionStorage=new AutotaskGridSystem.SelectionStorage}return t.prototype._grid=null,t.prototype._editStateCoordinator=null,t.prototype._eventCoordinator=null,t.prototype._gateway=null,t.prototype._id=null,t.prototype._layoutStateCoordinator=null,t.prototype._nestingStorage=null,t.prototype._reconstructionCoordinator=null,t.prototype._selectionStorage=null,t.prototype.__arrangeColumns=function(t){this._gateway.__get_refreshSystem().__arrangeColumns(t)},t.prototype.__connectToGateway=function(){return this._gateway},t.prototype.__collapseAllRows=function(){this._gateway.__get_rowNestingSystem().__collapseAll()},t.prototype.__dispose=function(){this._gateway.__dispose()},t.prototype.__editExistingRow=function(t){this._gateway.__get_editSystem().__editExistingRow(t)},t.prototype.__editNewRow=function(){this._gateway.__get_editSystem().__editNewRow()},t.prototype.__executeFilterRequest=function(){this._gateway.__get_filterSystem().__executeRequest()},t.prototype.__expandAllRows=function(){this._gateway.__get_rowNestingSystem().__expandAll()},t.prototype.__exportInDefaultFormat=function(){this._gateway.__get_exportSystem().__exportInDefaultFormat()},t.prototype.__exportInImportFormat=function(){this._gateway.__get_exportSystem().__exportInImportFormat()},t.prototype.__finalize=function(){this._gateway.__finalize()},t.prototype.__getAccessoryDataValue=function(t,e){return this._gateway.__get_rowAccessoryDataSystem().__getAccessoryDataValue(t,e)},t.prototype.__getAccessoryDataValueCount=function(t,e){return this._gateway.__get_rowAccessoryDataSystem().__getAccessoryDataValueCount(t,e)},t.prototype.__getExportableRowCountForDefaultFormat=function(){return this._gateway.__get_exportSystem().__get_exportableRowCountForDefaultFormat()},t.prototype.__getExportableRowCountForImportFormat=function(){return this._gateway.__get_exportSystem().__get_exportableRowCountForImportFormat()},t.prototype.__getImmutableData=function(t){return this._gateway.__get_rowImmutableDataSystem().__getImmutableData(t)},t.prototype.__getRowKeyCount=function(){return this._gateway.__get_rowKeySystem().__getRowKeyCount()},t.prototype.__getRowKeys=function(){return this._gateway.__get_rowKeySystem().__getRowKeysInRowOrder()},t.prototype.__getRowKeysByAccessoryDataValue=function(t,e){return this._gateway.__get_rowAccessoryDataSystem().__getRowKeysByAccessoryDataValue(t,e)},t.prototype.__getSelectedRowKeys=function(){return this._gateway.__get_selectionSystem().__getSelectedRowKeys()},t.prototype.__initialize=function(){this._gateway=new AutotaskGridSystem.Gateway(this._id,this._eventCoordinator,this._reconstructionCoordinator,this._layoutStateCoordinator,this._editStateCoordinator,this._selectionStorage,this._nestingStorage,this._grid)},t.prototype.__isFilterDirty=function(){return this._gateway.__get_filterSystem().__isDirty()},t.prototype.__refresh=function(t,e,i,n,o){this._gateway.__get_refreshSystem().__refresh(t,e,i,n,o)},t.prototype.__registerEditCellChangeEventDispatcher=function(t,e){this._gateway.__get_editSystem().__registerEditCellChangeEventDispatcher(t,e)},t.prototype.__removeRows=function(t,e,i,n){this._gateway.__get_refreshSystem().__removeRows(t,e,i,n)},t.prototype.__resetLayout=function(){this._gateway.__get_layoutSystem().__reset();var t=this._gateway.__get_automaticSizingSystem();t.__get_isEnabled()&&t.__reset()},t.prototype.__resizeLayout=function(){this._gateway.__get_layoutSystem().__resize(),this._gateway.__get_automaticSizingSystem().__get_isEnabled()&&this._gateway.__get_automaticSizingSystem().__resize()},t.prototype.__saveEdit=function(){this._gateway.__get_editSystem().__saveEdit()},t.prototype.__selectRowKeys=function(t,e,i){this._gateway.__get_selectionSystem().__selectRowKeys(t,e,i)},t.prototype.__showAggregateValuesDialog=function(){this._gateway.__get_aggregateValuesSystem().__showDialog()},t.prototype.__showColumnArrangementDialog=function(){this._gateway.__get_columnArrangementSystem().__showDialog()},t.prototype.__startFilterTimer=function(){this._gateway.__get_filterSystem().__startTimer()},t.prototype.__stopFilterTimer=function(){this._gateway.__get_filterSystem().__stopTimer()},t.prototype.__unselectAllRowKeys=function(t){var e=this._gateway.__get_selectionSystem();e.__get_isEnabled()&&e.__unselectAll(t)},t.prototype.__unselectRowKeys=function(t,e,i){this._gateway.__get_selectionSystem().__unselectRowKeys(t,e,i)},t.prototype.__validateDisplayCellLegacyEditor=function(t){this._gateway.__get_displayCellValidationSystem().__validateDisplayCellLegacyEditor(t)},t.prototype.__validateDisplayCells=function(t){return this._gateway.__get_displayCellValidationSystem().__validateDisplayCells(t)},t}(),window.AutotaskGridSystem.EditCellBehaviorCoordinator=function(){"use strict";function t(t,e,i,n,o,a){null===t&&autotask.throwException("getIsEnabledPointer is required."),null===i&&autotask.throwException("getIsDirtyPointer is required."),this._forceFormattingPointer=o,null!==n?(this._focusPointer=n,this._isFocusCapable=!0):this._isFocusCapable=!1,this._getIsDirtyPointer=i,this._getIsEnabledPointer=t,this._isDataProvidedWhenEnabled=e,this._triggerChangePointer=a}return t.prototype._forceFormattingPointer=null,t.prototype._focusPointer=null,t.prototype._getIsDirtyPointer=null,t.prototype._getIsEnabledPointer=null,t.prototype._isDataProvidedWhenEnabled=null,t.prototype._isFocusCapable=null,t.prototype._triggerChangePointer=null,t.prototype.get_isDataProvidedWhenDisabled=function(){return this._isDataProvidedWhenEnabled},t.prototype.get_isDirty=function(){return this._getIsDirtyPointer()},t.prototype.get_isEnabled=function(){return this._getIsEnabledPointer()},t.prototype.get_isFocusCapable=function(){return this._isFocusCapable},t.prototype.focus=function(){null!==this._focusPointer&&this._focusPointer()},t.prototype.forceFormatting=function(){null!==this._forceFormattingPointer&&this._forceFormattingPointer()},t.prototype.triggerChange=function(){null!==this._triggerChangePointer&&this._triggerChangePointer()},t.prototype.__dispose=function(){this._forceFormattingPointer=null,this._focusPointer=null,this._getIsDirtyPointer=null,this._getIsEnabledPointer=null,this._triggerChangePointer=null},t}(),window.AutotaskGridSystem.EditDataProvider=function(){"use strict";function t(t,e,i,n){null===n&&autotask.throwException("getRequestDataPointer is required."),this._editDataProviderKeyEventHandler=t,this._changeEventHandler=e,this._editCellBehaviorCoordinator=i,this._getRequestDataPointer=n}return t.prototype._changeEventHandler=null,t.prototype._editCellBehaviorCoordinator=null,t.prototype._editDataProviderKeyEventHandler=null,t.prototype._getRequestDataPointer=null,t.prototype.get_isDataProvidedWhenDisabled=function(){return this._editCellBehaviorCoordinator.get_isDataProvidedWhenDisabled()},t.prototype.get_isDirty=function(){return this._editCellBehaviorCoordinator.get_isDirty()},t.prototype.get_isEnabled=function(){return this._editCellBehaviorCoordinator.get_isEnabled()},t.prototype.get_isFocusCapable=function(){return this._editCellBehaviorCoordinator.get_isFocusCapable()},t.prototype.get_requestData=function(){return this._getRequestDataPointer()},t.prototype.addChangeHandler=function(t){null!==this._changeEventHandler&&this._changeEventHandler.__addChangeHandler(t)},t.prototype.addTabOutBackward=function(t){this._editDataProviderKeyEventHandler.__addTabOutBackward(t)},t.prototype.addTabOutForward=function(t){this._editDataProviderKeyEventHandler.__addTabOutForward(t)},t.prototype.addUserTriggeredCancel=function(t){this._editDataProviderKeyEventHandler.__addUserTriggeredCancel(t)},t.prototype.addUserTriggeredSave=function(t){this._editDataProviderKeyEventHandler.__addUserTriggeredSave(t)},t.prototype.focus=function(){this._editCellBehaviorCoordinator.focus()},t.prototype.forceFormatting=function(){this._editCellBehaviorCoordinator.forceFormatting()},t.prototype.triggerChange=function(){this._editCellBehaviorCoordinator.triggerChange()},t.prototype.__dispose=function(){this._editCellBehaviorCoordinator.__dispose(),this._getRequestDataPointer=null},t}(),window.AutotaskGridSystem.EditDataProviderChangeEventHandler=function(){"use strict";function t(t){"function"!=typeof t.addChange&&autotask.throwException("__addChange must be a function."),t.addChange(autotask.proxy(this._change,this)),this._changeHandlers=[]}return t.prototype._changeHandlers=null,t.prototype._change=function(t){var e={};e.instanceId=t.clientInstance.id;for(var i=0;i<this._changeHandlers.length;i++)this._changeHandlers[i](e)},t.prototype.__addChangeHandler=function(t){this._changeHandlers.push(t)},t}(),window.AutotaskGridSystem.EditDataProviderKeyEventHandler=function(){"use strict";function t(t){"function"!=typeof t.__addBroadcastedEnterKeyPress&&autotask.throwException("The framework instance must implement the function __addBroadcastedEnterKeyPress."),"function"!=typeof t.__addBroadcastedEscapeKeyPress&&autotask.throwException("The framework instance must implement the function __addBroadcastedEscapeKeyPress."),"function"!=typeof t.__addBroadcastedTabKeyPress&&autotask.throwException("The framework instance must implement the function __addBroadcastedTabKeyPress."),t.__addBroadcastedEnterKeyPress(autotask.proxy(this._onBroadcastedEnterKeyPress,this)),t.__addBroadcastedEscapeKeyPress(autotask.proxy(this._onBroadcastedEscapeKeyPress,this)),t.__addBroadcastedTabKeyPress(autotask.proxy(this._onBroadcastedTabKeyPress,this)),this._tabOutBackwardPointers=[],this._tabOutForwardPointers=[],this._userTriggeredCancelPointers=[],this._userTriggeredSavePointers=[]}return t.prototype._tabOutBackwardPointers=null,t.prototype._tabOutForwardPointers=null,t.prototype._userTriggeredCancelPointers=null,t.prototype._userTriggeredSavePointers=null,t.prototype._onBroadcastedEnterKeyPress=function(t){var e={},i=this;e.get_cell=function(){return i._findCell(t.get_frameworkInstanceElement())},e.preventDefault=function(){t.preventDefault()};for(var n=0;n<this._userTriggeredSavePointers.length;n++)this._userTriggeredSavePointers[n](e)},t.prototype._onBroadcastedEscapeKeyPress=function(t){for(var e={preventDefault:function(){t.preventDefault()},stopPropagation:function(){t.stopPropagation()}},i=0;i<this._userTriggeredCancelPointers.length;i++)this._userTriggeredCancelPointers[i](e)},t.prototype._onBroadcastedTabKeyPress=function(t){var e={},i=this;if(e.get_cell=function(){return i._findCell(t.get_frameworkInstanceElement())},e.preventDefault=function(){t.preventDefault()},t.get_isShiftKeyPressed())for(var n=0;n<this._tabOutBackwardPointers.length;n++)this._tabOutBackwardPointers[n](e);else for(var o=0;o<this._tabOutForwardPointers.length;o++)this._tabOutForwardPointers[o](e)},t.prototype.__addTabOutBackward=function(t){this._tabOutBackwardPointers.push(t)},t.prototype.__addTabOutForward=function(t){this._tabOutForwardPointers.push(t)},t.prototype.__addUserTriggeredCancel=function(t){this._userTriggeredCancelPointers.push(t)},t.prototype.__addUserTriggeredSave=function(t){this._userTriggeredSavePointers.push(t)},t.prototype._findCell=function(t){return t.closest("td")},t}(),window.AutotaskGridSystem.EditEventRegistration=function(){"use strict";function t(){this._existingRowCanceledPointers=[],this._existingRowInitializingPointers=[],this._existingRowSavedPointers=[],this._existingRowSaveFailedPointers=[],this._existingRowSavingPointers=[],this._existingRowStartingPointers=[],this._newRowCanceledPointers=[],this._newRowInitializingPointers=[],this._newRowSavedPointers=[],this._newRowSaveFailedPointers=[],this._newRowSavingPointers=[],this._newRowStartingPointers=[]}return t.prototype._existingRowCanceledPointers=null,t.prototype._existingRowInitializingPointers=null,t.prototype._existingRowSavedPointers=null,t.prototype._existingRowSaveFailedPointers=null,t.prototype._existingRowSavingPointers=null,t.prototype._existingRowStartingPointers=null,t.prototype._newRowCanceledPointers=null,t.prototype._newRowInitializingPointers=null,t.prototype._newRowSavedPointers=null,t.prototype._newRowSaveFailedPointers=null,t.prototype._newRowSavingPointers=null,t.prototype._newRowStartingPointers=null,t.prototype.__get_existingRowCanceledPointers=function(){return this._existingRowCanceledPointers},t.prototype.__get_existingRowInitializingPointers=function(){return this._existingRowInitializingPointers},t.prototype.__get_existingRowSavedPointers=function(){return this._existingRowSavedPointers},t.prototype.__get_existingRowSaveFailedPointers=function(){return this._existingRowSaveFailedPointers},t.prototype.__get_existingRowSavingPointers=function(){return this._existingRowSavingPointers},t.prototype.__get_existingRowStartingPointers=function(){return this._existingRowStartingPointers},t.prototype.__get_newRowCanceledPointers=function(){return this._newRowCanceledPointers},t.prototype.__get_newRowInitializingPointers=function(){return this._newRowInitializingPointers},t.prototype.__get_newRowSavedPointers=function(){return this._newRowSavedPointers},t.prototype.__get_newRowSaveFailedPointers=function(){return this._newRowSaveFailedPointers},t.prototype.__get_newRowSavingPointers=function(){return this._newRowSavingPointers},t.prototype.__get_newRowStartingPointers=function(){return this._newRowStartingPointers},t.prototype.existingRowCanceled=function(t){return this._existingRowCanceledPointers.push(t)},t.prototype.existingRowInitializing=function(t){return this._existingRowInitializingPointers.push(t)},t.prototype.existingRowSaved=function(t){return this._existingRowSavedPointers.push(t)},t.prototype.existingRowSaveFailed=function(t){return this._existingRowSaveFailedPointers.push(t)},t.prototype.existingRowSaving=function(t){return this._existingRowSavingPointers.push(t)},t.prototype.existingRowStarting=function(t){return this._existingRowStartingPointers.push(t)},t.prototype.newRowCanceled=function(t){return this._newRowCanceledPointers.push(t)},t.prototype.newRowInitializing=function(t){return this._newRowInitializingPointers.push(t)},t.prototype.newRowSaved=function(t){return this._newRowSavedPointers.push(t)},t.prototype.newRowSaveFailed=function(t){return this._newRowSaveFailedPointers.push(t)},t.prototype.newRowSaving=function(t){return this._newRowSavingPointers.push(t)},t.prototype.newRowStarting=function(t){return this._newRowStartingPointers.push(t)},t}(),window.AutotaskGridSystem.EditStateCoordinator=function(){"use strict";function t(){this._focusIndex=0}return t.prototype._focusIndex=null,t.prototype.__getFocusIndex=function(){return this._focusIndex},t.prototype.__storeFocusIndex=function(t){this._focusIndex=t},t}(),window.AutotaskGridSystem.DisplayCellContextOverlayShowingEventArgs=function(){"use strict";function t(){this._data=new AutotaskRequestDataSystem.RequestData}return t.prototype._data=null,t.prototype.get_data=function(){return this._data},t}(),window.AutotaskGridSystem.EditRowInitializingEventArgs=function(){"use strict";function t(t,e){this._editingRow=t,this._editorIdPrefix=e}return t.prototype._editingRow=null,t.prototype._editorIdPrefix=null,t.prototype.findFrameworkInstance=function(t){var e=null;if(null!==this._editingRow){var i=this._editorIdPrefix+t,n=this._editingRow.querySelector("td[data-beta-id="+i+"]");if(null!==n){var o=autotask.find(n.dataset.alphaId);switch(!0){case o instanceof Autotask.Checkbox:e={get_enabled:function(){return o.get_enabled()},set_enabled:function(t){o.set_enabled(t)},get_isDirty:function(){return o.get_isDirty()},get_value:function(){return o.get_value()},set_value:function(t){o.set_value(t)},focus:function(){o.focus()}};break;case o instanceof AutotaskColorSelector.StandardColorSelector:e={get_enabled:function(){return o.get_enabled()},set_enabled:function(t){o.isEnabled=t},get_isDirty:function(){return o.get_isDirty()},get_value:function(){return o.value}};break;case o instanceof AutotaskCurrencyBox.CurrencyBox:e={get_enabled:function(){return o.isEnabled},set_enabled:function(t){o.isEnabled=t},get_isDirty:function(){return o.isDirty},get_value:function(){return o.value},set_value:function(t){o.value=t},focus:function(){o.focus()},overrideDefaultTranslationSettings:function(t){o.overrideDefaultTranslationSettings(t)},setDefaultCurrencyIndicatorSettings:function(t){o.setDefaultCurrencyIndicatorSettings(t)}};break;case o instanceof AutotaskDateBox.DateBox:e={get_enabled:function(){return o.isEnabled},set_enabled:function(t){o.isEnabled=t},get_isDirty:function(){return o.isDirty},get_value:function(){return o.value},set_value:function(t){o.value=t},focus:function(){o.focus()},getLabelText:function(){return null},show:function(){o.show()}};break;case o instanceof AutotaskDecimalBox.DecimalBox:e={get_enabled:function(){return o.isEnabled},set_enabled:function(t){o.isEnabled=t},get_isDirty:function(){return o.isDirty},get_value:function(){return o.value},set_value:function(t){o.value=t},focus:function(){o.focus()}};break;case o instanceof AutotaskDropDownList.DropDownList:e={get_count:function(){return o.count},get_enabled:function(){return o.isEnabled},set_enabled:function(t){o.isEnabled=t},get_isDirty:function(){return o.isDirty},get_selectedIndex:function(){return o.selectedIndex},set_selectedIndex:function(t){o.selectedIndex=t},get_text:function(){return o.text},get_value:function(){return o.value},set_value:function(t){o.value=t},addOption:function(t,e,i){o.addOption(t,e,i)},contains:function(t){return o.contains(t)},focus:function(){o.focus()},modifyText:function(t,e){o.modifyText(t,e)},populate:function(t,e,i){new PopulateDropDownListRoute(t).populate(o,e,i)},removeAllOptions:function(){o.removeAllOptions()},removeOptionByValue:function(t){o.removeOptionByValue(t)}};break;case o instanceof AutotaskIntegerBox.IntegerBox:e={get_enabled:function(){return o.isEnabled},set_enabled:function(t){o.isEnabled=t},get_isDirty:function(){return o.isDirty},get_value:function(){return o.value},set_value:function(t){o.value=t},focus:function(){o.focus()}};break;case o instanceof AutotaskSingleItemSelector.SingleItemSelector:e={get_enabled:function(){return o.isEnabled},set_enabled:function(t){o.isEnabled=t},get_isDirty:function(){return o.isDirty},get_isLocked:function(){return o.isLocked},get_value:function(){return o.value},set_value:function(t){o.value=t},focus:function(){o.focus()}};break;case o instanceof AutotaskMultipleDataSelector.MultipleDataSelector:e={get_isDirty:function(){return o.isDirty},get_enabled:function(){return o.isEnabled},set_enabled:function(t){o.isEnabled=t},get_isLocked:function(){return o.isLocked},get_value:function(){return o.value},add:function(t){o.add(t)},addApplyFilters:function(t){o.addApplyFiltersHandler(t)},clearSelection:function(){o.clearValue()},copySelection:function(t){var e=o.getSelection(t);return null!==e?new Autotask.SingleDataSelection(e):null},getSelectionTextByValue:function(t){return o.getSelectionTextByValue(t)},removeSelectionByValue:function(t){o.removeSelectionByValue(t)},showDialog:function(){o.showDialog()},focus:function(){o.focus()}};break;case o instanceof AutotaskPercentageBox.PercentageBox:e={get_enabled:function(){return o.isEnabled},set_enabled:function(t){o.isEnabled=t},get_isDirty:function(){return o.isDirty},get_value:function(){return o.value},set_value:function(t){o.value=t},focus:function(){o.focus()}};break;case o instanceof AutotaskSingleDataSelector.SingleDataSelector:e={get_isDirty:function(){return o.isDirty},get_enabled:function(){return o.isEnabled},set_enabled:function(t){o.isEnabled=t},get_isLocked:function(){return o.isLocked},get_value:function(){return o.value},set_value:function(t){o.setSelection(t)},addApplyFilters:function(t){o.addApplyFiltersHandler(t)},copySelection:function(){var t=this._backingEditor.getSelection();return null!==t?new Autotask.SingleDataSelection(t):null},getSelectionTextByValue:function(t){return o.getSelectionTextByValue(t)},showDialog:function(){o.showDialog()},focus:function(){o.focus()}};break;case o instanceof AutotaskTextArea.TextArea:e={get_enabled:function(){return o.isEnabled},set_enabled:function(t){o.isEnabled=t},get_isDirty:function(){return o.isDirty},get_value:function(){return o.value},set_value:function(t){o.value=t},focus:function(){o.focus()},insertText:function(t){o.insertText(t)}};break;case o instanceof AutotaskTextBox.TextBox:e={get_enabled:function(){return o.isEnabled},set_enabled:function(t){o.isEnabled=t},get_isDirty:function(){return o.isDirty},get_value:function(){return o.value},set_value:function(t){o.value=t},focus:function(){o.focus()}};break;case o instanceof AutotaskTimeBox.TimeBox:e={get_enabled:function(){return o.get_enabled()},set_enabled:function(t){o.set_enabled(t)},get_isDirty:function(){return o.get_isDirty()},get_value:function(){return o.get_value()},set_value:function(t){o.set_value(t)},focus:function(){o.focus()},selectDefault:function(){o.selectDefault()}};break;default:e=o}}}return e},t}(),window.AutotaskGridSystem.EditRowSaveFailedEventArgs=function(){"use strict";function t(t,e,i,n){this._gridEditingRow=t,this._customErrorData=i,this._isCustomError=null!==this._customErrorData,this._isValidationError=e,null!=n&&n.length>0&&(this._nextRowKey=n)}return t.prototype._customErrorData=null,t.prototype._gridEditingRow=null,t.prototype._isCustomError=null,t.prototype._isValidationError=null,t.prototype._nextRowKey=null,t.prototype.get_customErrorData=function(){return this._customErrorData},t.prototype.get_isCustomError=function(){return this._isCustomError},t.prototype.get_isValidationError=function(){return this._isValidationError},t.prototype.retrySave=function(){this._gridEditingRow.__saveAndEdit(this._nextRowKey)},t}(),window.AutotaskGridSystem.EditRowSavingEventArgs=function(t){"use strict";function e(){t.call(this)}return autotask.inherit(e,t),e}(Autotask.GridChangeEventArgs),window.AutotaskGridSystem.EditRowStartingEventArgs=function(t){"use strict";function e(){t.call(this),this._isCanceled=!1}return autotask.inherit(e,t),e.prototype._isCanceled=null,e.prototype.__get_isCanceled=function(){return this._isCanceled},e.prototype.cancel=function(){this._isCanceled=!0},e}(Autotask.GridChangeEventArgs),window.AutotaskGridSystem.ExistingEditRowInitializingEventArgs=function(t){"use strict";function e(e,i,n){t.call(this,i,n),this._rowKey=e}return autotask.inherit(e,t),e.prototype._rowKey=null,e.prototype.get_keyFieldValue=function(){return this._rowKey},e}(AutotaskGridSystem.EditRowInitializingEventArgs),window.AutotaskGridSystem.NewEditRowInitializingEventArgs=function(t){"use strict";function e(e,i){t.call(this,e,i)}return autotask.inherit(e,t),e}(AutotaskGridSystem.EditRowInitializingEventArgs),window.AutotaskGridSystem.RemovingRowsEventArgs=function(t){"use strict";function e(){t.call(this)}return autotask.inherit(e,t),e}(Autotask.GridChangeEventArgs),window.AutotaskGridSystem.RowRightClickEventArgs=function(){"use strict";function t(t,e,i){this._rowElement=t,this._mousePositionX=e,this._mousePositionY=i,this._isHandled=!1}return t.prototype._isHandled=null,t.prototype._mousePositionX=null,t.prototype._mousePositionY=null,t.prototype._rowElement=null,t.prototype.get_isHandled=function(){return this._isHandled},t.prototype.set_isHandled=function(t){this._isHandled=t},t.prototype.get_mousePositionX=function(){return this._mousePositionX},t.prototype.get_mousePositionY=function(){return this._mousePositionY},t.prototype.get_rowElement=function(){return this._rowElement},t}(),window.AutotaskGridSystem.SelectionUserInterfaceUpdatingEventArgs=function(){"use strict";function t(t,e,i){this._rowKeyAdditions=t,this._rowKeySubtractions=e,this._selectedRowKeyCount=i}return t.prototype._rowKeyAdditions=null,t.prototype._rowKeySubtractions=null,t.prototype._selectedRowKeyCount=null,t.prototype.__get_rowKeyAdditions=function(){return this._rowKeyAdditions},t.prototype.__get_rowKeySubtractions=function(){return this._rowKeySubtractions},t.prototype.__get_selectedRowKeyCount=function(){return this._selectedRowKeyCount},t}(),window.AutotaskGridSystem.ShowAllRecordsEventArgs=function(){"use strict";function t(t){this._isCtrlKeyPressed=t}return t.prototype._isCtrlKeyPressed=null,t.prototype.get_isCtrlKeyPressed=function(){return this._isCtrlKeyPressed},t}(),window.AutotaskGridSystem.EventCoordinator=function(){"use strict";function t(t){this._editEventRegistration=t,this._aggregateValuesShowingPointers=[],this._columnConfigurationShowingPointers=[],this._exportingPointers=[],this._filteringPointers=[],this._pageSizeChangingPointers=[],this._pagingPointers=[],this._removingRowsPointers=[],this._rowClickPointers=[],this._rowDroppedPointers=[],this._rowDroppingPointers=[],this._selectionChangedPointers=[],this._selectionChangingPointers=[],this._showAllRecordsPointers=[],this._sortingPointers=[],this._stateChangedHandlers=[],this._stateChangingPointers=[],this._tabbingAwayHandlers=[],this._userInteractionEventEndedPointers=[],this._userInteractionEventStartedPointers=[]}return t.prototype._aggregateValuesShowingPointers=null,t.prototype._columnConfigurationShowingPointers=null,t.prototype._exportingPointers=null,t.prototype._filteringPointers=null,t.prototype._pageSizeChangingPointers=null,t.prototype._pagingPointers=null,t.prototype._removingRowsPointers=null,t.prototype._rowClickPointers=null,t.prototype._rowDroppedPointers=null,t.prototype._rowDroppingPointers=null,t.prototype._selectionChangedPointers=null,t.prototype._selectionChangingPointers=null,t.prototype._showAllRecordsPointers=null,t.prototype._sortingPointers=null,t.prototype._stateChangedHandlers=null,t.prototype._stateChangingPointers=null,t.prototype._tabbingAwayHandlers=null,t.prototype._userInteractionEventEndedPointers=null,t.prototype._userInteractionEventStartedPointers=null,t.prototype.__get_editEventRegistration=function(){return this._editEventRegistration},t.prototype.__addAggregateValuesShowing=function(t){this._aggregateValuesShowingPointers.push(t)},t.prototype.__addColumnConfigurationShowing=function(t){this._columnConfigurationShowingPointers.push(t)},t.prototype.__addExporting=function(t){this._exportingPointers.push(t)},t.prototype.__addFiltering=function(t){this._filteringPointers.push(t)},t.prototype.__addPageSizeChanging=function(t){this._pageSizeChangingPointers.push(t)},t.prototype.__addPaging=function(t){this._pagingPointers.push(t)},t.prototype.__addRemovingRows=function(t){this._removingRowsPointers.push(t)},t.prototype.__addRowClick=function(t){this._rowClickPointers.push(t)},t.prototype.__addRowDropped=function(t){this._rowDroppedPointers.push(t)},t.prototype.__addRowDropping=function(t){this._rowDroppingPointers.push(t)},t.prototype.__addSelectionChanged=function(t){this._selectionChangedPointers.push(t)},t.prototype.__addSelectionChanging=function(t){this._selectionChangingPointers.push(t)},t.prototype.__addShowAllRecords=function(t){this._showAllRecordsPointers.push(t)},t.prototype.__addSorting=function(t){this._sortingPointers.push(t)},t.prototype.__addStateChangedHandler=function(t){this._stateChangedHandlers.push(t)},t.prototype.__addStateChanging=function(t){this._stateChangingPointers.push(t)},t.prototype.__addTabbingAwayHandler=function(t){this._tabbingAwayHandlers.push(t)},t.prototype.__addUserInteractionEventEnded=function(t){this._userInteractionEventEndedPointers.push(t)},t.prototype.__addUserInteractionEventStarted=function(t){this._userInteractionEventStartedPointers.push(t)},t.prototype.__aggregateValuesShowing=function(t){for(var e=0;e<this._aggregateValuesShowingPointers.length;e++)this._aggregateValuesShowingPointers[e](t)},t.prototype.__applyExporting=function(t){for(var e=0;e<this._exportingPointers.length;e++)this._exportingPointers[e](t)},t.prototype.__columnConfigurationShowing=function(t){for(var e=0;e<this._columnConfigurationShowingPointers.length;e++)this._columnConfigurationShowingPointers[e](t)},t.prototype.__filtering=function(t){for(var e=0;e<this._filteringPointers.length;e++)this._filteringPointers[e](t)},t.prototype.__pageSizeChanging=function(t){for(var e=0;e<this._pageSizeChangingPointers.length;e++)this._pageSizeChangingPointers[e](t)},t.prototype.__paging=function(t){for(var e=0;e<this._pagingPointers.length;e++)this._pagingPointers[e](t)},t.prototype.__raiseStateChangedEvent=function(){for(var t=0;t<this._stateChangedHandlers.length;t++)this._stateChangedHandlers[t]()},t.prototype.__raiseTabbingAwayEvent=function(t,e){if(this._tabbingAwayHandlers.length>0)for(var i=new AutotaskTabbingSystem.TabbingAwayEventArgs(t,e,(function(){})),n=0;n<this._tabbingAwayHandlers.length;n++)this._tabbingAwayHandlers[n](i)},t.prototype.__removingRows=function(t){for(var e=0;e<this._removingRowsPointers.length;e++)this._removingRowsPointers[e](t)},t.prototype.__rowClick=function(t){for(var e=0;e<this._rowClickPointers.length;e++)this._rowClickPointers[e](t)},t.prototype.__rowDropping=function(t){for(var e=0;e<this._rowDroppingPointers.length;e++)this._rowDroppingPointers[e](t)},t.prototype.__rowDropped=function(){for(var t=0;t<this._rowDroppedPointers.length;t++)this._rowDroppedPointers[t]()},t.prototype.__selectionChanged=function(t){for(var e=0;e<this._selectionChangedPointers.length;e++)this._selectionChangedPointers[e](t)},t.prototype.__selectionChanging=function(t){for(var e=0;e<this._selectionChangingPointers.length&&(this._selectionChangingPointers[e](t),!t.__get_isCancelled());e++);},t.prototype.__showAllRecords=function(t){for(var e=!!t&&t.ctrlKey,i=new AutotaskGridSystem.ShowAllRecordsEventArgs(e),n=0;n<this._showAllRecordsPointers.length;n++)this._showAllRecordsPointers[n](i)},t.prototype.__sorting=function(t){for(var e=0;e<this._sortingPointers.length;e++)this._sortingPointers[e](t)},t.prototype.__stateChanging=function(t){for(var e=0;e<this._stateChangingPointers.length;e++)this._stateChangingPointers[e](t)},t.prototype.__userInteractionEventEnded=function(){for(var t=0;t<this._userInteractionEventEndedPointers.length;t++)this._userInteractionEventEndedPointers[t]()},t.prototype.__userInteractionEventStarted=function(){for(var t=0;t<this._userInteractionEventStartedPointers.length;t++)this._userInteractionEventStartedPointers[t]()},t}(),window.AutotaskGridSystem.FilterDataProvider=function(){"use strict";function t(t,e,i,n,o,a){null===t&&autotask.throwException("instanceId is required."),null===e&&autotask.throwException("getRequestDataPointer is required."),null===i&&autotask.throwException("getIsDirtyPointer is required."),null===n&&autotask.throwException("getFilterValuePointer is required."),null===o&&autotask.throwException("resetFilterValuePointer is required."),null===a&&autotask.throwException("forceFormattingPointer is required."),this._forceFormattingPointer=a,this._getFilterValuePointer=n,this._getIsDirtyPointer=i,this._getRequestDataPointer=e,this._instanceId=t,this._resetFilterValuePointer=o}return t.prototype._forceFormattingPointer=null,t.prototype._getFilterValuePointer=null,t.prototype._getIsDirtyPointer=null,t.prototype._getRequestDataPointer=null,t.prototype._instanceId=null,t.prototype._resetFilterValuePointer=null,t.prototype.get_isDirty=function(){return this._getIsDirtyPointer()},t.prototype.get_requestData=function(){return this._getRequestDataPointer()},t.prototype.get_instanceId=function(){return this._instanceId},t.prototype.forceFormatting=function(){null!==this._forceFormattingPointer&&this._forceFormattingPointer()},t.prototype.getFilterValue=function(){return this._getFilterValuePointer()},t.prototype.resetFilterValue=function(t){this._resetFilterValuePointer(t)},t.prototype.__dispose=function(){this._getFilterValuePointer=null,this._getIsDirtyPointer=null,this._getRequestDataPointer=null,this._resetFilterValuePointer=null},t}(),window.AutotaskGridSystem.Gateway=function(){"use strict";function t(t,e,i,n,o,a,s,r){for(var l=null,_=null,u=null,c=0;c<r.children.length;c++)r.children[c].classList.contains("Header")?l=r.children[c]:r.children[c].classList.contains("Body")?_=r.children[c]:r.children[c].classList.contains("Footer")&&(u=r.children[c]);this._aggregateValuesSystem=new AutotaskGridSystem.AggregateValuesSystem(e),this._automaticSizingSystem=new AutotaskGridSystem.AutomaticSizingSystem(r,l,_,u),this._columnArrangementSystem=new AutotaskGridSystem.ColumnArrangementSystem(e),this._columnIndexSystem=new AutotaskGridSystem.ColumnIndexSystem,this._contextMenuSystem=new AutotaskGridSystem.ContextMenuSystem(e),this._contextOverlaySystem=new AutotaskGridSystem.ContextOverlaySystem(_,e),this._displayCellValidationSystem=new AutotaskGridSystem.DisplayCellValidationSystem(_),this._editSystem=new AutotaskGridSystem.EditSystem(_,i,e,o),this._exportSystem=new AutotaskGridSystem.ExportSystem(e),this._filterSystem=new AutotaskGridSystem.FilterSystem(l,e),this._htmlSystem=new AutotaskGridSystem.HtmlSystem(l,_,u),this._identificationSystem=new AutotaskGridSystem.IdentificationSystem(t),this._layoutSystem=new AutotaskGridSystem.LayoutSystem(l,_,u,n),this._pagingSystem=new AutotaskGridSystem.PagingSystem(u,e,i),this._persistenceKeySystem=new AutotaskGridSystem.PersistenceKeySystem,this._refreshSystem=new AutotaskGridSystem.RefreshSystem(i,e),this._routeSystem=new AutotaskGridSystem.RouteSystem,this._rowAccessoryDataSystem=new AutotaskGridSystem.RowAccessoryDataSystem,this._rowClickSystem=new AutotaskGridSystem.RowClickSystem(_,e),this._rowDropSystem=new AutotaskGridSystem.RowDropSystem(e,i),this._rowImmutableDataSystem=new AutotaskGridSystem.RowImmutableDataSystem,this._rowKeySystem=new AutotaskGridSystem.RowKeySystem(_),this._rowNestingSystem=new AutotaskGridSystem.RowNestingSystem(s),this._selectionSystem=new AutotaskGridSystem.SelectionSystem(e,a),this._sortSystem=new AutotaskGridSystem.SortSystem(l,e),this._timeoutMessageSystem=new AutotaskGridSystem.TimeoutMessageSystem}return t.prototype._aggregateValuesSystem=null,t.prototype._automaticSizingSystem=null,t.prototype._columnArrangementSystem=null,t.prototype._columnIndexSystem=null,t.prototype._contextMenuSystem=null,t.prototype._contextOverlaySystem=null,t.prototype._displayCellValidationSystem=null,t.prototype._editStateCoordinator=null,t.prototype._editSystem=null,t.prototype._exportSystem=null,t.prototype._filterSystem=null,t.prototype._htmlSystem=null,t.prototype._identificationSystem=null,t.prototype._layoutSystem=null,t.prototype._pagingSystem=null,t.prototype._persistenceKeySystem=null,t.prototype._refreshSystem=null,t.prototype._routeSystem=null,t.prototype._rowAccessoryDataSystem=null,t.prototype._rowClickSystem=null,t.prototype._rowDropSystem=null,t.prototype._rowImmutableDataSystem=null,t.prototype._rowKeySystem=null,t.prototype._rowNestingSystem=null,t.prototype._selectionSystem=null,t.prototype._sortSystem=null,t.prototype._timeoutMessageSystem=null,t.prototype.__get_aggregateValuesSystem=function(){return this._aggregateValuesSystem},t.prototype.__get_automaticSizingSystem=function(){return this._automaticSizingSystem},t.prototype.__get_columnArrangementSystem=function(){return this._columnArrangementSystem},t.prototype.__get_columnIndexSystem=function(){return this._columnIndexSystem},t.prototype.__get_contextMenuSystem=function(){return this._contextMenuSystem},t.prototype.__get_contextOverlaySystem=function(){return this._contextOverlaySystem},t.prototype.__get_displayCellValidationSystem=function(){return this._displayCellValidationSystem},t.prototype.__get_editSystem=function(){return this._editSystem},t.prototype.__get_exportSystem=function(){return this._exportSystem},t.prototype.__get_htmlSystem=function(){return this._htmlSystem},t.prototype.__get_filterSystem=function(){return this._filterSystem},t.prototype.__get_identificationSystem=function(){return this._identificationSystem},t.prototype.__get_layoutSystem=function(){return this._layoutSystem},t.prototype.__get_pagingSystem=function(){return this._pagingSystem},t.prototype.__get_persistenceKeySystem=function(){return this._persistenceKeySystem},t.prototype.__get_refreshSystem=function(){return this._refreshSystem},t.prototype.__get_routeSystem=function(){return this._routeSystem},t.prototype.__get_rowAccessoryDataSystem=function(){return this._rowAccessoryDataSystem},t.prototype.__get_rowClickSystem=function(){return this._rowClickSystem},t.prototype.__get_rowDropSystem=function(){return this._rowDropSystem},t.prototype.__get_rowImmutableDataSystem=function(){return this._rowImmutableDataSystem},t.prototype.__get_rowKeySystem=function(){return this._rowKeySystem},t.prototype.__get_rowNestingSystem=function(){return this._rowNestingSystem},t.prototype.__get_selectionSystem=function(){return this._selectionSystem},t.prototype.__get_sortSystem=function(){return this._sortSystem},t.prototype.__get_timeoutMessageSystem=function(){return this._timeoutMessageSystem},t.prototype.__dispose=function(){this._automaticSizingSystem.__dispose(),this._contextOverlaySystem.__dispose(),this._displayCellValidationSystem.__dispose(),this._editSystem.__dispose(),this._filterSystem.__dispose(),this._refreshSystem.__dispose(),this._rowDropSystem.__dispose(),this._aggregateValuesSystem=null,this._automaticSizingSystem=null,this._columnArrangementSystem=null,this._columnIndexSystem=null,this._contextOverlaySystem=null,this._displayCellValidationSystem=null,this._editSystem=null,this._exportSystem=null,this._filterSystem=null,this._htmlSystem=null,this._identificationSystem=null,this._layoutSystem=null,this._pagingSystem=null,this._persistenceKeySystem=null,this._refreshSystem=null,this._rowAccessoryDataSystem=null,this._rowClickSystem=null,this._rowDropSystem=null,this._rowImmutableDataSystem=null,this._rowKeySystem=null,this._rowNestingSystem=null,this._selectionSystem=null,this._sortSystem=null,this._timeoutMessageSystem=null},t.prototype.__finalize=function(){this._contextOverlaySystem.__finalize(this._identificationSystem,this._rowKeySystem,this._routeSystem),this._filterSystem.__finalize(this._refreshSystem),this._exportSystem.__finalize(this._filterSystem,this._identificationSystem),this._pagingSystem.__finalize(this._refreshSystem,this._selectionSystem,this._identificationSystem),this._selectionSystem.__finalize(this._rowKeySystem),this._rowClickSystem.__finalize(this._rowKeySystem),this._rowDropSystem.__finalize(this._layoutSystem),this._sortSystem.__finalize(this._persistenceKeySystem,this._refreshSystem,this._identificationSystem),this._displayCellValidationSystem.__finalize(),this._persistenceKeySystem.__finalize(this._columnIndexSystem),this._editSystem.__finalize(this._columnIndexSystem),this._refreshSystem.__finalize(this._layoutSystem,this._pagingSystem,this._filterSystem,this._identificationSystem,this._editSystem,this._selectionSystem)},t}(),window.AutotaskGridSystem.ItemValueCollectionImmutableData=function(t){"use strict";function e(e,i){t.call(this,e,new AutotaskItemSelectionSystem.ItemValueCollection(i))}return autotask.inherit(e,t),e.prototype.___createRequestData=function(t,e){var i={};return null!==e&&(i=e.__createRequestData(t)),i},e}(AutotaskGridSystem.ImmutableData),window.AutotaskGridSystem.ItemValueImmutableData=function(t){"use strict";function e(e,i){t.call(this,e,i)}return autotask.inherit(e,t),e.prototype.___createRequestData=function(t,e){var i={};return null!==e&&(i=e.__createRequestData(t)),i},e}(AutotaskGridSystem.ImmutableData),window.AutotaskGridSystem.LayoutStateCoordinator=function(){"use strict";function t(){}return t.prototype._scrollLeft=null,t.prototype._scrollTop=null,t.prototype.__getScrollLeft=function(){return this._scrollLeft},t.prototype.__getScrollTop=function(){return this._scrollTop},t.prototype.__storeScrollLeft=function(t){this._scrollLeft=t},t.prototype.__storeScrollTop=function(t){this._scrollTop=t},t}(),window.AutotaskGridSystem.NestingStorage=function(){"use strict";function t(){this._collapsedRowKeys=[]}return t.prototype._collapsedRowKeys=null,t.prototype.__get_CollapsedRowKeys=function(){return this._collapsedRowKeys},t.prototype.__addCollapsedRowKey=function(t){this._collapsedRowKeys.indexOf(t)<0&&this._collapsedRowKeys.push(t)},t.prototype.__removeCollapsedRowKey=function(t){var e=this._collapsedRowKeys.indexOf(t);e>-1&&this._collapsedRowKeys.splice(e,1)},t}(),window.AutotaskGridSystem.ReconstructionCoordinator=function(){"use strict";function t(t,e,i,n){this._content=t,this._gridId=e,this._eventCoordinator=i,this._grid=n,this._reconstructionCompleteHandlers=[]}return t.prototype._grid=null,t.prototype._content=null,t.prototype._eventCoordinator=null,t.prototype._gridId=null,t.prototype._reconstructionCompleteHandlers=null,t.prototype.__addReconstructionCompleteHandler=function(t){this._reconstructionCompleteHandlers.push(t)},t.prototype.__reconstruct=function(t,e,i){var n=this._reconstructionCompleteHandlers;this._reconstructionCompleteHandlers=[];var o=this._content.__connectToGateway(),a=o.__get_automaticSizingSystem(),s=a.__get_isEnabled();this._content.__dispose(),this._grid.innerHTML=t,this._content.__initialize(),autotask.instanceTrackerManagement.__findInstanceTracker(this._gridId).__clearInstancesAndLoadScript(e),this._content.__finalize();var r=(o=this._content.__connectToGateway()).__get_layoutSystem();r.__reset(),(a=o.__get_automaticSizingSystem()).__get_isEnabled()&&(s||autotask.throwException("The automatic sizing behavior does not match."),a.__reset()),i&&r.__loadAndClearScrollPosition();for(var l=n.length,_=0;_<l;_++)n[_](o)},t}(),window.AutotaskGridSystem.AggregateValuesActivator=function(){"use strict";function t(t,e){var i=e+"_AggregateValuesActivator";autotask.instanceManagement.__addRegistrationKey(this,i),this._gridId=e,this._url=t}return t.prototype._gridId=null,t.prototype._url=null,t.prototype.__initialize=function(){autotask.find(this._gridId).__connectToGateway().__get_aggregateValuesSystem().__activate(this._url)},t}(),window.AutotaskGridSystem.AutomaticSizingActivator=function(){"use strict";function t(t){this._gridId=t}return t.prototype._gridId=null,t.prototype.__initialize=function(){autotask.find(this._gridId).__connectToGateway().__get_automaticSizingSystem().__activate()},t}(),window.AutotaskGridSystem.CheckBoxSelectionColumn=function(){"use strict";function t(t,e){var i=t+"_CheckBoxSelectionColumn";autotask.instanceManagement.__addRegistrationKey(this,i),this._gridId=t,this._headingButtonId=e,this._enabledCheckBoxCount=0,this._selectedCssClass="Selected",this._selectedCheckBoxCount=0}return t.prototype._bulkSelectionButton=null,t.prototype._enabledCheckBoxCount=null,t.prototype._gridId=null,t.prototype._headingButtonId=null,t.prototype._rowKeySystem=null,t.prototype._selectedCheckBoxCount=null,t.prototype._selectedCssClass=null,t.prototype._selectionSystem=null,t.prototype._iconClick=function(t){var e=t.currentTarget,i=[this._rowKeySystem.__getRowKeyByCellContent(e)];e.classList.contains("Disabled")||(e.classList.contains(this._selectedCssClass)?this._selectionSystem.__unselectRowKeys(i,!0,!0):this._selectionSystem.__selectRowKeys(i,!0,!0))},t.prototype._userInterfaceUpdating=function(t){for(var e=t.__get_rowKeyAdditions(),i=e.length,n=null,o=null,a=0;a<i;a++)n=this._findIconByRowKey(e[a]),this._selectIcon(n),o=this._rowKeySystem.__getRowByRowKey(e[a]),this._selectRow(o);for(var s=t.__get_rowKeySubtractions(),r=s.length,l=0;l<r;l++)n=this._findIconByRowKey(s[l]),this._unselectIcon(n),o=this._rowKeySystem.__getRowByRowKey(s[l]),this._unselectRow(o);this._updateBulkSelectionButtonState()},t.prototype.__initialize=function(){this._bulkSelectionButton=autotask.find(this._headingButtonId);var t=autotask.find(this._gridId).__connectToGateway();this._selectionSystem=t.__get_selectionSystem(),this._rowKeySystem=t.__get_rowKeySystem();var e=t.__get_htmlSystem().__get_body(),i=autotask.proxy(this._userInterfaceUpdating,this),n=this._findExcludedRowKeys(e);this._selectionSystem.__activate(!1,i,n);var o=this._selectionSystem.__getSelectedRowKeys();this._selectCellsAssociatedWithRowKeys(o);for(var a=e.querySelectorAll("tr td.ImageSelectionCell .Icon"),s=0;s<a.length;s++)a[s].addEventListener("click",autotask.proxy(this._iconClick,this)),a[s].classList.contains("Disabled")||this._enabledCheckBoxCount++;this._updateBulkSelectionButtonState()},t.prototype._findExcludedRowKeys=function(t){for(var e=null,i=null,n=null,o=null,a=null,s=this._rowKeySystem.__getRowKeysInRowOrder().slice(),r=t.getElementsByClassName("ImageSelectionCell"),l=r.length;l--;)(o=(e=r[l]).firstChild.firstChild).classList.contains("Icon")&&o.classList.contains("Disabled")||(i=e.parentElement,n=this._rowKeySystem.__getRowKeyByRow(i),a=s.indexOf(n),s.splice(a,1));return s},t.prototype._findIconByRowKey=function(t){var e=null,i=this._rowKeySystem.__getRowByRowKey(t);return null!==i&&(e=i.querySelector("td.ImageSelectionCell .Icon")),e},t.prototype._selectCellsAssociatedWithRowKeys=function(t){for(var e=null,i=null,n=t.length,o=0;o<n;o++)null!==(e=this._rowKeySystem.__getRowByRowKey(t[o]))&&null!==(i=e.querySelector("td.ImageSelectionCell .Icon"))&&(this._selectIcon(i),this._selectRow(e))},t.prototype._selectIcon=function(t){null!==t&&(t.classList.add(this._selectedCssClass),this._selectedCheckBoxCount++)},t.prototype._selectRow=function(t){null!==t&&t.classList.add(this._selectedCssClass)},t.prototype._unselectIcon=function(t){null!==t&&(t.classList.remove(this._selectedCssClass),this._selectedCheckBoxCount--)},t.prototype._unselectRow=function(t){null!==t&&t.classList.remove(this._selectedCssClass)},t.prototype._updateBulkSelectionButtonState=function(){null!==this._bulkSelectionButton&&(0===this._enabledCheckBoxCount?this._bulkSelectionButton.isEnabled=!1:0===this._selectedCheckBoxCount||0===this._enabledCheckBoxCount?this._bulkSelectionButton.selectionState=AutotaskButtons.CheckBoxButtonState.Unchecked:this._selectedCheckBoxCount>0&&this._selectedCheckBoxCount<this._enabledCheckBoxCount?this._bulkSelectionButton.selectionState=AutotaskButtons.CheckBoxButtonState.Indeterminate:this._selectedCheckBoxCount===this._enabledCheckBoxCount?this._bulkSelectionButton.selectionState=AutotaskButtons.CheckBoxButtonState.Checked:autotask.throwException("Cannot determine the grid bulk menu checkbox state."))},t}(),window.AutotaskGridSystem.ColumnArrangementActivator=function(){"use strict";function t(t,e){var i=e+"_ColumnArrangementActivator";autotask.instanceManagement.__addRegistrationKey(this,i),this._gridId=e,this._url=t}return t.prototype._gridId=null,t.prototype._url=null,t.prototype.__initialize=function(){autotask.find(this._gridId).__connectToGateway().__get_columnArrangementSystem().__activate(this._url)},t}(),window.AutotaskGridSystem.ColumnIndexActivator=function(){"use strict";function t(t,e){var i=e+"_ColumnIndexActivator";autotask.instanceManagement.__addRegistrationKey(this,i),this._firstDataColumnIndex=t,this._gridId=e}return t.prototype._firstDataColumnIndex=null,t.prototype._gridId=null,t.prototype.__initialize=function(){autotask.find(this._gridId).__connectToGateway().__get_columnIndexSystem().__activate(this._firstDataColumnIndex)},t}(),window.AutotaskGridSystem.ContextMenuActivator=function(){"use strict";function t(t,e,i){var n=i+"_ContextMenuActivator";autotask.instanceManagement.__addRegistrationKey(this,n),this._gridId=i,this._contextOverlayId=t,this._rightClickContextOverlayId=e}return t.prototype._contextOverlayId=null,t.prototype._gridId=null,t.prototype._rightClickContextOverlayId=null,t.prototype.__initialize=function(){autotask.find(this._gridId).__connectToGateway().__get_contextMenuSystem().__activate(this._contextOverlayId,this._rightClickContextOverlayId)},t}(),window.AutotaskGridSystem.ContextMenuColumn=function(){"use strict";function t(t,e){var i=t+"_ContextMenuColumn";autotask.instanceManagement.__addRegistrationKey(this,i),this._defaultRoute=e,this._gridId=t,this._isContextOverlayVisible=!1,this._isRightClickContextOverlayVisible=!1}return t.prototype._contextOverlay=null,t.prototype._contextMenuSystem=null,t.prototype._defaultRoute=null,t.prototype._eventsManagement=null,t.prototype._gridId=null,t.prototype._identificationSystem=null,t.prototype._isContextOverlayVisible=null,t.prototype._isRightClickContextOverlayVisible=null,t.prototype._requestCanceler=null,t.prototype._rightClickContextOverlay=null,t.prototype._routeSystem=null,t.prototype._rowKeySystem=null,t.prototype._cellClick=function(t){t.stopPropagation()},t.prototype._contextOverlayHiding=function(){this._isContextOverlayVisible=!1},t.prototype._contextOverlayShowing=function(t,e,i){this._isContextOverlayVisible=!0,this._requestOverlayContent(t,e,i)},t.prototype._buttonMouseEnter=function(t){if(!t.__isMouseEvent&&this._isContextOverlayVisible)this._contextOverlay.__hideWithoutDelay();else if(!this._contextMenuSystem.__get_isOperationSuspended()){null!==this._rightClickContextOverlay&&this._isRightClickContextOverlayVisible&&this._rightClickContextOverlay.__hideWithoutDelay();var e=t.__currentTarget.dataset.routeKey,i=t.__currentTarget.closest("tr"),n=this._rowKeySystem.__getRowKeyByRow(i);this._contextOverlay.clearShowingHandlers(),this._contextOverlay.addShowingHandler(autotask.proxy(this._contextOverlayShowing,this,this._contextOverlay,n,e)),this._contextOverlay.show(t.__currentTarget)}},t.prototype._buttonMouseLeave=function(){this._contextOverlay.hide()},t.prototype._rightClickContextOverlayHiding=function(){this._isRightClickContextOverlayVisible=!1},t.prototype._rightClickContextOverlayShowing=function(t,e,i){this._isRightClickContextOverlayVisible=!0,this._requestOverlayContent(t,e,i)},t.prototype._rowRightClickHandler=function(t){if(!this._contextMenuSystem.__get_isOperationSuspended()){var e=t.get_rowElement(),i=e.querySelector("td.ContextMenuCell");if(null!==i){this._isContextOverlayVisible&&this._contextOverlay.__hideWithoutDelay();var n=i.querySelector(".Button.ContextMenu").dataset.routeKey,o=this._rowKeySystem.__getRowKeyByRow(e);this._rightClickContextOverlay.clearShowingHandlers(),this._rightClickContextOverlay.addShowingHandler(autotask.proxy(this._rightClickContextOverlayShowing,this,this._rightClickContextOverlay,o,n)),this._rightClickContextOverlay.show(t.get_mousePositionX(),t.get_mousePositionY()),t.set_isHandled(!0)}}},t.prototype.__dispose=function(){null!==this._requestCanceler&&this._requestCanceler.__cancelRequest()},t.prototype.__finalize=function(){var t=autotask.find(this._gridId).__connectToGateway();this._identificationSystem=t.__get_identificationSystem(),this._rowKeySystem=t.__get_rowKeySystem();var e=t.__get_htmlSystem().__get_body();(this._routeSystem=t.__get_routeSystem(),this._contextMenuSystem=t.__get_contextMenuSystem(),this._contextOverlay=this._contextMenuSystem.__get_contextOverlay(),null!==this._contextOverlay&&this._contextOverlay.addHidingHandler(autotask.proxy(this._contextOverlayHiding,this)),this._rightClickContextOverlay=this._contextMenuSystem.__get_rightClickContextMenu(),null!==this._rightClickContextOverlay)&&(t.__get_rowClickSystem().__enableRightClick(autotask.proxy(this._rowRightClickHandler,this)),this._rightClickContextOverlay.addHidingHandler(autotask.proxy(this._rightClickContextOverlayHiding,this)));this._eventsManagement=new Autotask.ContextOverlayEventsManagement,this._eventsManagement.__registerSelection(e,".ContextMenuCell .Button",autotask.proxy(this._buttonMouseEnter,this),autotask.proxy(this._buttonMouseLeave,this));for(var i=e.querySelectorAll("td.ContextMenuCell"),n=0;n<i.length;n++)i[n].addEventListener("click",autotask.proxy(this._cellClick,this))},t.prototype._requestOverlayContent=function(t,e,i){t.__showLoadingIndicator();var n=this._defaultRoute;void 0!==i&&(n=this._routeSystem.__getRoute(i));var o=this._identificationSystem.__get_id(),a=autotask.find(o),s=function(){a.refresh()},r=this;t.__requestContent((function(t){null!==r._requestCanceler&&r._requestCanceler.__cancelRequest(),r._requestCanceler=n.__makeRequest(e,s,(function(e){r._requestCanceler=null,t(e)}))}))},t}(),window.AutotaskGridSystem.ContextOverlayActivator=function(){"use strict";function t(t,e){var i=e+"_ContextOverlayActivator";autotask.instanceManagement.__addRegistrationKey(this,i),this._gridId=e,this._contextOverlayId=t}return t.prototype._contextOverlayId=null,t.prototype._gridId=null,t.prototype.__initialize=function(){autotask.find(this._gridId).__connectToGateway().__get_contextOverlaySystem().__activate(this._contextOverlayId)},t}(),window.AutotaskGridSystem.DefaultFormatExportActivator=function(){"use strict";function t(t,e,i,n,o){var a=e+"_DefaultFormatExportActivator";autotask.instanceManagement.__addRegistrationKey(this,a),this._url=t,this._gridId=e,this._exportableRowCount=i,this._rowLimit=n,this._confirmationText=o}return t.prototype._confirmationText=null,t.prototype._exportableRowCount=null,t.prototype._gridId=null,t.prototype._rowLimit=null,t.prototype._url=null,t.prototype.__initialize=function(){autotask.find(this._gridId).__connectToGateway().__get_exportSystem().__activateDefaultFormatExport(this._url,this._exportableRowCount,this._rowLimit,this._confirmationText)},t}(),window.AutotaskGridSystem.EditActivator=function(){"use strict";function t(t,e,i,n,o,a){var s=a+"_EditActivator";autotask.instanceManagement.__addRegistrationKey(this,s),this._startEditingExistingRowRoute=t,this._finishEditingExistingRowRoute=e,this._editPostedRowModelParameterName=i,this._startEditingNewRowRoute=n,this._finishEditingNewRowRoute=o,this._gridId=a}return t.prototype._editPostedRowModelParameterName=null,t.prototype._finishEditingExistingRowRoute=null,t.prototype._finishEditingNewRowRoute=null,t.prototype._gridId=null,t.prototype._startEditingExistingRowRoute=null,t.prototype._startEditingNewRowRoute=null,t.prototype.__initialize=function(){var t=autotask.find(this._gridId).__connectToGateway(),e=t.__get_editSystem(),i=t.__get_rowKeySystem(),n=t.__get_selectionSystem(),o=t.__get_layoutSystem(),a=t.__get_contextOverlaySystem(),s=t.__get_contextMenuSystem(),r=t.__get_refreshSystem(),l={};l.editPostedRowModelParameterName=this._editPostedRowModelParameterName;var _={};_.startEditingExistingRowRoute=this._startEditingExistingRowRoute,_.finishEditingExistingRowRoute=this._finishEditingExistingRowRoute,null!==this._startEditingNewRowUrl?(_.isNewRowEditEnabled=!0,_.startEditingNewRowRoute=this._startEditingNewRowRoute,_.finishEditingNewRowRoute=this._finishEditingNewRowRoute):_.isNewRowEditEnabled=!1,e.__activate(this._gridId,_,l,i,n,o,a,s,r)},t}(),window.AutotaskGridSystem.FilterActivator=function(){"use strict";function t(t,e){var i=e+"_FilterActivator";autotask.instanceManagement.__addRegistrationKey(this,i),this._postedRowModelParameterName=t,this._gridId=e}return t.prototype._gridId=null,t.prototype._postedRowModelParameterName=null,t.prototype.__initialize=function(){autotask.find(this._gridId).__connectToGateway().__get_filterSystem().__activate(this._postedRowModelParameterName)},t}(),window.AutotaskGridSystem.ImportFormatExportActivator=function(){"use strict";function t(t,e,i,n,o){var a=e+"_ImportFormatExportActivator";autotask.instanceManagement.__addRegistrationKey(this,a),this._url=t,this._gridId=e,this._exportableRowCount=i,this._rowLimit=n,this._confirmationText=o}return t.prototype._confirmationText=null,t.prototype._exportableRowCount=null,t.prototype._gridId=null,t.prototype._rowLimit=null,t.prototype._url=null,t.prototype.__initialize=function(){autotask.find(this._gridId).__connectToGateway().__get_exportSystem().__activateImportFormatExport(this._url,this._exportableRowCount,this._rowLimit,this._confirmationText)},t}(),window.AutotaskGridSystem.NestingColumn=function(){"use strict";function t(t){var e=t+"_NestingColumn";autotask.instanceManagement.__addRegistrationKey(this,e),this._gridId=t}return t.prototype._gridId=null,t.prototype.__initialize=function(){var t=autotask.find(this._gridId).__connectToGateway(),e=t.__get_htmlSystem(),i=t.__get_rowKeySystem(),n=t.__get_rowNestingSystem(),o=e.__get_body();n.__activate(o,i)},t}(),window.AutotaskGridSystem.OrderedMultipleSelectionColumn=function(){"use strict";function t(t,e,i,n,o){var a=n+"_OrderedMultipleSelectionColumn";autotask.instanceManagement.__addRegistrationKey(this,a),this._continuousSelectionStartIndex=0,this._selectedCssClass="Selected",this._selectedPreviewCssClass="SelectedPreview",this._isDragAndDropEnabled=null!==t,this._rowDropRoute=t,this._isDropOntoRowEnabled=e,this._statusTextObject=i,this._gridId=n,this._headingButtonId=o,this._selectedRowCount=0}return t.prototype._bulkSelectionButton=null,t.prototype._continuousSelectionStartIndex=null,t.prototype._dragAndDropCoordinator=null,t.prototype._gridId=null,t.prototype._headingButtonId=null,t.prototype._isDragAndDropEnabled=null,t.prototype._isDropOntoRowEnabled=null,t.prototype._readyToBePersistedRowKey=null,t.prototype._readyToBeUnselectedRowKey=null,t.prototype._rowDropRoute=null,t.prototype._rowKeySystem=null,t.prototype._rowNestingSystem=null,t.prototype._rows=null,t.prototype._selectedCssClass=null,t.prototype._selectedPreviewCssClass=null,t.prototype._selectedRowCount=null,t.prototype._selectionSystem=null,t.prototype._statusTextObject=null,t.prototype._cellMouseDown=function(t){var e=t.currentTarget,i=this._acquireRowFromCell(e);this._selectionMouseDown(i,t.shiftKey,t.ctrlKey),t.preventDefault(),this._isDragAndDropEnabled&&!t.shiftKey&&this._dragAndDropCoordinator.__mouseDown()},t.prototype._cellMouseEnter=function(t){var e=t.currentTarget,i=this._acquireRowFromCell(e);!this._get_isDragInProgress()&&t.shiftKey&&this._addRowsToSelectionPreviewMode(i)},t.prototype._cellMouseLeave=function(t){var e=t.currentTarget,i=this._acquireRowFromCell(e);this._get_isDragInProgress()||this._removeAllRowsFromSelectionPreviewMode(i)},t.prototype._cellMouseUp=function(t){var e=t.currentTarget,i=this._acquireRowFromCell(e);this._selectionMouseUp(i,t.shiftKey)},t.prototype._documentKeyUp=function(t){if(AutotaskDomSystem.KeyCode.isShift(t.which))for(var e=0;e<this._rows.length;e++)this._rows[e].classList.remove(this._selectedPreviewCssClass)},t.prototype._rowMouseLeave=function(t){this._isDragAndDropEnabled&&this._dragAndDropCoordinator.__mouseLeave()},t.prototype._rowMouseMove=function(t){var e=t.currentTarget;this._selectionSystem.__get_isEnabled()&&this._isDragAndDropEnabled&&this._dragAndDropCoordinator.__mouseMove(e,autotask.layoutAnalysis.__calculateOffsetY(t),t.pageX,t.pageY)},t.prototype._rowMouseUp=function(t){var e=t.currentTarget;this._selectionSystem.__get_isEnabled()&&this._isDragAndDropEnabled&&this._dragAndDropCoordinator.__mouseUp(e,autotask.layoutAnalysis.__calculateOffsetY(t))},t.prototype._userInterfaceUpdating=function(t){for(var e=t.__get_rowKeyAdditions(),i=e.length,n=null,o=0;o<i;o++)n=this._rowKeySystem.__getRowByRowKey(e[o]),this._selectRow(n);for(var a=t.__get_rowKeySubtractions(),s=a.length,r=0;r<s;r++)n=this._rowKeySystem.__getRowByRowKey(a[r]),this._unselectRow(n);this._updateBulkSelectionButtonState()},t.prototype._get_isDragInProgress=function(){return this._isDragAndDropEnabled&&this._dragAndDropCoordinator.__get_isDragInProgress()},t.prototype.__initialize=function(){this._bulkSelectionButton=autotask.find(this._headingButtonId);var t=autotask.find(this._gridId).__connectToGateway();this._selectionSystem=t.__get_selectionSystem(),this._rowKeySystem=t.__get_rowKeySystem(),this._rowNestingSystem=t.__get_rowNestingSystem();var e=autotask.proxy(this._userInterfaceUpdating,this);this._selectionSystem.__activate(!1,e,[]);var i=this._selectionSystem.__getSelectedRowKeys();this._selectCellsAssociatedWithRowKeys(i);var n=t.__get_htmlSystem().__get_body();if(this._rows=Array.from(n.getElementsByTagName("tr")),this._registerHandlers(n),this._updateBulkSelectionButtonState(),this._isDragAndDropEnabled){var o=t.__get_rowDropSystem(),a=t.__get_contextOverlaySystem(),s=t.__get_contextMenuSystem(),r=t.__get_editSystem();this._dragAndDropCoordinator=new Autotask.InteractionColumnDragAndDrop(o,this._rowKeySystem,this._rowNestingSystem,this._selectionSystem,a,s,r,this._rows,n,this._rowDropRoute,this._isDropOntoRowEnabled,this._statusTextObject)}},t.prototype._acquireRowFromCell=function(t){return t.closest("tr")},t.prototype._addRowsToSelectionPreviewMode=function(t){for(var e=t.rowIndex,i=this._continuousSelectionStartIndex<e?this._continuousSelectionStartIndex:e,n=this._continuousSelectionStartIndex>e?this._continuousSelectionStartIndex:e,o=this._rows.slice(i,n+1),a=0;a<o.length;a++)o[a].classList.add(this._selectedPreviewCssClass);t.classList.add(this._selectedPreviewCssClass)},t.prototype._registerHandlers=function(t){for(var e=t.querySelectorAll("tr td.OrderedSelectionCell"),i=0;i<e.length;i++)e[i].addEventListener("mousedown",autotask.proxy(this._cellMouseDown,this)),e[i].addEventListener("mouseenter",autotask.proxy(this._cellMouseEnter,this)),e[i].addEventListener("mouseleave",autotask.proxy(this._cellMouseLeave,this)),e[i].addEventListener("mouseup",autotask.proxy(this._cellMouseUp,this));var n=t.getElementsByTagName("tr");for(i=0;i<n.length;i++)n[i].addEventListener("mousemove",autotask.proxy(this._rowMouseMove,this)),n[i].addEventListener("mouseleave",autotask.proxy(this._rowMouseLeave,this)),n[i].addEventListener("mouseup",autotask.proxy(this._rowMouseUp,this));document.addEventListener("keyup",autotask.proxy(this._documentKeyUp,this))},t.prototype._removeAllRowsFromSelectionPreviewMode=function(t){for(var e=0;e<this._rows.length;e++)this._rows[e].classList.remove(this._selectedPreviewCssClass)},t.prototype._selectCellsAssociatedWithRowKeys=function(t){for(var e=null,i=t.length,n=0;n<i;n++)e=this._rowKeySystem.__getRowByRowKey(t[n]),this._selectRow(e)},t.prototype._selectionMouseDown=function(t,e,i){var n=this._rowKeySystem.__getRowKeyByRow(t),o=this._selectionSystem.__isRowKeySelected(n);if(i)if(o)this._readyToBeUnselectedRowKey=n;else{var a=new AutotaskGridSystem.OrderedSelectionRange(n,e,this._continuousSelectionStartIndex,this._rowKeySystem,this._rowNestingSystem).__get_rowKeys();this._selectionSystem.__selectRowKeys(a,!0,!0),this._updateContinuousSelectionStatus(t,!1)}else if(o)this._readyToBePersistedRowKey=n;else{var s=new AutotaskGridSystem.OrderedSelectionRange(n,e,this._continuousSelectionStartIndex,this._rowKeySystem,this._rowNestingSystem).__get_rowKeys(),r=this._selectionSystem._findSelectedRowKeysNotInArray(s);this._selectionSystem.__modifySelection(s,r,!0,!0),this._updateContinuousSelectionStatus(t,e)}},t.prototype._selectionMouseUp=function(t,e){var i=this._rowKeySystem.__getRowKeyByRow(t);if(i===this._readyToBeUnselectedRowKey){var n=new AutotaskGridSystem.OrderedSelectionRange(i,!1,this._continuousSelectionStartIndex,this._rowKeySystem,this._rowNestingSystem).__get_rowKeys();this._selectionSystem.__unselectRowKeys(n,!0,!0),this._updateContinuousSelectionStatus(t,!1)}else if(i===this._readyToBePersistedRowKey){var o=new AutotaskGridSystem.OrderedSelectionRange(i,e,this._continuousSelectionStartIndex,this._rowKeySystem,this._rowNestingSystem).__get_rowKeys(),a=this._selectionSystem._findSelectedRowKeysNotInArray(o);this._selectionSystem.__modifySelection(o,a,!0,!0),this._updateContinuousSelectionStatus(t,e)}this._readyToBeUnselectedRowKey=null,this._readyToBePersistedRowKey=null},t.prototype._selectRow=function(t){null!==t&&(t.classList.add(this._selectedCssClass),this._selectedRowCount++)},t.prototype._unselectRow=function(t){null!==t&&(t.classList.remove(this._selectedCssClass),this._selectedRowCount--)},t.prototype._updateContinuousSelectionStatus=function(t,e){if(e)this._removeAllRowsFromSelectionPreviewMode(t);else{var i=t.rowIndex;this._continuousSelectionStartIndex=i}},t.prototype._updateBulkSelectionButtonState=function(){var t=this._rows.length;null!==this._bulkSelectionButton&&(0===t?this._bulkSelectionButton.isEnabled=!1:0===this._selectedRowCount?this._bulkSelectionButton.selectionState=AutotaskButtons.CheckBoxButtonState.Unchecked:this._selectedRowCount>0&&this._selectedRowCount<t?this._bulkSelectionButton.selectionState=AutotaskButtons.CheckBoxButtonState.Indeterminate:this._selectedRowCount===t?this._bulkSelectionButton.selectionState=AutotaskButtons.CheckBoxButtonState.Checked:autotask.throwException("Cannot determine the grid bulk menu checkbox state."))},t}(),window.AutotaskGridSystem.OrderedSelectionRange=function(){"use strict";function t(t,e,i,n,o){var a=n.__getRowIndexByRowKey(t);this._rowKeys=this._determineRowKeys(a,e,i,n,o)}return t.prototype._rowKeys=null,t.prototype.__get_rowKeys=function(){return this._rowKeys},t.prototype._extendEndIndexToAccommodateNesting=function(t,e,i){for(var n=t,o=t+1;o<e.length&&!(e[o].depth<=i);o++)n=o;return n},t.prototype._findSmallestDepthWithinRange=function(t,e,i){for(var n=null,o=t;o<=e;o++)i[o].isNestingPoint&&(null===n||i[o].depth<n)&&(n=i[o].depth);return n},t.prototype._determineRowKeys=function(t,e,i,n,o){var a=null,s=null;if(e?(a=i<t?i:t,s=i>t?i:t):(a=t,s=t),o.__get_isEnabled()){var r=o.__get_rowInformation(),l=this._findSmallestDepthWithinRange(a,s,r);null!==l&&(s=this._extendEndIndexToAccommodateNesting(s,r,l))}return n.__getRowKeysByRowIndexRange(a,s)},t}(),window.AutotaskGridSystem.OrderedSingleSelectionColumn=function(){"use strict";function t(t,e,i,n){var o=n+"_OrderedSingleSelectionColumn";autotask.instanceManagement.__addRegistrationKey(this,o),this._gridId=n,this._selectedCssClass="Selected",this._isDragAndDropEnabled=null!==t,this._rowDropRoute=t,this._isDropOntoRowEnabled=e,this._statusTextObject=i}return t.prototype._dragAndDropCoordinator=null,t.prototype._gridId=null,t.prototype._isDragAndDropEnabled=null,t.prototype._isDropOntoRowEnabled=null,t.prototype._readyToBeUnselectedRowKey=null,t.prototype._rowDropRoute=null,t.prototype._rowKeySystem=null,t.prototype._selectedCssClass=null,t.prototype._selectionSystem=null,t.prototype._statusTextObject=null,t.prototype._cellMouseDown=function(t){var e=t.currentTarget,i=this._acquireRowFromCell(e);this._selectionMouseDown(i),t.preventDefault(),this._isDragAndDropEnabled&&!t.shiftKey&&this._dragAndDropCoordinator.__mouseDown()},t.prototype._cellMouseUp=function(t){var e=t.currentTarget,i=this._acquireRowFromCell(e);this._selectionMouseUp(i,t.shiftKey,t.ctrlKey)},t.prototype._rowMouseLeave=function(t){this._isDragAndDropEnabled&&this._dragAndDropCoordinator.__mouseLeave()},t.prototype._rowMouseMove=function(t){var e=t.currentTarget;this._isDragAndDropEnabled&&this._dragAndDropCoordinator.__mouseMove(e,autotask.layoutAnalysis.__calculateOffsetY(t),t.pageX,t.pageY)},t.prototype._rowMouseUp=function(t){var e=t.currentTarget;this._isDragAndDropEnabled&&this._dragAndDropCoordinator.__mouseUp(e,autotask.layoutAnalysis.__calculateOffsetY(t))},t.prototype._userInterfaceUpdating=function(t){var e=t.__get_rowKeyAdditions(),i=t.__get_rowKeySubtractions(),n=null;1===e.length&&(n=this._rowKeySystem.__getRowByRowKey(e[0]),this._selectRow(n)),1===i.length&&(n=this._rowKeySystem.__getRowByRowKey(i[0]),this._unselectRow(n))},t.prototype.__initialize=function(){var t=autotask.find(this._gridId).__connectToGateway();this._selectionSystem=t.__get_selectionSystem();var e=autotask.proxy(this._userInterfaceUpdating,this);this._selectionSystem.__activate(!0,e,[]),this._rowKeySystem=t.__get_rowKeySystem();var i=this._selectionSystem.__getSelectedRowKeys();if(1===i.length){var n=this._rowKeySystem.__getRowByRowKey(i[0]);this._selectRow(n)}var o=t.__get_htmlSystem().__get_body();if(this._registerHandlers(o),this._isDragAndDropEnabled){var a=Array.from(o.getElementsByTagName("tr")),s=t.__get_rowDropSystem(),r=t.__get_rowNestingSystem(),l=t.__get_contextOverlaySystem(),_=t.__get_contextMenuSystem(),u=t.__get_editSystem();this._dragAndDropCoordinator=new Autotask.InteractionColumnDragAndDrop(s,this._rowKeySystem,r,this._selectionSystem,l,_,u,a,o,this._rowDropRoute,this._isDropOntoRowEnabled,this._statusTextObject)}},t.prototype._acquireRowFromCell=function(t){return t.closest("tr")},t.prototype._registerHandlers=function(t){for(var e=t.querySelectorAll("tr td.OrderedSelectionCell"),i=0;i<e.length;i++)e[i].addEventListener("mousedown",autotask.proxy(this._cellMouseDown,this)),e[i].addEventListener("mouseup",autotask.proxy(this._cellMouseUp,this));var n=t.getElementsByTagName("tr");for(i=0;i<n.length;i++)n[i].addEventListener("mousemove",autotask.proxy(this._rowMouseMove,this)),n[i].addEventListener("mouseleave",autotask.proxy(this._rowMouseLeave,this)),n[i].addEventListener("mouseup",autotask.proxy(this._rowMouseUp,this))},t.prototype._selectionMouseDown=function(t){var e=this._selectionSystem.__getSelectedRowKeys(),i=this._selectionSystem.__getCount(),n=this._rowKeySystem.__getRowKeyByRow(t);if(1===i&&n===e[0])this._readyToBeUnselectedRowKey=n;else{var o=[];1===i&&o.push(e[0]),this._selectionSystem.__modifySelection([n],o,!0,!0)}},t.prototype._selectionMouseUp=function(t){var e=this._rowKeySystem.__getRowKeyByRow(t);e===this._readyToBeUnselectedRowKey&&this._selectionSystem.__unselectRowKeys([e],!0,!0),this._readyToBeUnselectedRowKey=null},t.prototype._selectRow=function(t){null!==t&&t.classList.add(this._selectedCssClass)},t.prototype._unselectRow=function(t){null!==t&&t.classList.remove(this._selectedCssClass)},t}(),window.AutotaskGridSystem.PersistenceKeyActivator=function(){"use strict";function t(t,e){var i=e+"_PersistenceKeyActivator";autotask.instanceManagement.__addRegistrationKey(this,i),this._persistenceKeys=t,this._gridId=e}return t.prototype._gridId=null,t.prototype._persistenceKeys=null,t.prototype.__initialize=function(){autotask.find(this._gridId).__connectToGateway().__get_persistenceKeySystem().__activate(this._persistenceKeys)},t}(),window.AutotaskGridSystem.RadioButtonSelectionColumn=function(){"use strict";function t(t){var e=t+"_RadioButtonSelectionColumn";autotask.instanceManagement.__addRegistrationKey(this,e),this._gridId=t,this._selectedCssClass="Selected"}return t.prototype._gridId=null,t.prototype._rowKeySystem=null,t.prototype._selectedCssClass=null,t.prototype._selectionSystem=null,t.prototype._iconClick=function(t){var e=t.currentTarget,i=[this._rowKeySystem.__getRowKeyByCellContent(e)];if(!e.classList.contains("Disabled"))if(e.classList.contains(this._selectedCssClass))this._selectionSystem.__unselectRowKeys(i,!0,!0);else{var n=[];if(1===this._selectionSystem.__getCount()){var o=this._selectionSystem.__getSelectedRowKeys();n.push(o[0])}this._selectionSystem.__modifySelection(i,n,!0,!0)}},t.prototype._userInterfaceUpdating=function(t){var e=t.__get_rowKeyAdditions(),i=t.__get_rowKeySubtractions(),n=null,o=null;1===e.length&&(n=this._findIconByRowKey(e[0]),this._selectIcon(n),o=this._rowKeySystem.__getRowByRowKey(e[0]),this._selectRow(o)),1===i.length&&(n=this._findIconByRowKey(i[0]),this._unselectIcon(n),o=this._rowKeySystem.__getRowByRowKey(i[0]),this._unselectRow(o))},t.prototype.__initialize=function(){var t=autotask.find(this._gridId).__connectToGateway();this._selectionSystem=t.__get_selectionSystem();var e=t.__get_htmlSystem().__get_body();this._rowKeySystem=t.__get_rowKeySystem();var i=this._findExcludedRowKeys(e),n=autotask.proxy(this._userInterfaceUpdating,this);this._selectionSystem.__activate(!0,n,i);var o=this._selectionSystem.__getSelectedRowKeys();if(1===o.length){var a=this._rowKeySystem.__getRowByRowKey(o[0]);if(null!==a){var s=a.querySelector("td.ImageSelectionCell .Icon");null!==s&&(this._selectIcon(s),this._selectRow(a))}}for(var r=e.querySelectorAll("tr td.ImageSelectionCell .Icon"),l=0;l<r.length;l++)r[l].addEventListener("click",autotask.proxy(this._iconClick,this))},t.prototype._findExcludedRowKeys=function(t){for(var e=[],i=null,n=null,o=null,a=t.getElementsByClassName("Icon Disabled"),s=a.length;s--;)(i=a[s].parentElement.parentElement).classList.contains("ImageSelectionCell")&&(n=i.parentElement,o=this._rowKeySystem.__getRowKeyByRow(n),e.push(o));return e},t.prototype._findIconByRowKey=function(t){var e=null,i=this._rowKeySystem.__getRowByRowKey(t);return null!==i&&(e=i.querySelector("td.ImageSelectionCell .Icon")),e},t.prototype._selectIcon=function(t){null!==t&&t.classList.add(this._selectedCssClass)},t.prototype._selectRow=function(t){null!==t&&t.classList.add(this._selectedCssClass)},t.prototype._unselectIcon=function(t){null!==t&&t.classList.remove(this._selectedCssClass)},t.prototype._unselectRow=function(t){null!==t&&t.classList.remove(this._selectedCssClass)},t}(),window.AutotaskGridSystem.RefreshActivator=function(){"use strict";function t(t,e,i,n){var o=n+"_RefreshActivator";autotask.instanceManagement.__addRegistrationKey(this,o),this._route=t,this._editPostedRowModelParameterName=e,this._isColumnArrangementEditRowPreservationEnabled=i,this._gridId=n}return t.prototype._editPostedRowModelParameterName=null,t.prototype._gridId=null,t.prototype._isColumnArrangementEditRowPreservationEnabled=null,t.prototype._route=null,t.prototype.__initialize=function(){autotask.find(this._gridId).__connectToGateway().__get_refreshSystem().__activate(this._route,this._editPostedRowModelParameterName,this._isColumnArrangementEditRowPreservationEnabled)},t}(),window.AutotaskGridSystem.RouteActivator=function(){"use strict";function t(t,e){var i=e+"_RouteActivator";autotask.instanceManagement.__addRegistrationKey(this,i),this._gridId=e,this._routes=t}return t.prototype._routes=null,t.prototype._gridId=null,t.prototype.__initialize=function(){autotask.find(this._gridId).__connectToGateway().__get_routeSystem().__activate(this._routes)},t}(),window.AutotaskGridSystem.RowAccessoryData=function(){"use strict";function t(t,e,i){autotask.instanceManagement.__addRegistrationKey(this,t),this._gridId=e,this._rowKey=i,this._values={};for(var n=3;n<arguments.length&&void 0!==arguments[n];n+=2)this._values[arguments[n]]=arguments[n+1]}return t.prototype._gridId=null,t.prototype._rowKey=null,t.prototype._values=null,t.prototype.__getValue=function(t){var e=null;return void 0!==this._values[t]&&(e=this._values[t]),e},t.prototype.__initialize=function(){autotask.find(this._gridId).__connectToGateway().__get_rowAccessoryDataSystem().__registerRowAccessoryData(this._rowKey,this)},t}(),window.AutotaskGridSystem.RowImmutableData=function(){"use strict";function t(t,e,i){autotask.instanceManagement.__addRegistrationKey(this,t),this._gridId=e,this._rowKey=i,this._data={};for(var n=null,o=3;o<arguments.length&&void 0!==arguments[o];o++)for(var a in n=arguments[o].__get_requestData())n.hasOwnProperty(a)&&(this._data[a]=n[a])}return t.prototype._data=null,t.prototype._gridId=null,t.prototype._rowKey=null,t.prototype.__get_requestData=function(){return this._data},t.prototype.__initialize=function(){autotask.find(this._gridId).__connectToGateway().__get_rowImmutableDataSystem().__registerRowImmutableData(this._rowKey,this)},t}(),window.AutotaskGridSystem.TimeoutMessageActivator=function(){"use strict";function t(t){var e=t+"_TimeoutMessageActivator";autotask.instanceManagement.__addRegistrationKey(this,e),this._gridId=t}return t.prototype._gridId=null,t.prototype.__initialize=function(){var t=autotask.find(this._gridId).__connectToGateway(),e=t.__get_timeoutMessageSystem(),i=t.__get_exportSystem();e.__activate(i)},t}(),window.AutotaskGridSystem.SelectionStorage=function(){"use strict";function t(){this._count=0,this._rowKeys=[]}return t.prototype._rowKeys=null,t.prototype.__getCount=function(){return this._count},t.prototype.__getRowKeys=function(){return this._rowKeys},t.prototype.__add=function(t){for(var e=0;e<t.length;e++)this._addKey(t[e])},t.prototype.__remove=function(t){for(var e=0;e<t.length;e++)this._removeKey(t[e])},t.prototype.__removeAll=function(){this._count=0,this._rowKeys=[]},t.prototype._addKey=function(t){this._rowKeys.indexOf(t)<0&&(this._rowKeys.push(t),this._count++)},t.prototype._removeKey=function(t){var e=this._rowKeys.indexOf(t);e>-1&&(this._rowKeys.splice(e,1),this._count--)},t}(),window.AutotaskGridSystem.SerializedEditData=function(){"use strict";function t(t){this._data=this._generateData(t)}return t.prototype._data=null,t.prototype.__mergeWithData=function(t,e){for(var i in null===e&&window.autotask.throwException("The data object cannot be null when merging with serialized grid edit data."),this._data){if(this._data.hasOwnProperty(i))e[t+"."+i]=this._data[i]}},t.prototype._generateData=function(t){for(var e={},i=null,n=null,o=null,a=null,s=t.querySelectorAll("[data-systems]"),r=0;r<s.length;r++)if(this._isRequestDataSystemParticipant(s[r].dataset.systems)&&("function"==typeof(i=autotask.find(s[r].dataset.alphaId)).__get_gridEditDataProvider?(((n=i.__get_gridEditDataProvider()).get_isEnabled()||n.get_isDataProvidedWhenDisabled())&&(o=n.get_requestData()),n.__dispose()):o=i.createRequestData(),null!==o))for(a in o)o.hasOwnProperty(a)&&(e[a]=o[a]);return e},t.prototype._isRequestDataSystemParticipant=function(t){return"1"===t[2]},t}(),window.AutotaskGridSystem.SerializedFilterData=function(){"use strict";function t(t){this._data=this._generateData(t)}return t.prototype._data=null,t.prototype.__get_data=function(){return this._data},t.prototype.__mergeWithData=function(t,e){for(var i in null===e&&window.autotask.throwException("The data object cannot be null when merging with serialized grid filter data."),this._data){if(this._data.hasOwnProperty(i))e[t+"."+i]=this._data[i]}},t.prototype._generateData=function(t){for(var e={},i=null,n=null,o=null,a=null,s=t.querySelectorAll("[data-systems]"),r=0;r<s.length;r++)if(this._isRequestDataSystemParticipant(s[r].dataset.systems)&&("function"==typeof(i=autotask.find(s[r].dataset.alphaId)).__get_gridEditDataProvider?(o=(n=i.__get_gridEditDataProvider()).get_requestData(),n.__dispose()):o=i.createRequestData(),null!==o))for(a in o)o.hasOwnProperty(a)&&(e[a]=o[a]);return e},t.prototype._isRequestDataSystemParticipant=function(t){return"1"===t[3]},t}(),window.AutotaskGridSystem.AggregateValuesSystem=function(){"use strict";function t(t){this._isEnabled=!1,this._eventCoordinator=t}return t.prototype._eventCoordinator=null,t.prototype._isEnabled=null,t.prototype._url=null,t.prototype.__activate=function(t){this._url=t,this._isEnabled=!0},t.prototype.__showDialog=function(){if(this._verify()){var t=new Autotask.GridAggregateValuesShowingEventArgs;this._eventCoordinator.__aggregateValuesShowing(t);var e={};if(e=t.__applyValues(e),t.__get_isConfirmationDialogEnabled()){var i=this,n=t.__get_confirmationDialogOptions((function(){i._launchDialog(e)}),null);autotask.confirmationDialog.show(n)}else this._launchDialog(e)}},t.prototype._launchDialog=function(t){autotask.ajax.postRequest(this._url,t,null).dialog()},t.prototype._verify=function(){var t=!0;return this._isEnabled||(t=!1,autotask.throwException("The aggregate values system is not enabled.")),t},t}(),window.AutotaskGridSystem.AutomaticSizingSystem=function(){"use strict";function t(t,e,i,n){this._gridElement=t,this._headerElement=e,this._headerCoverElement=e.previousElementSibling,this._bodyElement=i,this._bodyScrollingElement=i.firstElementChild,this._footerElement=n,this._footerScrollingElement=n.firstElementChild,this._footerCoverElement=n.previousElementSibling,this._scrollParent=autotask.scrolling.__scrollParentForHtmlElement(this._gridElement);var o=this._gridElement.closest("[data-observer-root]");null!==o&&o===this._scrollParent&&(this._observerRootInstance=autotask.find(o.dataset.alphaId)),this._isEnabled=!1,this._isSyncingBodyScroll=!1,this._isSyncingFooterScroll=!1,this._defaultFooterPositionCssClass="DefaultFooterPosition",this._defaultHeaderPositionCssClass="DefaultHeaderPosition",this._minimumHeightFooterPositionCssClass="MinimumHeightFooterPosition",this._minimumHeightHeaderPositionCssClass="MinimumHeightHeaderPosition",this._stickyFooterPositionCssClass="StickyFooterPosition",this._stickyHeaderPositionCssClass="StickyHeaderPosition",this._minimumHeight=250}return t.prototype._bodyElement=null,t.prototype._bodyScrollingElement=null,t.prototype._defaultFooterPositionCssClass=null,t.prototype._defaultHeaderPositionCssClass=null,t.prototype._footerCoverElement=null,t.prototype._footerElement=null,t.prototype._footerScrollingElement=null,t.prototype._gridElement=null,t.prototype._headerCoverElement=null,t.prototype._headerElement=null,t.prototype._initializationObserver=null,t.prototype._inlineVerticalPixelStyle=null,t.prototype._isEnabled=null,t.prototype._isSyncingBodyScroll=null,t.prototype._isSyncingFooterScroll=null,t.prototype._minimumHeightFooterPositionCssClass=null,t.prototype._minimumHeightHeaderPositionCssClass=null,t.prototype._minimumHeight=null,t.prototype._observerRootInstance=null,t.prototype._primaryObserver=null,t.prototype._resizeTimeoutId=null,t.prototype._scrollParent=null,t.prototype._stickyFooterPositionCssClass=null,t.prototype._stickyHeaderPositionCssClass=null,t.prototype.__get_isEnabled=function(){return this._isEnabled},t.prototype.__activate=function(){this._isEnabled=!0,this.__reset(),this._bodyScrollingElement.addEventListener("scroll",autotask.proxy(this._bodyScrollListener,this)),this._footerScrollingElement.addEventListener("scroll",autotask.proxy(this._footerScrollListener,this))},t.prototype._bodyScrollListener=function(){this._isSyncingBodyScroll||(this._isSyncingFooterScroll=!0,this._headerElement.scrollLeft=this._bodyScrollingElement.scrollLeft,this._footerScrollingElement.scrollLeft=this._bodyScrollingElement.scrollLeft),this._isSyncingBodyScroll=!1},t.prototype._footerScrollListener=function(){this._isSyncingFooterScroll||(this._isSyncingBodyScroll=!0,this._headerElement.scrollLeft=this._footerScrollingElement.scrollLeft,this._bodyScrollingElement.scrollLeft=this._footerScrollingElement.scrollLeft),this._isSyncingFooterScroll=!1},t.prototype.__dispose=function(){null!==this._initializationObserver&&(this._initializationObserver.unobserve(this._gridElement),this._initializationObserver=null),null!==this._primaryObserver&&(this._primaryObserver.unobserve(this._gridElement),this._primaryObserver=null)},t.prototype.__reset=function(){if(0===this._gridElement.clientHeight){null!==this._initializationObserver&&(this._initializationObserver.unobserve(this._gridElement),this._initializationObserver=null);var t=this;this._initializationObserver=new IntersectionObserver((function(e){e[0].intersectionRatio>0&&(t._initializeInlineStyles(),t._activatePrimaryObserver(),t._initializationObserver.unobserve(t._gridElement),t._initializationObserver=null)}),{threshold:0}),this._initializationObserver.observe(this._gridElement)}else this._initializeInlineStyles(),this._activatePrimaryObserver()},t.prototype.__resize=function(){null!==this._resizeTimeoutId&&window.clearTimeout(this._resizeTimeoutId);var t=this;this._resizeTimeoutId=window.setTimeout((function(){t._initializeInlineStyles(),t._activatePrimaryObserver()}),25)},t.prototype._activatePrimaryObserver=function(){this._gridElement.clientHeight>this._minimumHeight&&this._initializePrimaryObserver()},t.prototype._initializeInlineStyles=function(){var t=this._footerScrollingElement.firstElementChild;this._bodyScrollingElement.scrollWidth>this._bodyScrollingElement.clientWidth?(this._bodyElement.style.height=this._bodyScrollingElement.scrollHeight.toString(10).concat("px"),t.style.width=this._bodyScrollingElement.scrollWidth.toString(10).concat("px"),this._footerScrollingElement.style.display="block"):(this._bodyElement.style.height=null,t.style.width=null,this._footerScrollingElement.style.display=null);const e=Math.max(this._gridElement.clientHeight-this._minimumHeight,0);this._inlineVerticalPixelStyle=e.toString(10).concat("px"),this._headerCoverElement.style.height=this._inlineVerticalPixelStyle,this._footerCoverElement.style.height=this._inlineVerticalPixelStyle},t.prototype._initializePrimaryObserver=function(){null!==this._primaryObserver&&(this._primaryObserver.unobserve(this._gridElement),this._primaryObserver=null);var t=0;null!==this._observerRootInstance&&(t=-1*this._observerRootInstance.get_observerRootTopMargin());var e=t.toString(10).concat("px 0px 0px 0px"),i=[];i.push(0);var n=this._minimumHeight/this._gridElement.clientHeight;i.push(n);var o={rootMargin:e,threshold:i};this._primaryObserver=new IntersectionObserver(autotask.proxy(this._primaryObserverCallbackHandler,this,n),o),this._primaryObserver.observe(this._gridElement)},t.prototype._primaryObserverCallbackHandler=function(t,e){var i=e[0];if(0===i.intersectionRatio)this._positionDefaultHeaderAndFooter();else if(i.intersectionRatio<t){var n=AutotaskDomSystem.Other.positionOffset(this._gridElement).top,o=AutotaskDomSystem.Other.positionOffset(this._headerElement).top,a=AutotaskDomSystem.Other.positionOffset(this._footerElement).top;n<o&&this._positionMinimumHeightHeader(),n+this._gridElement.clientHeight>a+this._footerElement.offsetHeight&&this._positionMinimumHeightFooter()}else this._positionStickyHeaderAndFooter()},t.prototype._positionDefaultHeaderAndFooter=function(){this._headerElement.style.top="0",this._footerElement.style.bottom="0",this._gridElement.classList.add(this._defaultHeaderPositionCssClass),this._gridElement.classList.add(this._defaultFooterPositionCssClass),this._gridElement.classList.remove(this._stickyHeaderPositionCssClass),this._gridElement.classList.remove(this._stickyFooterPositionCssClass),this._gridElement.classList.remove(this._minimumHeightHeaderPositionCssClass),this._gridElement.classList.remove(this._minimumHeightFooterPositionCssClass)},t.prototype._positionMinimumHeightFooter=function(){this._footerElement.style.bottom=this._inlineVerticalPixelStyle,this._gridElement.classList.add(this._minimumHeightFooterPositionCssClass),this._gridElement.classList.remove(this._defaultFooterPositionCssClass),this._gridElement.classList.remove(this._stickyFooterPositionCssClass)},t.prototype._positionMinimumHeightHeader=function(){this._headerElement.style.top=this._inlineVerticalPixelStyle,this._gridElement.classList.add(this._minimumHeightHeaderPositionCssClass),this._gridElement.classList.remove(this._defaultHeaderPositionCssClass),this._gridElement.classList.remove(this._stickyHeaderPositionCssClass)},t.prototype._positionStickyHeaderAndFooter=function(){var t=0;null!==this._observerRootInstance&&(t=this._observerRootInstance.get_observerRootTopMargin()),this._headerElement.style.top=t.toString(10).concat("px"),this._footerElement.style.bottom="0",this._gridElement.classList.add(this._stickyHeaderPositionCssClass),this._gridElement.classList.add(this._stickyFooterPositionCssClass),this._gridElement.classList.remove(this._defaultHeaderPositionCssClass),this._gridElement.classList.remove(this._defaultFooterPositionCssClass),this._gridElement.classList.remove(this._minimumHeightHeaderPositionCssClass),this._gridElement.classList.remove(this._minimumHeightFooterPositionCssClass)},t}(),window.AutotaskGridSystem.ColumnArrangementSystem=function(){"use strict";function t(t){this._isEnabled=!1,this._eventCoordinator=t}return t.prototype._eventCoordinator=null,t.prototype._isEnabled=null,t.prototype._url=null,t.prototype.__activate=function(t){this._url=t,this._isEnabled=!0},t.prototype.__showDialog=function(){if(this._verify()){var t=new Autotask.GridColumnConfigurationShowingEventArgs;if(this._eventCoordinator.__columnConfigurationShowing(t),t.__get_isConfirmationDialogEnabled()){var e=t.__get_confirmationDialogOptions(autotask.proxy(this._launchDialog,this),null);autotask.confirmationDialog.show(e)}else this._launchDialog()}},t.prototype._launchDialog=function(){autotask.ajax.postRequest(this._url,{},null).dialog()},t.prototype._verify=function(){var t=!0;return this._isEnabled||(t=!1,autotask.throwException("The column arrangement system (column chooser) is not enabled.")),t},t}(),window.AutotaskGridSystem.ColumnIndexSystem=function(){"use strict";function t(){this._isEnabled=!1}return t.prototype._firstDataColumnIndex=null,t.prototype._isEnabled=null,t.prototype.__get_firstDataColumnIndex=function(){var t=null;return this._verify()&&(t=this._firstDataColumnIndex),t},t.prototype.__activate=function(t){this._isEnabled=!0,this._firstDataColumnIndex=t},t.prototype._verify=function(){var t=!0;return this._isEnabled||(t=!1,autotask.throwException("The column index system is not enabled.")),t},t}(),window.AutotaskGridSystem.ColumnResizer=function(){"use strict";function t(t,e){this._sourceCellElement=t,this._headerCellElements=e,this._headerCellCount=e.length}return t.prototype._headerCellCount=null,t.prototype._headerCellElements=null,t.prototype._sourceCellElement=null,t.prototype._width=null,t.prototype.__resize=function(){var t=this._sourceCellElement.clientWidth-8;if("0px"===window.getComputedStyle(this._sourceCellElement).borderRightWidth&&(t-=1),t!==this._width){this._width=t;for(var e="min-width: "+t+"px; max-width: "+t+"px; width: "+t+"px;",i=0;i<this._headerCellCount;i++)this._headerCellElements[i].setAttribute("style",e)}},t}(),window.AutotaskGridSystem.ContextMenuSystem=function(){"use strict";function t(t){this._isEnabled=!1,this._isOperationSuspended=!1,this._eventCoordinator=t}return t.prototype._contextMenu=null,t.prototype._eventCoordinator=null,t.prototype._isEnabled=null,t.prototype._rightClickContextMenu=null,t.prototype.__get_contextOverlay=function(){return this._contextMenu},t.prototype.__get_isEnabled=function(){return this._isEnabled},t.prototype.__get_isOperationSuspended=function(){return this._isOperationSuspended},t.prototype.__get_rightClickContextMenu=function(){return this._rightClickContextMenu},t.prototype.__activate=function(t,e){this._isEnabled=!0,this._contextMenu=autotask.find(t),this._contextMenu.addShowingHandler(autotask.proxy(this._userInteractionEventStarted,this)),this._contextMenu.addHidingHandler(autotask.proxy(this._userInteractionEventEnded,this)),null!==e&&(this._rightClickContextMenu=autotask.find(e),this._rightClickContextMenu.addShowingHandler(autotask.proxy(this._userInteractionEventStarted,this)),this._rightClickContextMenu.addHidingHandler(autotask.proxy(this._userInteractionEventEnded,this)))},t.prototype.__resumeOperation=function(){this._isOperationSuspended=!1},t.prototype.__suspendOperation=function(){this._isOperationSuspended=!0},t.prototype._userInteractionEventEnded=function(){this._eventCoordinator.__userInteractionEventEnded()},t.prototype._userInteractionEventStarted=function(){this._eventCoordinator.__userInteractionEventStarted()},t}(),window.AutotaskGridSystem.ContextOverlaySystem=function(){"use strict";function t(t,e){this._body=t,this._eventCoordinator=e,this._dataDisplayCellAttributeKey="data-overlay-key",this._isEnabled=!1,this._isOperationSuspended=!1}return t.prototype._body=null,t.prototype._dataDisplayCellAttributeKey=null,t.prototype._dataDisplayCellContextOverlay=null,t.prototype._eventCoordinator=null,t.prototype._identificationSystem=null,t.prototype._isEnabled=null,t.prototype._isOperationSuspended=null,t.prototype._requestCanceler=null,t.prototype._routeSystem=null,t.prototype._rowKeySystem=null,t.prototype._dataDisplayCellContextOverlayShowing=function(t,e){this._dataDisplayCellContextOverlay.__showLoadingIndicator();var i=autotask.find(this._identificationSystem.__get_id()),n=function(){i.refresh()},o=this;return this._dataDisplayCellContextOverlay.__requestContent((function(i){null!==o._requestCanceler&&o._requestCanceler.__cancelRequest(),o._requestCanceler=e.__makeRequest(t,n,(function(t){o._requestCanceler=null,i(t)}))})),!0},t.prototype._dataDisplayCellMouseEnter=function(t){if(!this._isOperationSuspended){var e=t.currentTarget,i=this._rowKeySystem.__getRowKeyByCell(e),n=t.currentTarget.dataset.overlayKey,o=this._routeSystem.__getRoute(n);this._dataDisplayCellContextOverlay.clearShowingHandlers(),this._dataDisplayCellContextOverlay.addShowingHandler(autotask.proxy(this._dataDisplayCellContextOverlayShowing,this,i,o)),this._dataDisplayCellContextOverlay.show(t.currentTarget)}},t.prototype._dataDisplayCellMouseLeave=function(){this._dataDisplayCellContextOverlay.hide()},t.prototype._userInteractionEventEnded=function(){this._eventCoordinator.__userInteractionEventEnded()},t.prototype._userInteractionEventStarted=function(){this._eventCoordinator.__userInteractionEventStarted()},t.prototype.__get_isEnabled=function(){return this._isEnabled},t.prototype.__activate=function(t){this._isEnabled=!0;for(var e=this._body.querySelectorAll("td["+this._dataDisplayCellAttributeKey+"]"),i=0;i<e.length;i++)e[i].addEventListener("mouseenter",autotask.proxy(this._dataDisplayCellMouseEnter,this)),e[i].addEventListener("mouseleave",autotask.proxy(this._dataDisplayCellMouseLeave,this));this._dataDisplayCellContextOverlay=autotask.find(t),this._dataDisplayCellContextOverlay.addShowingHandler(autotask.proxy(this._userInteractionEventStarted,this)),this._dataDisplayCellContextOverlay.addHidingHandler(autotask.proxy(this._userInteractionEventEnded,this))},t.prototype.__dispose=function(){null!==this._requestCanceler&&this._requestCanceler.__cancelRequest()},t.prototype.__finalize=function(t,e,i){this._identificationSystem=t,this._rowKeySystem=e,this._routeSystem=i},t.prototype.__hideOverlay=function(){this._dataDisplayCellContextOverlay.hide()},t.prototype.__resumeOperation=function(){this._isOperationSuspended=!1},t.prototype.__suspendOperation=function(){this._isOperationSuspended=!0},t}(),window.AutotaskGridSystem.DisplayCellValidationSystem=function(){"use strict";function t(t){this._body=t}return t.prototype._body=null,t.prototype._containerValidation=null,t.prototype.__dispose=function(){this._containerValidation.__dispose(),this._containerValidation=null},t.prototype.__finalize=function(){var t=autotask.validationSummaryManagement.__findValidationSummary(this._body);this._containerValidation=new Autotask.GridDisplayValidation(this._body),this._containerValidation.__registerValidationSummary(t),this._containerValidation.__parse()},t.prototype.__validateDisplayCellLegacyEditor=function(t){var e=this._containerValidation.__validateLegacyEditor(t.__get_id(),!1);return this._completeValidation(e,!0),e},t.prototype.__validateDisplayCells=function(t){var e=this._containerValidation.__validate();return t||this._completeValidation(e,!1),e},t.prototype._completeValidation=function(t,e){t||this._containerValidation.__validationFailed(),this._containerValidation.__validationCompleted(t,e)},t}(),window.AutotaskGridSystem.EditSystem=function(){"use strict";function t(t,e,i,n){this._body=t,this._isEnabled=!1,this._isNewRowEditEnabled=!1,this._reconstructionCoordinator=e,this._eventCoordinator=i,this._editStateCoordinator=n,this._registerHandlers(t),this._changeEventDispatchers={}}return t.prototype._body=null,t.prototype._changeEventDispatchers=null,t.prototype._editCoordinator=null,t.prototype._editStateCoordinator=null,t.prototype._eventCoordinator=null,t.prototype._isEnabled=null,t.prototype._isNewRowEditEnabled=null,t.prototype._minimumColumnIndex=null,t.prototype._reconstructionCoordinator=null,t.prototype._cellClick=function(t){var e=t.currentTarget,i=e.cellIndex;if(i>=this._minimumColumnIndex){var n=e.closest("tr");this._editCoordinator.__startEditing(n,i),t.preventDefault()}},t.prototype.__get_isActive=function(){return null!==this._editCoordinator&&this._editCoordinator.__get_isActive()},t.prototype.__get_isEnabled=function(){return this._isEnabled},t.prototype.__activate=function(t,e,i,n,o,a,s,r,l){this._isEnabled=!0,e.isNewRowEditEnabled&&(this._isNewRowEditEnabled=!0);var _="Edit"+t;for(var u in this._editCoordinator=new Autotask.GridEditingRow(_,e,i,this._body,this._reconstructionCoordinator,this._eventCoordinator,this._editStateCoordinator,n,a,o,s,r,l),this._changeEventDispatchers)this._changeEventDispatchers.hasOwnProperty(u)&&this._editCoordinator.__registerEditCellChangeEventDispatcher(u,this._changeEventDispatchers[u])},t.prototype.__cancelEdit=function(){this._editCoordinator.__cancel()},t.prototype.__dispose=function(){null!==this._editCoordinator&&this._editCoordinator.__dispose()},t.prototype.__editExistingRow=function(t){this._verify()&&this._editCoordinator.__startEditingByKeyFieldValue(t)},t.prototype.__editNewRow=function(){this._verify()&&this._verifyNewRowEdit()&&this._editCoordinator.__startEditingNewRow(null)},t.prototype.__finalize=function(t){this._minimumColumnIndex=t.__get_firstDataColumnIndex()},t.prototype.__generateFieldData=function(){return this._editCoordinator.__generateFieldData()},t.prototype.__generatePreserveEditingData=function(){return this._editCoordinator.__generatePreserveEditingData()},t.prototype.__saveEdit=function(){this._verify()&&this._editCoordinator.__save()},t.prototype.__registerEditCellChangeEventDispatcher=function(t,e){this._changeEventDispatchers[t]=e},t.prototype._registerHandlers=function(t){for(var e=t.querySelectorAll("tr[data-editable] td"),i=0;i<e.length;i++)e[i].addEventListener("click",autotask.proxy(this._cellClick,this))},t.prototype._verify=function(){var t=!0;return this._isEnabled||(t=!1,autotask.throwException("The edit system is not enabled.")),t},t.prototype._verifyNewRowEdit=function(){var t=!0;return this._isNewRowEditEnabled||(t=!1,autotask.throwException("The edit system does not have new row edit enabled.")),t},t}(),window.AutotaskGridSystem.ExportSystem=function(){"use strict";function t(t){this._isDefaultFormatEnabled=!1,this._isImportFormatEnabled=!1,this._isExportPrevented=!1,this._eventCoordinator=t}return t.prototype._defaultFormatConfirmationText=null,t.prototype._defaultFormatRowLimit=null,t.prototype._defaultFormatUrl=null,t.prototype._eventCoordinator=null,t.prototype._exportableRowCountForDefaultFormat=null,t.prototype._exportableRowCountForImportFormat=null,t.prototype._filterSystem=null,t.prototype._identificationSystem=null,t.prototype._importFormatConfirmationText=null,t.prototype._importFormatRowLimit=null,t.prototype._importFormatUrl=null,t.prototype._isDefaultFormatEnabled=null,t.prototype._isExportPrevented=null,t.prototype._isImportFormatEnabled=null,t.prototype.__get_exportableRowCountForDefaultFormat=function(){return this._isDefaultFormatEnabled||autotask.throwException("Exporting in the default format is not enabled."),this._exportableRowCountForDefaultFormat},t.prototype.__get_exportableRowCountForImportFormat=function(){return this._isImportFormatEnabled||autotask.throwException("Exporting in the import format is not enabled."),this._exportableRowCountForImportFormat},t.prototype.__activateDefaultFormatExport=function(t,e,i,n){this._isDefaultFormatEnabled=!0,this._defaultFormatUrl=t,this._exportableRowCountForDefaultFormat=e,this._defaultFormatRowLimit=i,this._defaultFormatConfirmationText=n},t.prototype.__activateImportFormatExport=function(t,e,i,n){this._isImportFormatEnabled=!0,this._importFormatUrl=t,this._exportableRowCountForImportFormat=e,this._importFormatRowLimit=i,this._importFormatConfirmationText=n},t.prototype.__preventExport=function(){this._isExportPrevented=!0},t.prototype.__exportInDefaultFormat=function(){this._verifyDefaultFormatExport()&&(this._exportableRowCountForDefaultFormat>this._defaultFormatRowLimit?this._showConfirmation(this._defaultFormatConfirmationText,autotask.proxy(this._export,this,this._defaultFormatUrl)):this._export(this._defaultFormatUrl))},t.prototype.__exportInImportFormat=function(){this._verifyImportFormatExport()&&(this._exportableRowCountForImportFormat>this._importFormatRowLimit?this._showConfirmation(this._importFormatConfirmationText,autotask.proxy(this._export,this,this._importFormatUrl)):this._export(this._importFormatUrl))},t.prototype.__finalize=function(t,e){this._filterSystem=t,this._identificationSystem=e},t.prototype._createHiddenFieldElement=function(t,e){var i=document.createElement("input");return i.setAttribute("type","hidden"),i.setAttribute("name",t),null!==e&&i.setAttribute("value",e),i},t.prototype._export=function(t){var e={},i=new Autotask.GridChangeState(this._identificationSystem.__get_id()),n=null;this._filterSystem.__get_isEnabled()&&(n=this._filterSystem.__createSerializedData()),i.__appendPostData(e,n);var o=new Autotask.GridStateChangeEventArgs;this._eventCoordinator.__applyExporting(o),e=o.__applyValues(e);var a=window.parent.document.body,s=window.parent.document.createElement("form");s.style.display="none";var r=null,l=null;for(var _ in e)if(e.hasOwnProperty(_))if(e[_]instanceof AutotaskGridSystem.SerializedFilterData?l=this._prefixSerializedData(_,e[_].__get_data()):e[_]instanceof AutotaskRequestDataSystem.SerializedRequestData?l=this._prefixSerializedData(_,e[_].requestData):e[_]instanceof AutotaskRequestDataSystem.RequestDataDictionary&&(l=this._prefixSerializedData(_,e[_].data)),null!==l){for(var u in l)l.hasOwnProperty(u)&&(r=this._createHiddenFieldElement(u,l[u]),s.appendChild(r));l=null}else r=this._createHiddenFieldElement(_,e[_]),s.appendChild(r);s.action=t,s.method="POST",a.appendChild(s),s.submit(),s.remove()},t.prototype._prefixSerializedData=function(t,e){var i={};for(var n in e)e.hasOwnProperty(n)&&(i[t+"."+n]=e[n]);return i},t.prototype._showConfirmation=function(t,e){var i=new Autotask.ConfirmationDialogOptions;i.set_description(t),i.set_confirmPointer(e),autotask.confirmationDialog.show(i)},t.prototype._verifyDefaultFormatExport=function(){var t=!0;return this._isDefaultFormatEnabled?this._isExportPrevented&&(t=!1):(t=!1,autotask.throwException("Exporting in the default format is not enabled.")),t},t.prototype._verifyImportFormatExport=function(){var t=!0;return this._isImportFormatEnabled?this._isExportPrevented&&(t=!1):(t=!1,autotask.throwException("Exporting in the import format is not enabled.")),t},t}(),window.AutotaskGridSystem.FilterSystem=function(){"use strict";function t(t,e){this._headerElement=t,this._eventCoordinator=e,this._filterDataProviders=[]}return t.prototype._filterRow=null,t.prototype._eventCoordinator=null,t.prototype._filterDataProviders=null,t.prototype._filterValidation=null,t.prototype._headerElement=null,t.prototype._isEnabled=null,t.prototype._participants=null,t.prototype._postedRowModelParameterName=null,t.prototype._previousFilterData=null,t.prototype._refreshSystem=null,t.prototype._timer=null,t.prototype.__get_isEnabled=function(){return this._isEnabled},t.prototype.__activate=function(t){this._isEnabled=!0,this._postedRowModelParameterName=t;var e=this._headerElement.getElementsByClassName("Filter");this._filterRow=e[0],this._timer=new AutotaskGridSystem.FilterTimer(autotask.proxy(this.__executeRequest,this))},t.prototype.__createSerializedData=function(){this._verify();var t=null;return this._participants.length>0&&((t={}).parameterName=this._postedRowModelParameterName,t.value=new AutotaskGridSystem.SerializedFilterData(this._filterRow)),t},t.prototype.__dispose=function(){if(this._isEnabled){for(var t=0;t<this._filterDataProviders.length;t++)this._filterDataProviders[t].__dispose();this._filterDataProviders=null}},t.prototype.__executeRequest=function(){if(this._verify(),this._timer.__resetActiveElement(),this._timer.__stop(),this._areFiltersValid()){var t=new Autotask.GridFilteringEventArgs;if(this._eventCoordinator.__filtering(t),t.__get_isConfirmationDialogEnabled()){var e=t.__get_confirmationDialogOptions(autotask.proxy(this._executeRefreshRequest,this),autotask.proxy(this._resetFilterData,this));autotask.confirmationDialog.show(e)}else this._executeRefreshRequest()}},t.prototype.__finalize=function(t){this._isEnabled&&(this._refreshSystem=t,this._participants=this._findParticipants(),this._filterValidation=new Autotask.GridFilterValidation(this._filterRow),this._filterValidation.__parse(),this._previousFilterData=this._createFilterData())},t.prototype.__isDirty=function(){this._verify();for(var t=!1,e=0;e<this._participants.length;e++)if("function"==typeof this._participants[e].get_isDirty){if(this._participants[e].get_isDirty()){t=!0;break}}else if(this._participants[e].isDirty){t=!0;break}return t},t.prototype.__startTimer=function(){this._timer.__start()},t.prototype.__stopTimer=function(){this._timer.__stop()},t.prototype._areFiltersValid=function(){for(var t=0;t<this._participants.length;t++)"function"==typeof this._participants[t].forceFormatting&&this._participants[t].forceFormatting();return this._filterValidation.__validate()},t.prototype._createFilterData=function(){for(var t={},e=0;e<this._participants.length;e++)"function"==typeof this._participants[e].get_instanceId&&(t[this._participants[e].get_instanceId()]=this._participants[e].getFilterValue());return t},t.prototype._executeRefreshRequest=function(){this._refreshSystem.__refresh(null,!0,!0,!1,autotask.proxy(this._refreshSuccess,this))},t.prototype._findParticipants=function(){for(var t=[],e=null,i=this._filterRow.querySelectorAll("td[data-systems]"),n=0;n<i.length;n++)this._isGridFilterRowSystemParticipant(i[n].dataset.systems)&&("function"==typeof(e=autotask.find(i[n].dataset.alphaId)).__get_gridFilterDataProvider&&(e=e.__get_gridFilterDataProvider()),t.push(e));return t},t.prototype._isGridFilterRowSystemParticipant=function(t){return"1"===t[3]},t.prototype._refreshSuccess=function(){this._timer.__resetFocus()},t.prototype._resetFilterData=function(){for(var t=0;t<this._participants.length;t++)"function"==typeof this._participants[t].get_instanceId?this._participants[t].resetFilterValue(this._previousFilterData[this._participants[t].get_instanceId()]):this._participants[t].resetValue()},t.prototype._verify=function(){this._isEnabled||autotask.throwException("The filter system is not enabled.")},t}(),window.AutotaskGridSystem.FilterTimer=function(){"use strict";function t(t){this._delay=2e3,this._executeRequestDelegate=t}return t.prototype._activeElementId=null,t.prototype._activeElementSelectionEnd=null,t.prototype._activeElementSelectionStart=null,t.prototype._delay=null,t.prototype._executeRequestDelegate=null,t.prototype._timeoutId=null,t.prototype.__resetActiveElement=function(){var t=document.activeElement.id;if(t.length>0){this._activeElementId=t;var e=document.getElementById(t);"selectionStart"in e&&(this._activeElementSelectionEnd=e.selectionEnd,this._activeElementSelectionStart=e.selectionStart)}},t.prototype.__resetFocus=function(){if(null!==this._activeElementId){var t=document.getElementById(this._activeElementId);null!==t&&("selectionStart"in t&&(null!==this._activeElementSelectionEnd&&(t.selectionEnd=this._activeElementSelectionEnd),null!==this._activeElementSelectionStart&&(t.selectionStart=this._activeElementSelectionStart)),t.focus())}},t.prototype.__start=function(){this.__stop(),this._timeoutId=window.setTimeout(this._executeRequestDelegate,this._delay)},t.prototype.__stop=function(){window.clearTimeout(this._timeoutId),this._timeoutId=null},t}(),window.AutotaskGridSystem.HtmlSystem=function(){"use strict";function t(t,e,i){this._header=t,this._body=e,this._footer=i}return t.prototype._body=null,t.prototype._footer=null,t.prototype._header=null,t.prototype.__get_body=function(){return this._body},t.prototype.__get_footer=function(){return this._footer},t.prototype.__get_header=function(){return this._header},t}(),window.AutotaskGridSystem.IdentificationSystem=function(){"use strict";function t(t){this._id=t}return t.prototype._id=null,t.prototype.__get_id=function(){return this._id},t}(),window.AutotaskGridSystem.LayoutSystem=function(){"use strict";function t(t,e,i,n){this._header=t,this._body=e,this._footer=i,this._bodyScrollElement=this._body.firstElementChild,this._layoutStateCoordinator=n}return t.prototype._body=null,t.prototype._bodyScrollElement=null,t.prototype._footer=null,t.prototype._header=null,t.prototype._currentScrollPosition=null,t.prototype._resizerCount=null,t.prototype._resizers=null,t.prototype._layoutStateCoordinator=null,t.prototype._bodyScroll=function(t){this._currentScrollPosition=t.currentTarget.scrollLeft,this._currentScrollPosition!==this._header.scrollLeft&&(this._header.scrollLeft=this._currentScrollPosition),autotask.contextOverlayManagement.__hideVisibleContextOverlays()},t.prototype.__loadAndClearScrollPosition=function(){var t=this._layoutStateCoordinator.__getScrollTop();null!==t&&(this._bodyScrollElement.scrollTop=t,this._layoutStateCoordinator.__storeScrollTop(null));var e=this._layoutStateCoordinator.__getScrollLeft();null!==e&&(this._bodyScrollElement.scrollLeft=e,this._layoutStateCoordinator.__storeScrollLeft(null))},t.prototype.__reset=function(){this._adjustBody(),this._adjustSpacingForScrollBar(),this._registerHandlers(),this.__resize()},t.prototype.__resize=function(){for(var t=0;t<this._resizerCount;t++)this._resizers[t].__resize()},t.prototype.__storeScrollLeft=function(){this._layoutStateCoordinator.__storeScrollLeft(this._bodyScrollElement.scrollLeft)},t.prototype.__storeScrollTop=function(){this._layoutStateCoordinator.__storeScrollTop(this._bodyScrollElement.scrollTop)},t.prototype._adjustBody=function(){var t=this._header.firstElementChild,e=t.rows,i=e.length,n=this._bodyScrollElement.querySelectorAll("tr");0===n.length?this._bodyScrollElement.querySelector(".BodyMessageBlock").style.width=t.offsetWidth.toString()+"px":this._initializeResizers(n[0],e,i);var o=this._bodyScrollElement;o.scrollHeight>o.clientHeight&&this._bodyScrollElement.classList.add("VerticalScroll")},t.prototype._adjustSpacingForScrollBar=function(){for(var t=autotask.scrolling.__get_scrollBarWidth(),e=this._header.querySelectorAll("tr td.ScrollBarSpacer"),i=0;i<e.length;i++)e[i].style.minWidth=t.toString()+"px",e[i].style.width=t.toString()+"px"},t.prototype._createColumnResizer=function(t,e,i){for(var n=t.cellIndex,o=[],a=0;a<i;a++)o.push(e[a].cells[n]);return new AutotaskGridSystem.ColumnResizer(t,o)},t.prototype._initializeResizers=function(t,e,i){this._resizers=[];for(var n=null,o=t.querySelectorAll("td.R"),a=o.length,s=0;s<a;s++)n=this._createColumnResizer(o[s],e,i),this._resizers.push(n);this._resizerCount=this._resizers.length},t.prototype._registerHandlers=function(){this._bodyScrollElement.addEventListener("scroll",autotask.proxy(this._bodyScroll,this))},t}(),window.AutotaskGridSystem.PagingSystem=function(){"use strict";function t(t,e,i){this._footer=t,null!==t&&(this._pageSize=t.querySelector(".PageSizeStatus select"),this._rowStatus=t.querySelector(".RowStatus"),this._selectedRowCount=t.querySelector(".SelectedRows span"),null!==this._pageSize&&(this._previousPageSize=this._pageSize.value)),this._eventCoordinator=e,this._reconstructionCoordinator=i,this._isEnabled=null!==this._rowStatus}return t.prototype._footer=null,t.prototype._pageSize=null,t.prototype._rowStatus=null,t.prototype._selectedRowCount=null,t.prototype._eventCoordinator=null,t.prototype._identificationSystem=null,t.prototype._isEnabled=null,t.prototype._previousPageSize=null,t.prototype._reconstructionCoordinator=null,t.prototype._refreshSystem=null,t.prototype._selectionSystem=null,t.prototype.__get_firstVisibleRowIndex=function(){return parseInt(this._rowStatus.getAttribute("data-first-visible-row-index"),10)},t.prototype.__get_pageSize=function(){var t=null;return null!==this._pageSize&&(t=parseInt(this._pageSize.value,10)),t},t.prototype._reconstructionComplete=function(t){var e=t.__get_selectionSystem(),i=t.__get_pagingSystem();if(e.__get_isEnabled()){var n=e.__getCount();i._updateSelectionCount(n)}},t.prototype._pageIndexClick=function(t){var e=parseInt(t.currentTarget.innerText,10),i=this._createChangeState();i.__get_paging().__moveToPage(e),this._pagingClick(i)},t.prototype._pagePreviousClick=function(){var t=this._createChangeState();t.__get_paging().__previousPage(),this._pagingClick(t)},t.prototype._pageNextClick=function(){var t=this._createChangeState();t.__get_paging().__nextPage(),this._pagingClick(t)},t.prototype._pageSizeChange=function(){var t=this._createChangeState();t.__get_paging().__set_firstVisibleRowIndex(1);var e=new Autotask.GridPageSizeChangingEventArgs;if(this._eventCoordinator.__pageSizeChanging(e),e.__get_isConfirmationDialogEnabled()){var i=e.__get_confirmationDialogOptions(autotask.proxy(this._executePageSizeChanging,this,t),autotask.proxy(this._resetPageSize,this));autotask.confirmationDialog.show(i)}else this._executePageSizeChanging(t)},t.prototype._selectionChanged=function(t){this._updateSelectionCount(t.__get_selectedRowKeyCount())},t.prototype.__get_isEnabled=function(){return this._isEnabled},t.prototype.__finalize=function(t,e,i){if(this._refreshSystem=t,this._selectionSystem=e,this._identificationSystem=i,null!==this._footer){for(var n=this._footer.querySelectorAll(".PageIndexStatus .PageIndex:not(.Active)"),o=0;o<n.length;o++)n[o].addEventListener("click",autotask.proxy(this._pageIndexClick,this));var a=this._footer.querySelector(".PageIndexStatus .PagePrevious:not(.Disabled)");null!==a&&a.addEventListener("click",autotask.proxy(this._pagePreviousClick,this));var s=this._footer.querySelector(".PageIndexStatus .PageNext:not(.Disabled)");null!==s&&s.addEventListener("click",autotask.proxy(this._pageNextClick,this))}null!==this._pageSize&&this._pageSize.addEventListener("change",autotask.proxy(this._pageSizeChange,this)),null!==this._selectedRowCount&&(this._selectionSystem.__addUserInterfaceUpdatingHandler(autotask.proxy(this._selectionChanged,this)),this._reconstructionCoordinator.__addReconstructionCompleteHandler(autotask.proxy(this._reconstructionComplete,this)))},t.prototype._createChangeState=function(){var t=new Autotask.GridChangeState(this._identificationSystem.__get_id()),e=this.__get_firstVisibleRowIndex(),i=this.__get_pageSize();return t.__initializePaging(e,i),t},t.prototype._executePageSizeChanging=function(t){this._executePaging(t)},t.prototype._executePaging=function(t){this._refreshSystem.__refresh(t,!1,!0,!0,null)},t.prototype._pagingClick=function(t){var e=new Autotask.GridPagingEventArgs;if(this._eventCoordinator.__paging(e),e.__get_isConfirmationDialogEnabled()){var i=e.__get_confirmationDialogOptions(autotask.proxy(this._executePaging,this,t),null);autotask.confirmationDialog.show(i)}else this._executePaging(t)},t.prototype._resetPageSize=function(){this._pageSize.value=this._previousPageSize},t.prototype._updateSelectionCount=function(t){this._selectedRowCount.innerHTML=autotask.convert.integerToString(t)},t}(),window.AutotaskGridSystem.PersistenceKeySystem=function(){"use strict";function t(){this._isEnabled=!1}return t.prototype._persistenceKeys=null,t.prototype._indexOffset=null,t.prototype._isEnabled=null,t.prototype.__activate=function(t){this._isEnabled=!0,this._persistenceKeys=t},t.prototype.__getKeyByColumnIndex=function(t){var e=null;if(this._verify()){var i=t-this._indexOffset;e=this._persistenceKeys[i]}return e},t.prototype.__finalize=function(t){this._indexOffset=t.__get_firstDataColumnIndex()},t.prototype._verify=function(){var t=!0;return this._isEnabled||(t=!1,autotask.throwException("The persistence key system is not enabled.")),t},t}(),window.AutotaskGridSystem.RefreshSystem=function(){"use strict";function t(t,e){this._isEnabled=!1,this._reconstructionCoordinator=t,this._eventCoordinator=e}return t.prototype._editSystem=null,t.prototype._eventCoordinator=null,t.prototype._filterSystem=null,t.prototype._identificationSystem=null,t.prototype._isEnabled=null,t.prototype._layoutSystem=null,t.prototype._pagingSystem=null,t.prototype._reconstructionCoordinator=null,t.prototype._requestCanceler=null,t.prototype._selectionSystem=null,t.prototype._route=null,t.prototype._refreshSuccess=function(t,e){this._requestCanceler=null,this._reconstructionCoordinator.__reconstruct(e.gridContentHtml,e.script,!0),this._eventCoordinator.__raiseStateChangedEvent(),null!=t&&t()},t.prototype._removeRowsSuccess=function(t,e){this._selectionSystem.__get_isEnabled()&&this._selectionSystem.__unselectRowKeys(e.removedRowKeys,!1,!1),this._reconstructionCoordinator.__reconstruct(e.gridContentHtml,e.script,!0),this._eventCoordinator.__raiseStateChangedEvent(),null!=t&&t()},t.prototype.__activate=function(t,e,i){this._isEnabled=!0,this._route=t,this._isColumnArrangementPreservingEditRow=i,this._editPostedRowModelParameterName=e},t.prototype.__arrangeColumns=function(t){if(this._verify()&&this._verifyGridState(t)){this._cancelRequest();var e=null,i=null;this._editSystem.__get_isActive()&&this._isColumnArrangementPreservingEditRow&&(e=this._editSystem.__generateFieldData(),i=this._editSystem.__generatePreserveEditingData(),this._editSystem.__cancelEdit()),this._layoutSystem.__storeScrollTop();var n=this._createData(t,!1);if(this._editSystem.__get_isActive()&&this._isColumnArrangementPreservingEditRow){n[this._editPostedRowModelParameterName]=e;var o="preserveEditingData.";i.isNewRow?(n[o+"IsNewRow"]=i.isNewRow,n[o+"PreviousRowKey"]=i.previousRowKey,n[o+"NextRowKey"]=i.nextRowKey):n[o+"RowKey"]=i.rowKey}var a=new Autotask.GridStateChangeEventArgs;this._eventCoordinator.__stateChanging(a),n=a.__applyValues(n);var s=autotask.proxy(this._refreshSuccess,this,null);this._requestCanceler=this._route.__stateChange(n,s)}},t.prototype.__dispose=function(){this._cancelRequest()},t.prototype.__finalize=function(t,e,i,n,o,a){this._layoutSystem=t,this._pagingSystem=e,this._filterSystem=i,this._identificationSystem=n,this._editSystem=o,this._selectionSystem=a},t.prototype.__refresh=function(t,e,i,n,o){if(this._verify()&&this._verifyGridState(t)){this._cancelRequest(),this._editSystem.__get_isEnabled()&&this._editSystem.__cancelEdit(),i||this._layoutSystem.__storeScrollTop(),n||this._layoutSystem.__storeScrollLeft();var a=this._createData(t,e),s=new Autotask.GridStateChangeEventArgs;this._eventCoordinator.__stateChanging(s),a=s.__applyValues(a);var r=autotask.proxy(this._refreshSuccess,this,o);this._requestCanceler=this._route.__stateChange(a,r)}},t.prototype.__removeRows=function(t,e,i,n){if(this._verify()){this._editSystem.__get_isEnabled()&&this._editSystem.__cancelEdit(),this._layoutSystem.__storeScrollTop(),this._layoutSystem.__storeScrollLeft();var o=this._createData(null,!1);o[t]=e;var a=new AutotaskGridSystem.RemovingRowsEventArgs;this._eventCoordinator.__removingRows(a),o=a.__applyValues(o);var s=autotask.proxy(this._removeRowsSuccess,this,n);autotask.ajax.__restrictedDeleteRequest(i,o,s).__gridRemoveRows()}},t.prototype._cancelRequest=function(){null!==this._requestCanceler&&this._requestCanceler.__cancelRequest()},t.prototype._createData=function(t,e){var i={},n=t;if(null===n&&(n=new Autotask.GridChangeState(this._identificationSystem.__get_id())),!e&&this._pagingSystem.__get_isEnabled()&&null===n.__get_paging()){var o=this._pagingSystem.__get_firstVisibleRowIndex(),a=this._pagingSystem.__get_pageSize();n.__initializePaging(o,a)}var s=null;return this._filterSystem.__get_isEnabled()&&(s=this._filterSystem.__createSerializedData()),n.__appendPostData(i,s),i},t.prototype._verify=function(){var t=!0;return this._isEnabled||(t=!1,autotask.throwException("The refresh system is not enabled.")),t},t.prototype._verifyGridState=function(t){var e=!0;return t instanceof window.Autotask.GridChangeState||null===t||(e=!1,autotask.throwException("The GridChangeState is an incorrect type.")),e},t}(),window.AutotaskGridSystem.RouteSystem=function(){"use strict";function t(){this._isEnabled=!1}return t.prototype._routes=null,t.prototype._isEnabled=null,t.prototype.__get_isEnabled=function(){return this._isEnabled},t.prototype.__activate=function(t){this._isEnabled=!0,this._routes=t},t.prototype.__getRoute=function(t){return this._routes[t]},t}(),window.AutotaskGridSystem.RowAccessoryDataSystem=function(){"use strict";function t(){this._rowAccessoryData={}}return t.prototype._rowAccessoryData=null,t.prototype.__getAccessoryDataValue=function(t,e){var i=null,n=this._rowAccessoryData[t];return void 0!==n&&(i=n.__getValue(e)),i},t.prototype.__getAccessoryDataValueCount=function(t,e){return this.__getRowKeysByAccessoryDataValue(t,e).length},t.prototype.__getRowKeysByAccessoryDataValue=function(t,e){var i=[];for(var n in this._rowAccessoryData)this._rowAccessoryData.hasOwnProperty(n)&&this._rowAccessoryData[n].__getValue(t)===e&&i.push(n);return i},t.prototype.__registerRowAccessoryData=function(t,e){this._rowAccessoryData[t]=e},t}(),window.AutotaskGridSystem.RowClickSystem=function(){"use strict";function t(t,e){this._body=t,this._eventCoordinator=e,this._registerClickListeners(t)}return t.prototype._body=null,t.prototype._eventCoordinator=null,t.prototype._rightClickHandler=null,t.prototype._rowKeySystem=null,t.prototype._rowClickListener=function(t){var e=t.currentTarget,i=this._rowKeySystem.__getRowKeyByRow(e),n={get_keyFieldValue:function(){return i}};this._eventCoordinator.__rowClick(n)},t.prototype._rowRightClickListener=function(t){var e=new AutotaskGridSystem.RowRightClickEventArgs(t.currentTarget,t.clientX,t.clientY);this._rightClickHandler(e),e.get_isHandled()&&t.preventDefault()},t.prototype.__enableRightClick=function(t){this._rightClickHandler=t,this._registerRightClickListeners(this._body)},t.prototype.__finalize=function(t){this._rowKeySystem=t},t.prototype._registerClickListeners=function(t){for(var e=t.querySelectorAll("tr[data-interactive]"),i=0;i<e.length;i++)e[i].addEventListener("click",autotask.proxy(this._rowClickListener,this))},t.prototype._registerRightClickListeners=function(t){for(var e=t.querySelectorAll("tr"),i=0;i<e.length;i++)e[i].addEventListener("contextmenu",autotask.proxy(this._rowRightClickListener,this))},t}(),window.AutotaskGridSystem.RowDropSystem=function(){"use strict";function t(t,e){this._eventCoordinator=t,this._reconstructionCoordinator=e,this._isEnabled=!1}return t.prototype._eventCoordinator=null,t.prototype._isEnabled=null,t.prototype._layoutSystem=null,t.prototype._reconstructionCoordinator=null,t.prototype._requestCanceler=null,t.prototype._rowDropSuccess=function(t){this._requestCanceler=null,t.isGridRowDropSuccessful&&(this._reconstructionCoordinator.__reconstruct(t.gridContentHtml,t.script,!0),this._eventCoordinator.__rowDropped())},t.prototype.__dispose=function(){this._cancelRequest()},t.prototype.__finalize=function(t){this._layoutSystem=t},t.prototype.__raiseRowDroppingEvent=function(t){this._eventCoordinator.__rowDropping(t)},t.prototype.__requestRowDrop=function(t,e){this._cancelRequest(),this._layoutSystem.__storeScrollTop(),this._requestCanceler=t.__rowDrop(e,autotask.proxy(this._rowDropSuccess,this))},t.prototype._cancelRequest=function(){null!==this._requestCanceler&&this._requestCanceler.__cancelRequest()},t}(),window.AutotaskGridSystem.RowImmutableDataSystem=function(){"use strict";function t(){this._rowImmutableData={}}return t.prototype._rowImmutableData=null,t.prototype.__getImmutableData=function(t){var e=null;return void 0!==this._rowImmutableData[t]&&(e=this._rowImmutableData[t]),e},t.prototype.__registerRowImmutableData=function(t,e){this._rowImmutableData[t]=e},t}(),window.AutotaskGridSystem.RowKeySystem=function(){"use strict";function t(t){this._attributeName="data-row-key",this._body=t,this._rows=t.querySelectorAll("["+this._attributeName+"]"),this._rowKeysInRowOrder=[],this._rowsOrganizedByRowKey={},this._rowIndexesOrganizedByRowKey={},this._rowKeyCount=this._rows.length;for(var e=null,i=null,n=0;n<this._rowKeyCount;n++)e=(i=this._rows[n]).getAttribute(this._attributeName),this._rowKeysInRowOrder.push(e),this._rowsOrganizedByRowKey[e]=i,this._rowIndexesOrganizedByRowKey[e]=n}return t.prototype._body=null,t.prototype._rows=null,t.prototype._attributeName=null,t.prototype._rowKeyCount=null,t.prototype._rowKeysInRowOrder=null,t.prototype._rowsOrganizedByRowKey=null,t.prototype._rowIndexesOrganizedByRowKey=null,t.prototype.__getNextRowKeyByRowKey=function(t){var e=null,i=this.__getRowIndexByRowKey(t),n=this.__getRowKeysInRowOrder();return i+1<n.length&&(e=n[i+1]),e},t.prototype.__getPreviousRowKeyByRowKey=function(t){var e=null,i=this.__getRowIndexByRowKey(t),n=this.__getRowKeysInRowOrder();return i-1>0&&(e=n[i-1]),e},t.prototype.__getRowKeyCount=function(){return this._rowKeyCount},t.prototype.__getRowIndexByRowKey=function(t){return this._rowIndexesOrganizedByRowKey[t]},t.prototype.__getMissingRowKeys=function(t,e){return t.filter((function(t){return e.indexOf(t)<0}))},t.prototype.__getRowByRowKey=function(t){var e=this._rowsOrganizedByRowKey[t];return void 0===e&&(e=null),e},t.prototype.__getRowKeyByCell=function(t){var e=null,i=t.closest("tr");return null!==i&&(e=this.__getRowKeyByRow(i)),e},t.prototype.__getRowKeyByCellContent=function(t){var e=t.closest("tr");return this.__getRowKeyByRow(e)},t.prototype.__getRowKeyByRow=function(t){var e=null;return null!==t&&(e=t.getAttribute(this._attributeName)),e},t.prototype.__getRowKeysByRowIndexes=function(t){for(var e=[],i=null,n=null,o=null,a=0;a<t.length;a++)(o=t[a])>=0&&o<this._rows.length&&(i=this._rows[o],n=this.__getRowKeyByRow(i),e.push(n));return e},t.prototype.__getRowKeysByRowIndexRange=function(t,e){for(var i=[],n=e+1,o=t;o<n;o++)i.push(this._rowKeysInRowOrder[o]);return i},t.prototype.__getRowKeysInRowOrder=function(){return this._rowKeysInRowOrder},t}(),window.AutotaskGridSystem.RowNestingSystem=function(){"use strict";function t(t){this._nestingStorage=t,this._isEnabled=!1}return t.prototype._isEnabled=null,t.prototype._nestingStorage=null,t.prototype._rowElements=null,t.prototype._rowKeySystem=null,t.prototype._rowInformation=null,t.prototype._iconClick=function(t){var e=t.currentTarget.children[0],i=e.closest("tr");e.classList.contains("Expand")?this._expandRow(e,i):this._collapseRow(e,i,!1),t.preventDefault(),t.stopPropagation()},t.prototype.__get_isEnabled=function(){return this._isEnabled},t.prototype.__get_rowInformation=function(){return this._rowInformation},t.prototype.__activate=function(t,e){var i=t.querySelectorAll("tr");this._rowElements=[];for(var n=0;n<i.length;n++)this._rowElements.push(i[n]);this._isEnabled=!0,this._rowKeySystem=e,this._initializeRowInformation(t),this._equilibrateVisualNesting(e);var o=t.querySelectorAll("tr > td.NestingCell > div > .IconContainer");for(n=0;n<o.length;n++)o[n].children.length>0&&o[n].addEventListener("click",autotask.proxy(this._iconClick,this))},t.prototype.__collapseAll=function(){autotask.overlayManagement.__showDelayNotification();var t=this;window.setTimeout((function(){for(var e=null,i=null,n=null,o=t._determineNestingPointRowIndexesByDepth(),a=o.rowIndexes,s=o.largestDepth;s>=0;s--)for(var r=0;r<a[s].length;r++)null!==(i=(e=t._rowElements[a[s][r]]).querySelector(".NestingCell"))&&(n=i.querySelector(".Toggle")),t._collapseRow(n,e,!1);autotask.overlayManagement.__hideDelayNotification()}),200)},t.prototype.__expandAll=function(){autotask.overlayManagement.__showDelayNotification();var t=this;window.setTimeout((function(){for(var e=null,i=null,n=null,o=t._determineNestingPointRowIndexesByDepth(),a=o.rowIndexes,s=o.largestDepth,r=0;r<=s;r++)for(var l=0;l<a[r].length;l++)null!==(i=(e=t._rowElements[a[r][l]]).querySelector(".NestingCell"))&&(n=i.querySelector(".Toggle")),t._expandRow(n,e);autotask.overlayManagement.__hideDelayNotification()}),200)},t.prototype._collapseRow=function(t,e,i){for(var n=this._getRowDepth(e),o=this._findNextRow(e),a=this._getRowDepth(o);a>n;)this._hideRows(o),o=this._findNextRow(o),a=this._getRowDepth(o);if(null!==t&&t.classList.contains("Collapse")&&(t.classList.remove("Collapse"),t.classList.add("Expand"),!i)){var s=null;null!==e&&(s=this._rowKeySystem.__getRowKeyByRow(e)),this._nestingStorage.__addCollapsedRowKey(s)}},t.prototype._determineNestingPointRowIndexesByDepth=function(){var t={},e=0;t[0]=[];for(var i=0;i<this._rowInformation.length;i++)this._rowInformation[i].isNestingPoint&&(void 0===t[this._rowInformation[i].depth]&&(t[this._rowInformation[i].depth]=[],this._rowInformation[i].depth>e&&(e=this._rowInformation[i].depth)),t[this._rowInformation[i].depth].push(i));return{rowIndexes:t,largestDepth:e}},t.prototype._expandRow=function(t,e){if(null!==t&&t.classList.contains("Expand")){for(var i=null,n=this._findNextRow(e),o=this._getRowDepth(n),a=null;null!==n&&n.classList.contains("Hide");)(null===i||o<=i)&&(this._showRows(n),i=null,null!==(a=n.querySelector(".Toggle"))&&a.classList.contains("Expand")&&(i=this._getRowDepth(n))),n=this._findNextRow(n),o=this._getRowDepth(n);t.classList.remove("Expand"),t.classList.add("Collapse");var s=null;null!==e&&(s=this._rowKeySystem.__getRowKeyByRow(e)),this._nestingStorage.__removeCollapsedRowKey(s)}},t.prototype._equilibrateVisualNesting=function(t){for(var e=this._nestingStorage.__get_CollapsedRowKeys(),i=null,n=null,o=null,a=0;a<e.length;a++)null===(i=t.__getRowByRowKey(e[a]))?this._nestingStorage.__removeCollapsedRowKey(e[a]):(null!==(n=i.querySelector(".NestingCell"))&&(o=n.querySelector(".Toggle")),this._collapseRow(o,i,!0))},t.prototype._findAssociatedRows=function(t){var e=null;null!==t&&(e=this._rowKeySystem.__getRowKeyByRow(t));var i=[],n=null,o=null;if(null!==e)for(var a=0;a<this._rowElements.length;a++)void 0!==typeof(n=(o=this._rowElements[a]).dataset.associatedRowKey)&&n===e&&i.push(o);return i},t.prototype._findNextRow=function(t){for(var e=t.nextElementSibling;null!==e&&void 0===e.dataset.rowKey;)e=e.nextElementSibling;return e},t.prototype._getRowDepth=function(t){var e=-1;if(null!==t){var i=t.querySelector("[data-depth]");null!==i&&(e=parseInt(i.dataset.depth,10))}return e},t.prototype._hideRows=function(t){t.classList.add("Hide");for(var e=this._findAssociatedRows(t),i=0;i<e.length;i++)e[i].classList.add("Hide")},t.prototype._initializeRowInformation=function(t){this._rowInformation=[];for(var e=t.querySelectorAll("tr > td.NestingCell > div"),i=!1,n=null,o=null,a=0;a<e.length;a++)o=e[a],n=parseInt(o.dataset.depth,10),void 0!==o.dataset.isNestingPoint?(i=!0,o.closest("tr").classList.add("NestingPoint")):i=!1,this._rowInformation.push({depth:n,isNestingPoint:i})},t.prototype._showRows=function(t){t.classList.remove("Hide");for(var e=this._findAssociatedRows(t),i=0;i<e.length;i++)e[i].classList.add("Hide")},t}(),window.AutotaskGridSystem.SelectionSystem=function(){"use strict";function t(t,e){this._isEnabled=!1,this._isSelectingPrevented=!1,this._eventCoordinator=t,this._selectionStorage=e,this._userInterfaceUpdatingHandlers=[]}return t.prototype._eventCoordinator=null,t.prototype._excludedRowKeys=null,t.prototype._isEnabled=null,t.prototype._isLimitEnabled=null,t.prototype._isSelectingPrevented=null,t.prototype._rowKeySystem=null,t.prototype._selectionStorage=null,t.prototype._userInterfaceUpdatingHandlers=null,t.prototype.__get_isEnabled=function(){return this._isEnabled&&!this._isSelectingPrevented},t.prototype.__activate=function(t,e,i){this._isEnabled=!0,this._isLimitEnabled=t,this._userInterfaceUpdatingHandlers.push(e),this._excludedRowKeys=i},t.prototype.__addUserInterfaceUpdatingHandler=function(t){this._userInterfaceUpdatingHandlers.push(t)},t.prototype.__finalize=function(t){this._rowKeySystem=t},t.prototype._findSelectedRowKeysNotInArray=function(t){var e=this.__getSelectedRowKeys();return this._rowKeySystem.__getMissingRowKeys(e,t)},t.prototype._findUnselectedRowKeysInArray=function(t){var e=this.__getSelectedRowKeys();return this._rowKeySystem.__getMissingRowKeys(t,e)},t.prototype.__getCount=function(){return this._selectionStorage.__getCount()},t.prototype.__getSelectedRowKeys=function(){return this._selectionStorage.__getRowKeys()},t.prototype.__isRowKeySelected=function(t){for(var e=!1,i=this.__getSelectedRowKeys(),n=this.__getCount(),o=0;o<n;o++)if(t===i[o]){e=!0;break}return e},t.prototype.__modifySelection=function(t,e,i,n){if(this._verify()){var o=this._determineAdditions(t),a=this._determineSubtractions(e);0===o.length&&0===a.length||this._changeRowKeySelection(o,a,i,n)}},t.prototype.__preventSelecting=function(){this._isSelectingPrevented=!0},t.prototype.__selectRowKeys=function(t,e,i){if(this._verifyRowKeyOperation(t,!0)){var n=this._determineAdditions(t);0!==n.length&&this._changeRowKeySelection(n,[],e,i)}},t.prototype.__unselectRowKeys=function(t,e,i){if(this._verifyRowKeyOperation(t,!1)){var n=this._determineSubtractions(t);0!==n.length&&this._changeRowKeySelection([],n,e,i)}},t.prototype.__unselectAll=function(t){if(this._verify()){var e=this.__getSelectedRowKeys();if(this._selectionStorage.__removeAll(),t){var i=new AutotaskGridSystem.SelectionUserInterfaceUpdatingEventArgs([],e,this.__getCount());this._onUserInterfaceUpdating(i)}}},t.prototype._changeRowKeySelection=function(t,e,i,n){var o=!1;if(n){var a=new Autotask.GridSelectionChangingEventArgs(this.__getCount(),e,t);this._onSelectionChanging(a),o=a.__get_isCancelled()}if(!o){if(0!==t.length&&this._selectionStorage.__add(t),0!==e.length&&this._selectionStorage.__remove(e),i){var s=new AutotaskGridSystem.SelectionUserInterfaceUpdatingEventArgs(t,e,this.__getCount());this._onUserInterfaceUpdating(s)}if(n){var r=new Autotask.GridSelectionChangedEventArgs(this.__getCount(),this.__getSelectedRowKeys(),e,t);this._onSelectionChanged(r)}}},t.prototype._determineAdditions=function(t){for(var e=[],i=this.__getSelectedRowKeys(),n=null,o=t.length,a=i.length,s=0;s<o;s++){n=!1;for(var r=0;r<a;r++)if(t[s]===i[r]){n=!0;break}!1===n&&(this._isRowKeyExcluded(t[s])||e.push(t[s]))}return e},t.prototype._determineSubtractions=function(t){for(var e=[],i=this.__getSelectedRowKeys(),n=t.length,o=i.length,a=0;a<n;a++)for(var s=0;s<o;s++)if(t[a]===i[s]){this._isRowKeyExcluded(t[a])||e.push(t[a]);break}return e},t.prototype._onSelectionChanging=function(t){this._eventCoordinator.__selectionChanging(t)},t.prototype._onSelectionChanged=function(t){this._eventCoordinator.__selectionChanged(t)},t.prototype._onUserInterfaceUpdating=function(t){for(var e=this._userInterfaceUpdatingHandlers.length,i=0;i<e;i++)(0,this._userInterfaceUpdatingHandlers[i])(t)},t.prototype._isRowKeyExcluded=function(t){for(var e=!1,i=this._excludedRowKeys.length;i>=0;i--)if(this._excludedRowKeys[i]===t){e=!0;break}return e},t.prototype._isStringArray=function(t){var e=!1;return null!==t&&t.constructor===Array&&(e=t.every((function(t){return"string"==typeof t}))),e},t.prototype._verify=function(){var t=!0;return this._isEnabled?this._isSelectingPrevented&&(t=!1):(t=!1,autotask.throwException("The selection system is not enabled.")),t},t.prototype._verifyRowKeyOperation=function(t,e){var i=!1;return this._verify()&&(this._isStringArray(t)?this._isLimitEnabled&&t.length>1?autotask.throwException("A maximum of one row key can be selected and unselected at a time."):this._isLimitEnabled&&e&&t.length+this._selectionStorage.__getCount()>1?autotask.throwException("A maximum of one row key can be selected."):i=!0:autotask.throwException("Row keys must be strings.")),i},t}(),window.AutotaskGridSystem.SortSystem=function(){"use strict";function t(t,e){this._eventCoordinator=e,this._registerHandlers(t)}return t.prototype._eventCoordinator=null,t.prototype._identificationSystem=null,t.prototype._persistenceKeySystem=null,t.prototype._refreshSystem=null,t.prototype._cellClick=function(t){var e=t.currentTarget,i=e.cellIndex,n=this._persistenceKeySystem.__getKeyByColumnIndex(i),o=!0,a=e.querySelector(".SortIndicator");null!==a&&a.classList.contains("SortUp")&&(o=!1);var s=new Autotask.GridChangeState(this._identificationSystem.__get_id());s.__set_replaceExistingSort(!t.ctrlKey),s.__addSort(n,o);var r=new Autotask.GridSortingEventArgs;if(this._eventCoordinator.__sorting(r),r.__get_isConfirmationDialogEnabled()){var l=r.__get_confirmationDialogOptions(autotask.proxy(this._executeSort,this,s),null);autotask.confirmationDialog.show(l)}else this._executeSort(s)},t.prototype.__finalize=function(t,e,i){this._persistenceKeySystem=t,this._refreshSystem=e,this._identificationSystem=i},t.prototype._executeSort=function(t){this._refreshSystem.__refresh(t,!1,!0,!1,null)},t.prototype._registerHandlers=function(t){for(var e=t.querySelectorAll("tr.Heading td[data-user-sort]"),i=0;i<e.length;i++)e[i].addEventListener("click",autotask.proxy(this._cellClick,this))},t}(),window.AutotaskGridSystem.TimeoutMessageSystem=function(){"use strict";function t(){}return t.prototype.__activate=function(t){t.__preventExport()},t}(),function(){"use strict";Autotask.HtmlEditorDisplayState={Design:"Design",Html:"Html"},window.Autotask.HtmlEditor=function(t,e,i,n,o,a,s,r,l,_,u,c,d,h,p,y){autotask.instanceManagement.__addRegistrationKey(this,t),this._bindingPropertyName=y,this._buttonManager=l,this._defaultContainerAttribute="data-html-editor",this._defaultContainerStyle=c,this._enabled=i,this._invalidMarkupErrorMessage=h,this._isFrameInitialized=!1,this._isTextOnlyModeActivated=!1,this._scriptErrorMessage=d,this._scriptTagRegex=/<\s*script[\s+|>]|<\/script\s+>/i,this._isInitializePlaintextModeRequired=p,this._textArea=document.getElementById(e),this._contentContainer=this._textArea.closest(".HtmlContent"),this._buttonContainer=this._contentContainer.querySelector(".ButtonContainer"),this._editorFrame=document.getElementById(n),this._htmlEditorModeContainer=document.getElementById(o),this._formatHtmlCheckBox=document.getElementById(a),this._designTabButton=document.getElementById(s),this._htmlTabButton=document.getElementById(r),this._initializeFrameWithDelay(this._editorFrame),null!==_&&(_.__initialize(this),this._imageUploader=_),u&&(this._variableInsertion=u,this._variableInsertion.__set_variableInsertionManager(new Autotask.HtmlEditorVariableInsertionManager(this))),this._keydownLockEventHandler=function(t){t.preventDefault(),t.stopPropagation()},this._initializationCompletedHandlers=[]},window.Autotask.HtmlEditor.prototype={_buttonContainer:null,_contentContainer:null,_designTabButton:null,_editableContent:null,_editorFrame:null,_formatHtmlCheckBox:null,_htmlEditorModeContainer:null,_htmlTabButton:null,_textArea:null,_bindingPropertyName:null,_buttonManager:null,_defaultContainerAttribute:null,_defaultContainerStyle:null,_editableDocument:null,_editableWindow:null,_enabled:null,_imageUploader:null,_initializationCompletedHandlers:null,_invalidMarkupErrorMessage:null,_isFrameInitialized:null,_isInitializePlaintextModeRequired:null,_isTextOnlyModeActivated:null,_scriptErrorMessage:null,_scriptTagRegex:null,_styleEvaluator:null,_variableInsertion:null,_keydownLockEventHandler:null,get_enabled:function(){return this._enabled},set_enabled:function(t){this._enabled=t},__get_buttonManager:function(){return this._buttonManager},__designTabClick:function(t){this._enableDesignState()},__htmlFormattingCheckBoxClick:function(t){if(this._isFrameInitialized&&!this._isDesignMode()&&this._isFormattingEnabled()){var e=new Autotask.TextSelection(this._textArea),i=e.get_length(),n=e.get_startIndex(),o=this._generateInjectionPlaceholder(),a=this._textArea.value;a=a.substr(0,n)+o+a.substr(n),this._updateVisibleTextAreaWithCursorPositioning(a,o,i)}},__textTabClick:function(t){this._enableHtmlState()},_editableContentBlur:function(){autotask.browserDetection.isInternetExplorer()&&this._buttonManager.__clearSelections()},_editableContentFocus:function(){this._buttonManager.__evaluateButtonStates()},_keyUp:function(){this._buttonManager.__evaluateButtonStates()},_mouseUp:function(){this._buttonManager.__evaluateButtonStates()},_textAreaBlur:function(t){this._buttonManager.__evaluateInsertButtons()},_textAreaFocus:function(t){this._buttonManager.__evaluateInsertButtons()},activateHtmlMode:function(){this._isTextOnlyModeActivated&&(this._textArea.value="",this._enableDesignState(),this._toggleHiddenHtmlEditorModeContainer(),this._isTextOnlyModeActivated=!1)},activateTextOnlyMode:function(){this._isTextOnlyModeActivated||(this._enableHtmlState(),this._isInitializePlaintextModeRequired||(this._textArea.value=""),this._isInitializePlaintextModeRequired=!1,this._toggleHiddenHtmlEditorModeContainer(),this._isTextOnlyModeActivated=!0)},addInitializationCompletedHandler:function(t){this._initializationCompletedHandlers.push(t)},createRequestData:function(){var t=null;if(this._enabled&&((t={})[this._bindingPropertyName]=this._createRequestData(),null!==this._imageUploader)){var e=this._imageUploader.__get_bindingValue();e.length>0&&(t[this._imageUploader.__get_bindingPropertyName()]=e)}return t},focus:function(){this._isDesignMode()?(autotask.browserDetection.isFirefox()&&this._editableWindow.focus(),this._editableContent.focus()):this._textArea.focus()},loadHtml:function(t){this._editableDocument.body.innerHTML=t,this._cleanEditableHtml(),this._updateTextContent()},__execute:function(t,e){return!!this._isDesignMode()&&(this._hasFocus()||this.focus(),this._editableDocument.execCommand(t,!1,e),autotask.browserDetection.isWebkit()&&this._applyDefaultStyle(),!0)},__lockKeyDownEvents:function(t){t?this._editableContent.addEventListener("keydown",this._keydownLockEventHandler):this._editableContent.removeEventListener("keydown",this._keydownLockEventHandler)},__initialize:function(){this._buttonManager.__initializeChildInstances(),this._variableInsertion&&this._variableInsertion.__initialize()},__insert:function(t){if(this._isDesignMode())if(autotask.browserDetection.isInternetExplorer()){var e=this._editableWindow.getSelection();if(e.getRangeAt&&e.rangeCount){var i;(i=e.getRangeAt(0)).deleteContents();var n=this._editableDocument.createElement("div");n.innerHTML=t;for(var o,a,s=this._editableDocument.createDocumentFragment();o=n.firstChild;)a=s.appendChild(o);i.insertNode(s),a&&((i=i.cloneRange()).setStartAfter(a),i.collapse(!0),e.removeAllRanges(),e.addRange(i))}}else this.__execute("insertHTML",t);else this.focus(),new Autotask.TextSelection(this._textArea).replaceSelection(t)},__insertImage:function(t){if(t&&t.length>0){var e=new Autotask.Url(t);this.focus(),this.__execute("insertimage",e.toString())}},__insertTemporaryImage:function(t,e){this._imageUploader.__insertImage(t,e),this._hasFocus()||this.focus(),this.__insert('<img src="'+t+'" />')},__isReadyForImageInsert:function(){return this._isDesignMode()&&this.__isReadyForInsert()},__isReadyForInsert:function(){return autotask.browserDetection.isInternetExplorer()?this._hasFocus():!this._isDesignMode()||this._editableWindow.getSelection().rangeCount>0},__showInsertImageDialog:function(){this._imageUploader&&this._imageUploader.__show()},__showVariableInsertionDialog:function(){this._variableInsertion&&this._variableInsertion.__show()},__turnOnUnselectable:function(){for(var t=this._buttonContainer.querySelectorAll("*"),e=0;e<t.length;e++)t[e].setAttribute("unselectable","on")},_applyDefaultStyle:function(){this._editableContent.hasAttribute("style")||this._editableContent.setAttribute("style",this._defaultContainerStyle)},_cleanEditableHtml:function(){for(var t,e=["input","button","iframe","meta","title","head","link","base","embed","object","applet","audio","video","source","track"],i=0;i<e.length;i++){t=this._editableContent.querySelectorAll(e[i]);for(var n=0;n<t.length;n++)t[n].remove()}var o=this._editableContent.querySelectorAll("form");for(i=0;i<o.length;i++)o[i].insertAdjacentHTML("beforebegin",o[i].innerHTML),o[i].remove();var a=this._editableContent.querySelectorAll("["+this._defaultContainerAttribute+"]");for(i=0;i<a.length;i++)a[i].insertAdjacentHTML("beforebegin",a[i].innerHTML),a[i].remove()},_containsScripts:function(t){return this._scriptTagRegex.test(t)},_createRequestData:function(){if((this._isDesignMode()||this._updateDesignerContent(!0))&&this._updateTextContent(),!this._isTextOnlyModeActivated&&this._textArea.value){var t=document.createElement("div"),e=document.createElement("div");e.setAttribute(this._defaultContainerAttribute,"1"),e.setAttribute("style",this._defaultContainerStyle),e.innerHTML=this._textArea.value,t.appendChild(e),this._textArea.value=t.innerHTML}return this._textArea.value},_enableDesignState:function(){if(this._isFrameInitialized&&!this._isDesignMode()&&this._updateDesignerContent(!0)){this._toggleActiveModeButton(this._designTabButton),this._contentContainer.classList.add("DesignMode"),this._contentContainer.classList.remove("TextMode");for(var t=this._editorFrame.contentDocument.documentElement.childNodes,e=0;e<t.length;e++)3==t[e].nodeType&&(t[e].textContent="");this.focus(),this._buttonManager.__set_enabled(!0),this._buttonManager.__evaluateInsertButtons()}},_enableHtmlState:function(){this._isFrameInitialized&&this._isDesignMode()&&(this._showTextContentWithCursorPosition(this._htmlTabButton)||this.focus(),this._buttonManager.__set_enabled(!1),this._buttonManager.__evaluateInsertButtons())},_formatHtml:function(t){return this._isFormattingEnabled()?window.__html_beautify(t):t},_generateInjectionPlaceholder:function(){return"injected_"+Math.random().toString().slice(2)},_hasFocus:function(){var t=!1;try{t=this._isDesignMode()?this._editorFrame==window.document.activeElement:this._textArea==window.document.activeElement}catch(t){}return t},_highlightScript:function(){if(!this._isDesignMode()){var t=this._textArea.value,e=t.search(this._scriptTagRegex);if(e>=0){var i=e,n=t.substring(e).search(/script/gi);n>=0&&(i+=n+6),this._textArea.focus(),new Autotask.TextSelection(this._textArea)._setSelection(e,i)}}},_isDesignMode:function(){return this._contentContainer.classList.contains("DesignMode")},_isFormattingEnabled:function(){return this._formatHtmlCheckBox.checked},_initializeFrame:function(t){this._editableWindow=t.contentWindow,this._editableDocument=this._editableWindow.document,this._editableContent=this._editableDocument.body,this._applyDefaultStyle(),this._isFrameInitialized=!0,this._updateDesignerContent(!0)||this._showTextContent(),this._buttonManager.__initialize(this._editableDocument,this._editableWindow),this._registerHandlers(),this._buttonManager.__evaluateInsertButtons(),autotask.browserDetection.isInternetExplorer()&&this.__turnOnUnselectable(),this._isInitializePlaintextModeRequired&&this.activateTextOnlyMode(),this._raiseInitializationCompletedEvent()},_initializeFrameWithDelay:function(t){var e,i=this;e=window.setInterval((function(){t.contentWindow&&t.contentWindow.document&&t.contentWindow.document.body&&"true"==t.contentWindow.document.body.getAttribute("contenteditable")&&(window.clearInterval(e),i._initializeFrame(t))}),100)},_raiseInitializationCompletedEvent:function(){for(var t=0;t<this._initializationCompletedHandlers.length;t++)this._initializationCompletedHandlers[t]()},_registerHandlers:function(){this._editableContent.addEventListener("mouseup",autotask.proxy(this._mouseUp,this));var t=autotask.proxy(this._editableContentBlur,this);autotask.browserDetection.isInternetExplorer()?this._editorFrame.addEventListener("blur",t):this._editableWindow.addEventListener("blur",t);var e=autotask.proxy(this._editableContentFocus,this);if(autotask.browserDetection.isInternetExplorer()?this._editorFrame.addEventListener("focus",e):this._editableWindow.addEventListener("focus",e),autotask.browserDetection.isInternetExplorer()){var i=this;this._editableDocument.addEventListener("click",(function(){null!==i._editableDocument.activeElement&&"html"===i._editableDocument.activeElement.nodeName.toLowerCase()&&i.focus()}))}autotask.browserDetection.isFirefox()?this._editableWindow.addEventListener("keyup",autotask.proxy(this._keyUp,this)):this._editableContent.addEventListener("keyup",autotask.proxy(this._keyUp,this)),this._textArea.addEventListener("focus",autotask.proxy(this._textAreaFocus,this)),this._textArea.addEventListener("blur",autotask.proxy(this._textAreaBlur,this))},_showError:function(t,e){var i=new Autotask.AlertDialogOptions;i.set_operation(Autotask.AlertDialogOptions.Operation.Information),i.set_description(t),i.set_okayPointer(e),autotask.alertDialog.show(i)},_showTextContent:function(t){this._toggleActiveModeButton(t),this._contentContainer.classList.remove("DesignMode"),this._contentContainer.classList.add("TextMode")},_showTextContentWithCursorPosition:function(t){var e=null;if(!this._isTextOnlyModeActivated&&!this._isInitializePlaintextModeRequired){var i=new Autotask.HtmlEditorSelection(this._editableWindow,this._editableDocument);i.get_isValid()&&(e=this._generateInjectionPlaceholder(),i.__injectAtStart(e))}if(this._showTextContent(t),null!=e){var n=this._editableContent.innerHTML;this._updateVisibleTextAreaWithCursorPositioning(n,e)}else this._updateTextContent();return!0},_toggleActiveModeButton:function(t){for(var e=this._contentContainer.querySelectorAll(".HtmlEditorModeButton"),i=0;i<e.length;i++)null===t?e[i].classList.toggle("Active"):t===e[i]?e[i].classList.add("Active"):e[i].classList.remove("Active")},_toggleHiddenHtmlEditorModeContainer:function(){this._htmlEditorModeContainer.classList.toggle("TextOnlyMode")},_updateDesignerContent:function(t){var e=!0;if(!this._isTextOnlyModeActivated&&!this._isInitializePlaintextModeRequired){e=!1;try{var i=this._textArea.value;if(this._containsScripts(i)){var n=!0===t?autotask.proxy(this._highlightScript,this):null;this._showError(this._scriptErrorMessage,n)}else this._editableContent.innerHTML=i,e=!0}catch(t){this._showError(this._invalidMarkupErrorMessage,null)}e?this._cleanEditableHtml():this._editableContent.innerHTML=""}return e},_updateTextContent:function(){if(!this._isTextOnlyModeActivated&&!this._isInitializePlaintextModeRequired){var t=this._formatHtml(this._editableContent.innerHTML);this._textArea.value=t}},_updateVisibleTextAreaWithCursorPositioning:function(t,e,i){var n=!1,o=(t=this._formatHtml(t)).indexOf(e);if(o>=0){var a=t.substring(0,o+e.length);this._textArea.value=a;var s=this._textArea.scrollHeight;this._textArea.value=t,this._textArea.focus();var r=new Autotask.TextSelection(this._textArea);r._setSelection(o,o+e.length),r.replaceSelection(""),i&&r._setSelection(o,o+i);var l=AutotaskDomSystem.Other.getComputedStyle(this._textArea).height;this._textArea.scrollTop=s-l/2,n=!0}return n}}}(),function(){"use strict";window.Autotask.HtmlEditorButtonManager=function(t,e,i,n,o,a,s,r,l,_,u,c,d,h,p,y,g,m,f,v,C,w,S,k,b,E){this._fontColorBar=document.getElementById(o),this._lastFontColor="#000",this._fontHighlightColorBar=document.getElementById(s),this._lastFontHighlightColor="#fff",this._fontSizeCalculator=e,this._insertImageDisabledMessage=d,this._insertImageEnabledMessage=h,this._variableEnabledMessage=E,this._variableDisabledMessage=b,this._boldButtonId=i,this._centerJustifyButtonId=n,this._fontColorButtonId=a,this._fontHighlightColorButtonId=r,this._fontNameDropDownButtonId=l,this._fontSizeDropDownButtonId=_,this._htmlEditorId=t,this._indentButtonId=u,this._insertImageButtonId=c,this._italicsButtonId=p,this._leftJustifyButtonId=y,this._orderedListButtonId=g,this._outdentButtonId=m,this._redoButtonId=f,this._rightJustifyButtonId=v,this._underlineButtonId=C,this._undoButtonId=w,this._unorderedListButtonId=S,this._variableInsertionButtonId=k},window.Autotask.HtmlEditorButtonManager.prototype={_fontColorBar:null,_fontHighlightColorBar:null,_boldButton:null,_boldButtonId:null,_centerJustifyButton:null,_centerJustifyButtonId:null,_enabled:null,_fontColorButton:null,_fontColorButtonId:null,_fontHighlightColorButton:null,_fontHighlightColorButtonId:null,_fontNameDropDownButton:null,_fontNameDropDownButtonId:null,_fontSizeCalculator:null,_fontSizeDropDownButton:null,_fontSizeDropDownButtonId:null,_htmlEditor:null,_htmlEditorId:null,_indentButton:null,_indentButtonId:null,_insertImageButton:null,_insertImageButtonId:null,_insertImageDisabledMessage:null,_insertImageEnabledMessage:null,_italicsButton:null,_italicsButtonId:null,_lastFontColor:null,_lastFontHighlightColor:null,_leftJustifyButton:null,_leftJustifyButtonId:null,_orderedListButton:null,_orderedListButtonId:null,_outdentButton:null,_outdentButtonId:null,_redoButton:null,_redoButtonId:null,_rightJustifyButton:null,_rightJustifyButtonId:null,_styleEvaluator:null,_underlineButton:null,_underlineButtonId:null,_undoButton:null,_undoButtonId:null,_unorderedListButton:null,_unorderedListButtonId:null,_variableInsertionButton:null,_variableInsertionButtonId:null,_variableDisabledMessage:null,_variableEnabledMessage:null,__get_enabled:function(){return this._enabled},__set_enabled:function(t){this._enabled=t,this._propagateEnabledState(t)},__get_fontName:function(){return this._fontDropDownButton.get_text()},__get_fontColor:function(){return this._lastFontColor},__get_fontHighlightColor:function(){return this._lastFontHighlightColor},__boldClick:function(){this._execute("bold")&&(this._boldButton.set_selected(this._styleEvaluator.__isBold()),this._htmlEditor.focus())},__centerJustifyClick:function(){this._execute("justifycenter")&&(this._selectCenterJustify(this._styleEvaluator.__isCenterJustified()),this._htmlEditor.focus())},__indentClick:function(){this._execute("indent")&&this._htmlEditor.focus()},__insertImageClick:function(){this._htmlEditor.__showInsertImageDialog()},__italicsClick:function(){this._execute("italic")&&(this._italicsButton.set_selected(this._styleEvaluator.__isItalic()),this._htmlEditor.focus())},__leftJustifyClick:function(){this._execute("justifyleft")&&(this._selectLeftJustify(this._styleEvaluator.__isLeftJustified()),this._htmlEditor.focus())},__orderedListClick:function(){this._execute("insertorderedlist")&&(this._styleEvaluator.__isOrderedList()&&(this._orderedListButton.set_selected(!0),this._unorderedListButton.set_selected(!1)),this._htmlEditor.focus())},__applyOutdent:function(){this._execute("outdent")&&this._htmlEditor.focus()},__rightJustifyClick:function(){this._execute("justifyright")&&(this._selectRightJustify(this._styleEvaluator.__isRightJustified()),this._htmlEditor.focus())},__underlineClick:function(){this._execute("underline")&&(this._underlineButton.set_selected(this._styleEvaluator.__isUnderlined()),this._htmlEditor.focus())},__unorderedListClick:function(){this._execute("insertunorderedlist")&&(this._styleEvaluator.__isUnorderedList()&&(this._unorderedListButton.set_selected(!0),this._orderedListButton.set_selected(!1)),this._htmlEditor.focus())},__variableInsertionClick:function(){document.activeElement&&document.activeElement.blur(),this._htmlEditor.__showVariableInsertionDialog()},__redoClick:function(){this._execute("redo")},__undoClick:function(){this._execute("undo")},__applyFontColor:function(t){this._execute("forecolor",t)&&(this._selectFontColor(t),this._htmlEditor.focus())},__applyLastFontColor:function(){this.__applyFontColor(this.__get_fontColor())},__applyFontHighlightColor:function(t){this._execute(autotask.browserDetection.isFirefox()?"hiliteColor":"backcolor",t)&&(this._selectFontHighlightColor(t),this._htmlEditor.focus())},__applyLastFontHighlightColor:function(){this.__applyFontHighlightColor(this.__get_fontHighlightColor())},__applyFontName:function(t,e){var i=e;null!==t&&(i=autotask.find(t).get_text()),this._execute("fontname",i)&&(this._selectFontName(i),this._htmlEditor.focus())},__applyFontSize:function(t,e){var i=e;null!==t&&(i=autotask.find(t).get_text());var n=this._fontSizeCalculator.__findSizeIndexByName(i);null!==n&&this._execute("fontsize",n)&&(this._selectFontSize(i),this._htmlEditor.focus())},__clearSelections:function(){this._boldButton.set_selected(!1),this._centerJustifyButton.set_selected(!1),this._italicsButton.set_selected(!1),this._leftJustifyButton.set_selected(!1),this._orderedListButton.set_selected(!1),this._rightJustifyButton.set_selected(!1),this._underlineButton.set_selected(!1),this._unorderedListButton.set_selected(!1),this.__evaluateInsertButtons()},__evaluateButtonStates:function(){this._styleEvaluator.__loadSelection(),this._boldButton.set_selected(this._styleEvaluator.__isBold()),this._italicsButton.set_selected(this._styleEvaluator.__isItalic()),this._underlineButton.set_selected(this._styleEvaluator.__isUnderlined()),this._selectLeftJustify(this._styleEvaluator.__isLeftJustified()),this._selectCenterJustify(this._styleEvaluator.__isCenterJustified()),this._selectRightJustify(this._styleEvaluator.__isRightJustified()),this._orderedListButton.set_selected(this._styleEvaluator.__isOrderedList()),this._unorderedListButton.set_selected(this._styleEvaluator.__isUnorderedList());var t=this._styleEvaluator.__parseFontFamily();if(this._selectFontName(t),t){var e=this._styleEvaluator.__parseFontSize(),i=this._fontSizeCalculator.__findSize(e,t);i?this._selectFontSize(i.get_name()):this._selectFontSize("")}this._styleEvaluator.__unloadSelection(),this.__evaluateInsertButtons()},__evaluateInsertButtons:function(){this._insertImageButton&&(this._htmlEditor.__isReadyForImageInsert()?this._insertImageButton.get_enabled()||(this._insertImageButton.set_enabled(!0),this._insertImageButton.set_title(this._insertImageEnabledMessage)):this._insertImageButton.get_enabled()&&(this._insertImageButton.set_enabled(!1),this._insertImageButton.set_title(this._insertImageDisabledMessage))),this._variableInsertionButton&&(this._htmlEditor.__isReadyForInsert()?this._variableInsertionButton.get_enabled()||(this._variableInsertionButton.set_enabled(!0),this._variableInsertionButton.set_title(this._variableEnabledMessage)):this._variableInsertionButton.get_enabled()&&(this._variableInsertionButton.set_enabled(!1),this._variableInsertionButton.set_title(this._variableDisabledMessage)))},__initialize:function(t,e){this._styleEvaluator=new Autotask.HtmlEditorStyleEvaluator(t,e)},__initializeChildInstances:function(){this._boldButton=autotask.find(this._boldButtonId),this._centerJustifyButton=autotask.find(this._centerJustifyButtonId),this._fontColorButton=autotask.find(this._fontColorButtonId),this._fontHighlightColorButton=autotask.find(this._fontHighlightColorButtonId),this._fontNameDropDownButton=autotask.find(this._fontNameDropDownButtonId),this._fontSizeDropDownButton=autotask.find(this._fontSizeDropDownButtonId),this._htmlEditor=autotask.find(this._htmlEditorId),this._indentButton=autotask.find(this._indentButtonId),this._insertImageButton=autotask.find(this._insertImageButtonId),this._italicsButton=autotask.find(this._italicsButtonId),this._leftJustifyButton=autotask.find(this._leftJustifyButtonId),this._orderedListButton=autotask.find(this._orderedListButtonId),this._outdentButton=autotask.find(this._outdentButtonId),this._redoButton=autotask.find(this._redoButtonId),this._rightJustifyButton=autotask.find(this._rightJustifyButtonId),this._underlineButton=autotask.find(this._underlineButtonId),this._undoButton=autotask.find(this._undoButtonId),this._unorderedListButton=autotask.find(this._unorderedListButtonId),this._variableInsertionButton=autotask.find(this._variableInsertionButtonId)},_execute:function(t,e){var i=this._htmlEditor.__execute(t,e);return autotask.browserDetection.isInternetExplorer()||this._htmlEditor.focus(),i},_propagateEnabledState:function(t){this._boldButton.set_enabled(t),this._centerJustifyButton.set_enabled(t),this._fontColorButton.set_enabled(t),this._fontHighlightColorButton.set_enabled(t),this._fontNameDropDownButton.set_enabled(t),this._fontSizeDropDownButton.set_enabled(t),this._indentButton.set_enabled(t),this._italicsButton.set_enabled(t),this._leftJustifyButton.set_enabled(t),this._orderedListButton.set_enabled(t),this._outdentButton.set_enabled(t),this._rightJustifyButton.set_enabled(t),this._underlineButton.set_enabled(t),this._unorderedListButton.set_enabled(t),this._insertImageButton&&this._insertImageButton.set_enabled(t),this._variableInsertionButton&&this._variableInsertionButton.set_enabled(t),this._redoButton&&this._redoButton.set_enabled(t),this._undoButton&&this._undoButton.set_enabled(t)},_selectCenterJustify:function(t){this._centerJustifyButton.set_selected(t),t&&(this._rightJustifyButton.set_selected(!1),this._leftJustifyButton.set_selected(!1))},_selectFontColor:function(t){this._lastFontColor=t,this._fontColorBar.style.backgroundColor=t,this._fontColorButton.__hideContextOverlay()},_selectFontHighlightColor:function(t){this._lastFontHighlightColor=t,this._fontHighlightColorBar.style.backgroundColor=t,this._fontHighlightColorButton.__hideContextOverlay()},_selectFontName:function(t){this._fontNameDropDownButton.set_text(t),this._fontNameDropDownButton.__set_title(t),this._fontNameDropDownButton.__hideContextOverlay()},_selectFontSize:function(t){this._fontSizeDropDownButton.set_text(t),this._fontSizeDropDownButton.__hideContextOverlay()},_selectLeftJustify:function(t){this._leftJustifyButton.set_selected(t),t&&(this._rightJustifyButton.set_selected(!1),this._centerJustifyButton.set_selected(!1))},_selectRightJustify:function(t){this._rightJustifyButton.set_selected(t),t&&(this._leftJustifyButton.set_selected(!1),this._centerJustifyButton.set_selected(!1))}}}(),function(){"use strict";var t=function(t,e){this._name=e,this._size=t};t.prototype={_name:null,_size:null,get_name:function(){return this._name},get_size:function(){return this._size}},window.Autotask.HtmlEditorFontSizeCalculator=function(t,e,i){this._id=t+"_FontSizeCalculator",this._fontNames=e,this._fontSizes=i,this._fontMatrix=this._createFontMatrix(e,i)},window.Autotask.HtmlEditorFontSizeCalculator.prototype={_id:null,_fontMatrix:null,_fontNames:null,_fontSizes:null,__findSizeIndexByName:function(t){var e=this._fontSizes.indexOf(t);return e>=0?e+1:null},__isValidFontName:function(t){return this._fontNames.indexOf(t)>=0},__isValidGenericFontSize:function(t){var e=!1;return"number"==typeof t&&(e=t>=1&&t<=7&&t%1==0),e},__findSize:function(t,e){var i,n=null!==t?t.toString():"",o=null,a=this._fontMatrix[e];if(a&&n.length)for(var s=0;s<a.length;s++)if((i=a[s]).matchCriteria.indexOf(n)>=0){o=i.value;break}return o},_addFontSizeSettings:function(e,i,n,o,a){var s=[];document.defaultView?(s.push(document.defaultView.getComputedStyle(e.childNodes[0],null).getPropertyValue("font-size")),s.push(document.defaultView.getComputedStyle(e.childNodes[1],null).getPropertyValue("font-size"))):(s.push(e.childNodes[0].currentStyle.fontSize),s.push(e.childNodes[1].currentStyle.fontSize));var r=i+1;s.push(o[i].toString()),s.push(r.toString());var l={matchCriteria:s,value:new t(r,o[i])};n[a].push(l)},_createFontMatrix:function(t,e){var i=window.document,n={},o=this._generateFontMarkupAndPopulateMatrix(n,t,e);i.body.insertAdjacentHTML("beforeend",o);var a,s=i.getElementById(this._id);for(var r in n)if(n.hasOwnProperty(r)){a=s.querySelectorAll('[face="'+r+'"]');for(var l=0;l<a.length;l++)this._addFontSizeSettings(a[l],l,n,e,r)}return s.remove(),n},_generateFontMarkupAndPopulateMatrix:function(t,e,i){for(var n="<span id="+this._id+">",o=0;o<e.length;o++){var a=e[o];t[a]=[];for(var s=0;s<=i.length-1;s++)n+='<font size="'+(s+1)+'" face="'+a+'">',n+="<span>&nbsp;</span>",n+='<span style="font-family:'+a+"; font-size:"+i[s]+';">&nbsp;</span></font>'}return n+="</span>"}}}(),function(){"use strict";window.Autotask.HtmlEditorImageUploader=function(t,e,i,n){this._initializeImageUpload(t,e,i),this._temporaryImageList=new Autotask.HiddenFieldList(n),this._temporaryImageHiddenFieldElement=document.getElementById(n)},window.Autotask.HtmlEditorImageUploader.prototype={_htmlEditor:null,_imageUploadUrl:null,_internetExplorerPopupSettings:null,_temporaryImageHiddenFieldElement:null,__get_bindingPropertyName:function(){return this._temporaryImageHiddenFieldElement.name},__get_bindingValue:function(){return this._temporaryImageHiddenFieldElement.value},__initialize:function(t){this._htmlEditor=t},__insertImage:function(t,e){var i={Key:e,Value:t};this._temporaryImageList.add(i,(function(t,e){return t.Key==e.Key}))},__show:function(){autotask.browserDetection.isInternetExplorer()?window.open(this._imageUploadUrl.toString(),null,this._internetExplorerPopupSettings,!0):autotask.ajax.postRequest(this._imageUploadUrl.toString(),null,null).dialog()},_initializeImageUpload:function(t,e,i){if(this._imageUploadUrl=new Autotask.Url(e),autotask.browserDetection.isInternetExplorer()){var n=t+"__imageUpload",o=this;window[n]=function(t,e){return!!o._htmlEditor.__isReadyForImageInsert()&&(o._htmlEditor.__insertTemporaryImage(t,e),!0)},this._imageUploadUrl.add("clientSaveMethod",n),this._internetExplorerPopupSettings=i}}}}(),function(){"use strict";window.Autotask.HtmlEditorSelection=function(t,e){var i=void 0!==e.getSelection;if(this._document=e,i?autotask.browserDetection.isFirefox()?this._loadMozillaSelection(t):this._loadStandardSelection(t):autotask.browserDetection.isInternetExplorer()?this._loadNonstandardSelection(e):autotask.throwException("Cannot use a non-standard browser with Html Editor selections."),this._isValid=null!==this._range,this._isValid){var n=!1;n=i?this._range.startOffset!=this._range.endOffset:this._range.text.length>0,this._isMultiple=null!==this._startNode&&null!==this._endNode&&(this._startNode!=this._endNode[0]||n)}},window.Autotask.HtmlEditorSelection.prototype={_startNode:null,_endNode:null,_document:null,_range:null,_isValid:null,get_range:function(){return this._range},get_startNode:function(){return this._startNode},get_endNode:function(){return this._endNode},get_isMultiple:function(){return this._isMultiple},get_isValid:function(){return this._isValid},__injectAtStart:function(t){if(this._range)if(this._range.insertNode){this._range.collapse(!0);var e=this._document.createTextNode(t);this._range.insertNode(e)}else try{this._range.collapse(!0),this._range.pasteHTML(t)}catch(t){}},_getRangeParent:function(t,e){var i="delete_"+Math.random().toString().slice(2),n='<span id="'+i+'"></span>';t.collapse(!0),t.pasteHTML(n);var o=e.getElementById(i),a=o.parentNode;return a.removeChild(o),a},_loadNonstandardSelection:function(t){var e=!0,i=t.selection.createRange();try{if(this._range=i.duplicate(),i.text.length>0){var n=i.duplicate();n.moveStart("character",n.text.length),this._endNode=this._getRangeParent(n,t)}i.moveEnd("character",-1*i.text.length),this._startNode=this._getRangeParent(i,t)}catch(t){e=!1}return e},_loadMozillaSelection:function(t){var e=!0;try{var i=t.getSelection().getRangeAt(0),n=i.startContainer;i.startOffset==i.startContainer.length&&(n=i.endContainer),3==n.nodeType&&(n=n.parentNode);var o=i.endContainer;if(0===i.endOffset){var a=o;3==o.nodeType&&(a=a.parentNode).contains(n)&&(o=n)}3==o.nodeType&&(o=o.parentNode),this._range=i,this._startNode=n,this._endNode=o}catch(t){e=!1}return e},_loadStandardSelection:function(t){var e=!0;try{var i=t.getSelection().getRangeAt(0),n=i.startContainer;3==n.nodeType&&(n=n.parentNode);var o=i.endContainer;3==o.nodeType&&(o=o.parentNode),this._range=i,this._startNode=n,this._endNode=o}catch(t){e=!1}return e}}}(),function(){"use strict";window.Autotask.HtmlEditorStyleEvaluator=function(t,e){this._document=t,this._window=e,this._isStandard=void 0!==t.getSelection,this._isTemporarySelectionLoaded=!1,this._styleMap={"font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","text-decoration":"textDecoration","text-align":"textAlign"}},window.Autotask.HtmlEditorStyleEvaluator.prototype={_isLoaded:!1,_isTemporarySelectionLoaded:null,_selection:null,_isStandard:null,_styleMap:null,__loadSelection:function(){this._selection=new Autotask.HtmlEditorSelection(this._window,this._document),this._isLoaded=!0},__unloadSelection:function(){this._selection=null,this._isLoaded=!1},__isBold:function(){this._loadTemporarySelection();var t=this._evaluateBold(this._getStartStyleValue("font-weight"));return t&&this._selection.get_isMultiple()&&(t=this._evaluateBold(this._getEndStyleValue("font-weight"))),this._unloadTemporarySelection(),t},__isItalic:function(){this._loadTemporarySelection();var t="italic"==this._getStartStyleValue("font-style");return t&&this._selection.get_isMultiple()&&(t="italic"==this._getEndStyleValue("font-style")),this._unloadTemporarySelection(),t},__isUnderlined:function(){this._loadTemporarySelection();var t=this._evaluateUnderline(this._selection.get_startNode(),this._getStartStyleValue("text-decoration"));return t&&this._selection.get_isMultiple()&&(t=this._evaluateUnderline(this._selection.get_endNode(),this._getEndStyleValue("text-decoration"))),this._unloadTemporarySelection(),t},__isLeftJustified:function(){this._loadTemporarySelection();var t="left"==this._getStartStyleValue("text-align");return t&&this._selection.get_isMultiple()&&(t="left"==this._getEndStyleValue("text-align")),this._unloadTemporarySelection(),t},__isRightJustified:function(){this._loadTemporarySelection();var t="right"==this._getStartStyleValue("text-align");return t&&this._selection.get_isMultiple()&&(t="right"==this._getEndStyleValue("text-align")),this._unloadTemporarySelection(),t},__isCenterJustified:function(){this._loadTemporarySelection();var t="center"==this._getStartStyleValue("text-align");return t&&this._selection.get_isMultiple()&&(t="center"==this._getEndStyleValue("text-align")),this._unloadTemporarySelection(),t},__isOrderedList:function(){var t=!1;this._loadTemporarySelection();var e=this._selection.get_startNode();return e&&(t=null!==e.closest("ol"))&&this._selection.get_isMultiple()&&(t=null!==this._selection.get_endNode().closest("ol")),this._unloadTemporarySelection(),t},__isUnorderedList:function(){var t=!1;this._loadTemporarySelection();var e=this._selection.get_startNode();return e&&(t=null!==e.closest("ul"))&&this._selection.get_isMultiple()&&(t=null!==this._selection.get_endNode().closest("ul")),this._unloadTemporarySelection(),t},__parseFontFamily:function(){this._loadTemporarySelection();var t=this._getStartStyleValue("font-family");return t&&(t=t.replace(/'/g,""))&&this._selection.get_isMultiple()&&t!=this._getEndStyleValue("font-family").replace(/'/g,"")&&(t=""),this._unloadTemporarySelection(),t},__parseFontSize:function(){this._loadTemporarySelection();var t=this._getStartStyleValue("font-size");return t&&this._selection.get_isMultiple()&&t!=this._getEndStyleValue("font-size")&&(t=""),this._unloadTemporarySelection(),t},_evaluateBold:function(t){return autotask.browserDetection.isWebkit()?"normal"!=t:t>400},_evaluateUnderline:function(t,e){for(var i=e&&e.indexOf("underline")>-1;!1===i&&null!==t&&null!==t.parentElement&&9!=t.nodeType&&"body"!=t.nodeName.toLowerCase();)t=t.parentElement,i=(e=this._getStyleValue(this._getStyleObject(t),"text-decoration"))&&e.indexOf("underline")>-1;return i},_getStartStyleValue:function(t){var e=this._getStyleObject(this._selection.get_startNode());return this._getStyleValue(e,t)},_getEndStyleValue:function(t){var e=this._getStyleObject(this._selection.get_endNode());return this._getStyleValue(e,t)},_getStyleValue:function(t,e){return null===t?null:this._isStandard?t.getPropertyValue(e):t[this._styleMap[e]]},_getStyleObject:function(t){var e=null;return null!==t&&(e=this._isStandard?autotask.browserDetection.isInternetExplorer()&&void 0!==t.body&&null!==t.body?this._document.defaultView.getComputedStyle(t.body,null):this._document.defaultView.getComputedStyle(t,null):t.currentStyle),e},_loadTemporarySelection:function(){this._isLoaded||(this._isTemporarySelectionLoaded=!0,this.__loadSelection())},_unloadTemporarySelection:function(){this._isTemporarySelectionLoaded&&(this.__unloadSelection(),this._isTemporarySelectionLoaded=!1)}}}(),Autotask.FileUploadCoordinator=function(){"use strict";var t=0,e=1,i=2,n=3;function o(t,e,i,n,o,a,s){this._fileInputId=t,this._uploadType=e,this._uploadUrl=new Autotask.Url(i),this._progressUrl=new Autotask.Url(n),this._cancelUrl=new Autotask.Url(o),this._unexpectedErrorMessage=a,this._progressBarText=s,this._closeWithoutCancelling=!1,this._isUploading=!1,this._pollingInterval=700}return o.prototype._dynamicForm=null,o.prototype._dynamicFrame=null,o.prototype._cancelUrl=null,o.prototype._cancelHandler=null,o.prototype._closeWithoutCancelling=null,o.prototype._failureHandler=null,o.prototype._fileInputId=null,o.prototype._isUploading=null,o.prototype._pollingInterval=null,o.prototype._progressBarText=null,o.prototype._progressUrl=null,o.prototype._successHandler=null,o.prototype._unexpectedErrorMessage=null,o.prototype._uploadType=null,o.prototype._uploadUrl=null,o.prototype._progressIndicatorClosed=function(t){!0!==this._closeWithoutCancelling&&this._cancel(t),this._closeWithoutCancelling=!1},o.prototype._queryProgress=function(t){var e=this,i={f:t};autotask.ajax.__restrictedGetRequest(this._progressUrl.toString(i),null,(function(i){e._updateProgress(i,t)})).__fileUploadStatus()},o.prototype._updateProgress=function(o,a){if(this._isUploading&&void 0!==o){var s=o.value;s.Status===i?(autotask.progressBarDialog.setProgress(100),this._uploadSuccess(a)):s.Status!==t&&autotask.progressBarDialog.setProgress(s.Progress),s.Status===t||s.Status===e?this._queryProgressWithDelay(a):s.Status===n&&this._showError(s.StatusMessage)}},o.prototype.__setHandlers=function(t,e,i){this._successHandler=t,this._cancelHandler=e,this._failureHandler=i},o.prototype.__upload=function(t){this._isUploading&&autotask.throwException("FileUploadCoordinator is currently uploading."),this._isUploading=!0,this._initializeUploadElements(t);var e=this;autotask.progressBarDialog.show(this._progressBarText,(function(){e._progressIndicatorClosed(t)})),this._dynamicForm.submit(),this._queryProgressWithDelay(t)},o.prototype._cancel=function(t){if(this._isUploading){stop(),this._isUploading=!1;var e={f:t};autotask.ajax.__restrictedGetRequest(this._cancelUrl.toString(e),null,null).__fileUploadStatus()}this._disposeDynamicUploadElements(),null!==this._cancelHandler&&this._cancelHandler()},o.prototype._closeProgressIndicator=function(){this._closeWithoutCancelling=!0,autotask.progressBarDialog.hide()},o.prototype._createDynamicForm=function(t){var e={f:t,t:this._uploadType},i=this._uploadUrl.toString(e),n=this._dynamicFrame.getAttribute("name"),o=document.createElement("form");o.action=i,o.method="POST",o.target=n,o.enctype="multipart/form-data";var a=document.getElementById(this._fileInputId);a.before(o),o.appendChild(a),this._dynamicForm=o},o.prototype._createDynamicFrame=function(){var t="autotaskUploaderFrame"+(new Date).getTime(),e=document.createElement("iframe");e.id=t,e.name=t,e.style.display="none",document.body.appendChild(e);var i=this;e.onload=function(){i._detectPostError(e)},this._dynamicFrame=e},o.prototype._disposeDynamicUploadElements=function(){if(null!==this._dynamicForm){var t=this._dynamicForm,e=document.getElementById(this._fileInputId);t.before(e),t.remove(),this._dynamicForm=null}null!==this._dynamicFrame&&(this._dynamicFrame.remove(),this._dynamicFrame=null)},o.prototype._detectPostError=function(){var t=this._dynamicFrame.contentWindow.document.body.textContent;t&&t.length>0&&this._showError()},o.prototype._initializeUploadElements=function(t){this._disposeDynamicUploadElements(),this._createDynamicFrame(),this._createDynamicForm(t)},o.prototype._queryProgressWithDelay=function(t){var e=this;window.setTimeout((function(){e._queryProgress(t)}),this._pollingInterval)},o.prototype._showError=function(t){this._uploadFailure();var e=new Autotask.AlertDialogOptions;e.set_operation(Autotask.AlertDialogOptions.Operation.Information),t?e.set_description(t):e.set_description(this._unexpectedErrorMessage),autotask.alertDialog.show(e)},o.prototype._uploadFailure=function(){this._isUploading=!1,autotask.progressBarDialog.hide(),this._disposeDynamicUploadElements(),null!==this._failureHandler&&this._failureHandler()},o.prototype._uploadSuccess=function(t){this._isUploading=!1,this._closeProgressIndicator(!0),this._disposeDynamicUploadElements(),null!==this._successHandler&&this._successHandler(t)},o}(),window.Autotask.InsightContainer=function(){"use strict";function t(t){autotask.instanceManagement.__addRegistrationKey(this,t),this._activeCssClass="Active",this._fadeCssClass="Fade",this._transitionCssClass="Transition",this._id=t,this._insightShellIds=[];var e=document.getElementById(t);this._loadingIndicatorElement=e.lastElementChild}return t.prototype._activeCssClass=null,t.prototype._fadeCssClass=null,t.prototype._id=null,t.prototype._insightShellIds=null,t.prototype._loadingIndicatorElement=null,t.prototype._transitionCssClass=null,t.prototype.__initialize=function(){this._loadingIndicatorElement.classList.contains(this._activeCssClass)&&this._loadingIndicatorElement.classList.add(this._transitionCssClass)},t.prototype.__registerInsightShell=function(t){t.__set_refreshedUponRenderHandler(autotask.proxy(this._insightShellRefreshedUponRender,this)),this._insightShellIds.push(t.__get_id())},t.prototype._insightShellRefreshedUponRender=function(t){var e=this._insightShellIds.indexOf(t.id);if(this._insightShellIds.splice(e,1),0===this._insightShellIds.length){this._loadingIndicatorElement.classList.add(this._fadeCssClass);var i=this;window.setTimeout((function(){i._removeLoadingIndicator()}),600)}},t.prototype._removeLoadingIndicator=function(){this._loadingIndicatorElement.classList.remove(this._activeCssClass)},t}(),window.Autotask.InsightRefreshingEventArgs=function(){"use strict";function t(){this._filters={}}return t.prototype._filters=null,t.prototype.add=function(t,e){this._filters[t]=e},t.prototype.retrieveData=function(){return this._filters},t}(),window.Autotask.RefreshableInsightShell=function(t){"use strict";function e(e,i,n,o,a,s,r,l){t.call(this,e,i,n),this._activeCssClass="Active",this._fadeCssClass="Fade",this._id=e,this._refreshingHandlers=[],this._trackerKey=o,this._insightContainerId=s,this._route=r,this._isRefreshedUponRender=l,this._hasBeenRefreshedUponRender=!1,this._content=document.getElementById(a),this._transitionContainer=this._content.nextElementSibling,this._loadingIndicator=this._transitionContainer.nextElementSibling;var _=document.getElementById(e).getElementsByClassName("RefreshableInsightFooter")[0];this._refreshButtonElement=_.children[0],this._refreshButtonTransitionContainerElement=_.children[1],this._refreshButtonElement.addEventListener("click",autotask.proxy(this._refreshButtonClickListener,this))}return autotask.inherit(e,t),e.prototype._content=null,e.prototype._loadingIndicator=null,e.prototype._transitionContainer=null,e.prototype._activeCssClass=null,e.prototype._fadeCssClass=null,e.prototype._hasBeenRefreshedUponRender=null,e.prototype._insightContainerId=null,e.prototype._id=null,e.prototype._instanceTracker=null,e.prototype._isRefreshedUponRender=null,e.prototype._refreshButtonElement=null,e.prototype._refreshButtonTransitionContainerElement=null,e.prototype._refreshingHandlers=null,e.prototype._refreshedUponRenderHandler=null,e.prototype._requestCanceler=null,e.prototype._trackerKey=null,e.prototype._transitionCoordinator=null,e.prototype._route=null,e.prototype.__get_id=function(){return this._id},e.prototype.__set_refreshedUponRenderHandler=function(t){this._refreshedUponRenderHandler=t},e.prototype._contentLoaded=function(){this._transitionContainer.classList.add(this._fadeCssClass),this._refreshButtonTransitionContainerElement.classList.add(this._fadeCssClass),this._isBecomingVisible&&this.___get_container().classList.remove("Invisible"),this._manageCompletionOfFirstRefresh()},e.prototype._refreshButtonClickListener=function(){this.refresh()},e.prototype._refreshError=function(){this._requestCanceler=null,this.___get_container().classList.add("Invisible")},e.prototype._refreshSuccess=function(t){this._requestCanceler=null,t.isVisible?this._isBecomingVisible=!0:this.___get_container().classList.add("Invisible")},e.prototype._transitionEnding=function(){this._transitionContainer.classList.remove(this._activeCssClass),this._transitionContainer.classList.remove(this._fadeCssClass),this._refreshButtonTransitionContainerElement.classList.remove(this._activeCssClass),this._refreshButtonTransitionContainerElement.classList.remove(this._fadeCssClass)},e.prototype._transitionReset=function(){this._loadingIndicator.classList.remove(this._activeCssClass),this._transitionContainer.classList.remove(this._activeCssClass),this._transitionContainer.classList.remove(this._fadeCssClass),this._refreshButtonTransitionContainerElement.classList.remove(this._activeCssClass),this._refreshButtonTransitionContainerElement.classList.remove(this._fadeCssClass),this._manageCompletionOfFirstRefresh()},e.prototype._transitionStarting=function(){this._loadingIndicator.classList.remove(this._activeCssClass)},e.prototype.addRefreshingHandler=function(t){this._refreshingHandlers.push(t)},e.prototype.refresh=function(){this._isBecomingVisible=!1,this._cancelRequest(),this._transitionCoordinator.cancel();for(var t=new Autotask.InsightRefreshingEventArgs,e=0;e<this._refreshingHandlers.length;e++)this._refreshingHandlers[e](t);(this._isRefreshedUponRender&&this._hasBeenRefreshedUponRender||!this._isRefreshedUponRender)&&(this._transitionContainer.classList.add(this._activeCssClass),this._refreshButtonTransitionContainerElement.classList.add(this._activeCssClass),this._loadingIndicator.classList.add(this._activeCssClass));var i=t.retrieveData();this._requestCanceler=this._route.__refreshInsight(i,autotask.proxy(this._refreshSuccess,this),this._instanceTracker,this._transitionCoordinator,autotask.proxy(this._refreshError,this))},e.prototype.__initialize=function(){this._instanceTracker=autotask.instanceTrackerManagement.__findInstanceTracker(this._trackerKey),this._transitionCoordinator=new Autotask.TransitionCoordinator(100,autotask.proxy(this._transitionStarting,this),100,autotask.proxy(this._contentLoaded,this),autotask.proxy(this._transitionReset,this)),this._transitionCoordinator.configureEndingEvent(autotask.proxy(this._transitionEnding,this),500),this._isRefreshedUponRender&&autotask.find(this._insightContainerId).__registerInsightShell(this)},e.prototype.__complete=function(){this._isRefreshedUponRender&&this.refresh()},e.prototype.__dispose=function(){this._instanceTracker.__dispose()},e.prototype._cancelRequest=function(){null!==this._requestCanceler&&(this._requestCanceler.__cancelRequest(),this._requestCanceler=null)},e.prototype._onRefreshedUponRender=function(){if(null!==this._refreshedUponRenderHandler){var t={};t.id=this._id,this._refreshedUponRenderHandler(t)}},e.prototype._manageCompletionOfFirstRefresh=function(){this._isRefreshedUponRender&&!this._hasBeenRefreshedUponRender&&(this._hasBeenRefreshedUponRender=!0,this._onRefreshedUponRender())},e}(Autotask.InsightShell),window.AutotaskInsightSystem.InsightEntityDetailsContentRoute=function(){"use strict";function t(t){this._requestCoordinator=new Autotask.AjaxRequestCoordinator("GET",t)}return t.prototype._requestCoordinator=null,t.prototype._onResponseProcessing=function(t,e){var i={};if(i.isDataUnavailable=t.isDataUnavailable,!0!==t.isDataUnavailable){var n=new Autotask.AjaxResponseHtmlAndJavaScript(t.htmlJavaScriptPair);i.htmlForInstanceTrackerContainer=n.htmlForInstanceTrackerContainer,i.script=n.script}e(i)},t.prototype.__makeRequest=function(t){var e=new Autotask.AjaxRequestData({},!1).__serialize(),i=this;this._requestCoordinator.__sendRequest(e,(function(e){i._onResponseProcessing(e,t)}),null,!1,"InsightEntityDetailsContent");return new Autotask.AjaxRequestCanceler((function(){i._requestCoordinator.__cancelRequest()}))},t}(),window.Autotask.RefreshInsightRoute=function(){"use strict";function t(t){this._requestCoordinator=new Autotask.AjaxRequestCoordinator("GET",t)}return t.prototype._requestCoordinator=null,t.prototype._onResponseProcessing=function(t,e,i,n){var o=new Autotask.AjaxResponseHtmlAndJavaScript(t.htmlJavaScriptPair),a=i.__createLoadContentDelegate(o.htmlForInstanceTrackerContainer,o.script);n.executeTransition([a]);var s={isVisible:t.isVisible};null!=e&&e(s)},t.prototype._onResponseError=function(t,e,i,n){var o=e.__createLoadContentDelegateForError(t.get_defaultErrorMessage());i.executeTransition([o]),null!==n&&n()},t.prototype.__refreshInsight=function(t,e,i,n,o){var a=new Autotask.AjaxRequestData(t,!1).__serialize(),s=this;this._requestCoordinator.__sendRequest(a,(function(t){s._onResponseProcessing(t,e,i,n)}),(function(t){s._onResponseError(t,i,n,o)}),!1,"RefreshInsight");return new Autotask.AjaxRequestCanceler((function(){s._requestCoordinator.__cancelRequest()}))},t}(),window.AutotaskItemSelectionSystem.ChipContextOverlayRoute=function(){"use strict";function t(t,e){this._requestCoordinator=new Autotask.AjaxRequestCoordinator("GET",t),this._parameterName=e}return t.prototype._parameterName=null,t.prototype._requestCoordinator=null,t.prototype._onResponseProcessing=function(t,e){null!=e&&e(t.htmlJavaScriptPair.Html.HtmlForInstanceTrackerContainer)},t.prototype.requestContent=function(t,e){var i=t.__createRequestData(this._parameterName),n=new Autotask.AjaxRequestData(i,!1).__serialize(),o=this;this._requestCoordinator.__sendRequest(n,(function(t){o._onResponseProcessing(t,e)}),null,!1,"ChipContextOverlay")},t}(),window.AutotaskItemSelectionSystem.DataSelectionAutoCompleteRoute=function(){"use strict";function t(t,e){this._requestCoordinator=new Autotask.AjaxRequestCoordinator("GET",t),this._searchCriteriaParameterName=e}return t.prototype._requestCoordinator=null,t.prototype._searchCriteriaParameterName=null,t.prototype.get_searchCriteriaParameterName=function(){return this._searchCriteriaParameterName},t.prototype._onResponseProcessing=function(t,e){var i=t.itemCreatorContainerId,n=null,o=null;if(null!==i){n=t.html;var a=new Autotask.InstanceTracker(t.instanceTrackerKey,null);a.__loadScript(t.script),o=autotask.find(i).itemCreators,a.__dispose()}e(n,o)},t.prototype.autoComplete=function(t,e){var i=new Autotask.AjaxRequestData(t,!1).__serialize(),n=this;this._requestCoordinator.__sendRequest(i,(function(t){n._onResponseProcessing(t,e)}),null,!1,"DataSelectionAutoComplete");return new Autotask.AjaxRequestCanceler((function(){n._requestCoordinator.__cancelRequest()}))},t}(),window.AutotaskItemSelectionSystem.InsertNewTagRoute=function(){"use strict";function t(t){this._requestCoordinator=new Autotask.AjaxRequestCoordinator("POST",t)}return t.prototype._requestCoordinator=null,t.prototype._onResponseProcessing=function(t,e){var i=new Autotask.InstanceTracker(t.insertNewTagResponseId,null);i.__loadScript(t.script);var n=autotask.find(t.insertNewTagResponseId).chipInformation;i.__dispose(),e(n)},t.prototype.insertNewTag=function(t,e){var i=new Autotask.AjaxRequestData(t,!0).__serialize(),n=this;this._requestCoordinator.__sendRequest(i,(function(t){n._onResponseProcessing(t,e)}),null,!1,"InsertNewTag");return new Autotask.AjaxRequestCanceler((function(){n._requestCoordinator.__cancelRequest()}))},t}(),window.AutotaskItemSelectionSystem.MultipleSelectionDialogRoute=function(){"use strict";function t(t){this._requestCoordinator=new Autotask.AjaxRequestCoordinator("POST",t)}return t.prototype._requestCoordinator=null,t.prototype._onResponseProcessing=function(t,e){var i=new Autotask.AjaxResponseHtmlAndJavaScript(t.htmlJavaScriptPair);autotask.dialogManagement.__loadDialog(i);var n={value:null,dialogId:t.dialogId};null!=e&&e(n)},t.prototype.__multipleSelectionDialog=function(t,e){var i=new Autotask.AjaxRequestData(t,!0).__serialize(),n=this;this._requestCoordinator.__sendRequest(i,(function(t){n._onResponseProcessing(t,e)}),null,!0,"MultipleSelectionDialog");return new Autotask.AjaxRequestCanceler((function(){n._requestCoordinator.__cancelRequest()}))},t}(),window.PopulateMultipleDataSelectorRoute=function(){"use strict";function t(t,e){this._requestCoordinator=e?new Autotask.AjaxRequestCoordinator("POST",t):new Autotask.AjaxRequestCoordinator("GET",t),this._isPostRequest=e}return t.prototype._isPostRequest=null,t.prototype._requestCoordinator=null,t.prototype._onResponseProcessing=function(t,e){var i=new Autotask.InstanceTracker(t.selectionInstanceId,null);i.__loadScript(t.script);var n=autotask.find(t.selectionInstanceId).chipInformation,o=null;null!==t.itemCreatorContainerId&&(o=autotask.find(t.itemCreatorContainerId).itemCreators);i.__dispose(),e(null,t.isLocked,t.isBrowseOnly,t.placeholderText,n,t.html,o)},t.prototype.sendPopulateRequest=function(t,e){var i=new Autotask.AjaxRequestData(t,this._isPostRequest).__serialize(),n=this;this._requestCoordinator.__sendRequest(i,(function(t){n._onResponseProcessing(t,e)}),null,!1,"PopulateMultipleDataSelector");return new Autotask.AjaxRequestCanceler((function(){n._requestCoordinator.__cancelRequest()}))},t}(),window.PopulateMultipleItemSelectorRoute=function(){"use strict";function t(t){this._requestCoordinator=new Autotask.AjaxRequestCoordinator("GET",t)}return t.prototype._requestCoordinator=null,t.prototype._onResponseProcessing=function(t,e){var i=new Autotask.InstanceTracker(t.selectionInstanceId,null);i.__loadScript(t.script);var n=autotask.find(t.selectionInstanceId).chipInformation,o=null;null!==t.itemCreatorContainerId&&(o=autotask.find(t.itemCreatorContainerId).itemCreators);i.__dispose(),e(t.isLocked,t.placeholderText,n,t.html,o)},t.prototype.sendPopulateRequest=function(t,e){var i=new Autotask.AjaxRequestData(t,!1).__serialize(),n=this;this._requestCoordinator.__sendRequest(i,(function(t){n._onResponseProcessing(t,e)}),null,!1,"PopulateMultipleItemSelector");return new Autotask.AjaxRequestCanceler((function(){n._requestCoordinator.__cancelRequest()}))},t}(),window.PopulateSingleDataSelectorRoute=function(){"use strict";function t(t){this._requestCoordinator=new Autotask.AjaxRequestCoordinator("GET",t)}return t.prototype._requestCoordinator=null,t.prototype._onResponseProcessing=function(t,e){var i=new Autotask.InstanceTracker(t.selectionInstanceId,null);i.__loadScript(t.script);var n=autotask.find(t.selectionInstanceId).chipInformation,o=null;null!==t.itemCreatorContainerId&&(o=autotask.find(t.itemCreatorContainerId).itemCreators);i.__dispose(),e(t.isLocked,t.isBrowseOnly,t.placeholderText,n,t.html,o)},t.prototype.sendPopulateRequest=function(t,e){var i=new Autotask.AjaxRequestData(t,!1).__serialize(),n=this;this._requestCoordinator.__sendRequest(i,(function(t){n._onResponseProcessing(t,e)}),null,!1,"PopulateSingleDataSelector");return new Autotask.AjaxRequestCanceler((function(){n._requestCoordinator.__cancelRequest()}))},t}(),window.PopulateSingleItemSelectorRoute=function(){"use strict";function t(t){this._requestCoordinator=new Autotask.AjaxRequestCoordinator("GET",t)}return t.prototype._requestCoordinator=null,t.prototype._onResponseProcessing=function(t,e){var i=new Autotask.InstanceTracker(t.selectionInstanceId,null);i.__loadScript(t.script);var n=autotask.find(t.selectionInstanceId).value,o=null;null!==t.itemCreatorContainerId&&(o=autotask.find(t.itemCreatorContainerId).itemCreators);i.__dispose(),e(t.itemSetHtml,t.lockedTextItemHtml,n,o)},t.prototype.sendPopulateRequest=function(t,e){var i=new Autotask.AjaxRequestData(t,!1).__serialize(),n=this;this._requestCoordinator.__sendRequest(i,(function(t){n._onResponseProcessing(t,e)}),null,!1,"PopulateSingleItemSelector");return new Autotask.AjaxRequestCanceler((function(){n._requestCoordinator.__cancelRequest()}))},t}(),window.AutotaskItemSelectionSystem.RecipientSelectionDialogRoute=function(){"use strict";function t(t,e){this._requestCoordinator=new Autotask.AjaxRequestCoordinator("POST",t),this._selectedValuesParameterName=e}return t.prototype._requestCoordinator=null,t.prototype._selectedValuesParameterName=null,t.prototype.get_selectedValuesParameterName=function(){return this._selectedValuesParameterName},t.prototype._onResponseProcessing=function(t,e){var i=new Autotask.AjaxResponseHtmlAndJavaScript(t.htmlJavaScriptPair);autotask.dialogManagement.__loadDialog(i);var n={value:null,dialogId:t.dialogId};null!=e&&e(n)},t.prototype.__recipientSelectionDialog=function(t,e){var i=new Autotask.AjaxRequestData(t,!0).__serialize(),n=this;this._requestCoordinator.__sendRequest(i,(function(t){n._onResponseProcessing(t,e)}),null,!0,"RecipientSelectionDialog")},t}(),window.AutotaskItemSelectionSystem.RecipientSelectorAutoCompleteRoute=function(){"use strict";function t(t,e){this._requestCoordinator=new Autotask.AjaxRequestCoordinator("GET",t),this._searchCriteriaParameterName=e}return t.prototype._requestCoordinator=null,t.prototype._searchCriteriaParameterName=null,t.prototype.get_searchCriteriaParameterName=function(){return this._searchCriteriaParameterName},t.prototype._onResponseProcessing=function(t,e){var i=t.itemCreatorContainerId,n=null,o=null,a=null;if(null!==i){n=t.html;var s=new Autotask.InstanceTracker(t.instanceTrackerKey,null);s.__loadScript(t.script);var r=autotask.find(i);o=r.leftListItemCreators,a=r.rightListItemCreators,s.__dispose()}e(n,o,a)},t.prototype.autoComplete=function(t,e){var i=new Autotask.AjaxRequestData(t,!1).__serialize(),n=this;this._requestCoordinator.__sendRequest(i,(function(t){n._onResponseProcessing(t,e)}),null,!1,"RecipientSelectionAutoComplete");return new Autotask.AjaxRequestCanceler((function(){n._requestCoordinator.__cancelRequest()}))},t}(),window.AutotaskItemSelectionSystem.SingleSelectionDialogRoute=function(){"use strict";function t(t){this._requestCoordinator=new Autotask.AjaxRequestCoordinator("POST",t)}return t.prototype._requestCoordinator=null,t.prototype._onResponseProcessing=function(t,e){var i=new Autotask.AjaxResponseHtmlAndJavaScript(t.htmlJavaScriptPair);autotask.dialogManagement.__loadDialog(i);var n={value:null,dialogId:t.dialogId};null!=e&&e(n)},t.prototype.__singleSelectionDialog=function(t,e){var i=new Autotask.AjaxRequestData(t,!0).__serialize(),n=this;this._requestCoordinator.__sendRequest(i,(function(t){n._onResponseProcessing(t,e)}),null,!0,"SingleSelectionDialog");return new Autotask.AjaxRequestCanceler((function(){n._requestCoordinator.__cancelRequest()}))},t}(),window.AutotaskItemSelectionSystem.TagSelectorAutoCompleteRoute=function(){"use strict";function t(t){this._requestCoordinator=new Autotask.AjaxRequestCoordinator("POST",t)}return t.prototype._requestCoordinator=null,t.prototype._onResponseProcessing=function(t,e){e(t.html)},t.prototype.autoComplete=function(t,e){var i=new Autotask.AjaxRequestData(t,!0).__serialize(),n=this;this._requestCoordinator.__sendRequest(i,(function(t){n._onResponseProcessing(t,e)}),null,!1,"TagSelectionAutoComplete");return new Autotask.AjaxRequestCanceler((function(){n._requestCoordinator.__cancelRequest()}))},t}(),window.AutotaskItemSelectionSystem.UserDefinedFieldDataSelectionAutoCompleteRoute=function(){"use strict";function t(t,e){this._requestCoordinator=new Autotask.AjaxRequestCoordinator("GET",t),this._searchCriteriaParameterName=e}return t.prototype._requestCoordinator=null,t.prototype._searchCriteriaParameterName=null,t.prototype.get_searchCriteriaParameterName=function(){return this._searchCriteriaParameterName},t.prototype._onResponseProcessing=function(t,e){var i=t.itemCreatorContainerId,n=null,o=null;if(null!==i){n=t.html;var a=new Autotask.InstanceTracker(t.instanceTrackerKey,null);a.__loadScript(t.script),o=autotask.find(i).itemCreators,a.__dispose()}e(n,o)},t.prototype.autoComplete=function(t,e){var i=new Autotask.AjaxRequestData(t,!1).__serialize(),n=this;this._requestCoordinator.__sendRequest(i,(function(t){n._onResponseProcessing(t,e)}),null,!1,"UserDefinedFieldDataSelectionAutoComplete");return new Autotask.AjaxRequestCanceler((function(){n._requestCoordinator.__cancelRequest()}))},t}(),window.AutotaskItemSelectionSystem.ActiveStatusIconGenerator=function(t){"use strict";function e(e,i){t.call(this),this._iconCssClass=e,this._colorId=i}return autotask.inherit(e,t),e.prototype._colorId=null,e.prototype._iconCssClass=null,e.prototype.___get_cssClasses=function(){return"CircularIconContainer16 "+this.___generateColorCssClasses(this._colorId)},e.prototype.___generateNestedElement=function(){var t=document.createElement("div");return t.className="ActiveStatusIcon "+this._iconCssClass,t},e}(AutotaskItemSelectionSystem.IconGenerator),window.AutotaskItemSelectionSystem.ClientPortalVisibilityIconGenerator=function(t){"use strict";function e(e,i){t.call(this),this._iconCssClass=e,this._colorId=i}return autotask.inherit(e,t),e.prototype._colorId=null,e.prototype._iconCssClass=null,e.prototype.___get_cssClasses=function(){return"CircularIconContainer16 "+this.___generateColorCssClasses(this._colorId)},e.prototype.___generateNestedElement=function(){var t=document.createElement("div");return t.className="ClientPortalVisibilityIcon "+this._iconCssClass,t},e}(AutotaskItemSelectionSystem.IconGenerator),window.AutotaskItemSelectionSystem.EntityCategoryIconGenerator=function(t){"use strict";function e(e){t.call(this),this._colorId=e}return autotask.inherit(e,t),e.prototype._colorId=null,e.prototype.___get_cssClasses=function(){return"EntityCategoryItemIcon "+this.___generateColorCssClasses(this._colorId)},e}(AutotaskItemSelectionSystem.IconGenerator),window.AutotaskItemSelectionSystem.GroupingIconGenerator=function(t){"use strict";function e(e){t.call(this),this._iconCssClass=e}return autotask.inherit(e,t),e.prototype._iconCssClass=null,e.prototype.___get_cssClasses=function(){return"ItemGroupingIcon "+this._iconCssClass},e}(AutotaskItemSelectionSystem.IconGenerator),window.AutotaskItemSelectionSystem.OpportunityStageIconGenerator=function(t){"use strict";function e(e,i){t.call(this),this._iconCssClass=e,this._colorId=i}return autotask.inherit(e,t),e.prototype._colorId=null,e.prototype._iconCssClass=null,e.prototype.___get_cssClasses=function(){return"CircularIconContainer16 "+this.___generateColorCssClasses(this._colorId)},e.prototype.___generateNestedElement=function(){var t=document.createElement("div");return t.className="OpportunityStageIcon "+this._iconCssClass,t},e}(AutotaskItemSelectionSystem.IconGenerator),window.AutotaskItemSelectionSystem.OpportunityStatusIconGenerator=function(t){"use strict";function e(e,i){t.call(this),this._iconCssClass=e,this._colorId=i}return autotask.inherit(e,t),e.prototype._colorId=null,e.prototype._iconCssClass=null,e.prototype.___get_cssClasses=function(){return"CircularIconContainer16 "+this.___generateColorCssClasses(this._colorId)},e.prototype.___generateNestedElement=function(){var t=document.createElement("div");return t.className="OpportunityStatusIcon "+this._iconCssClass,t},e}(AutotaskItemSelectionSystem.IconGenerator),window.AutotaskItemSelectionSystem.RecipientIconGenerator=function(t){"use strict";function e(e){t.call(this),this._iconId=e}return autotask.inherit(e,t),e.prototype._iconId=null,e.prototype.___get_cssClasses=function(){return"RecipientIcon "+this._iconId},e}(AutotaskItemSelectionSystem.IconGenerator),window.AutotaskItemSelectionSystem.TicketPriorityIconGenerator=function(t){"use strict";function e(e,i){t.call(this),this._iconCssClass=e,this._colorId=i}return autotask.inherit(e,t),e.prototype._colorId=null,e.prototype._iconCssClass=null,e.prototype.___get_cssClasses=function(){return"CircularIconContainer16 "+this.___generateColorCssClasses(this._colorId)},e.prototype.___generateNestedElement=function(){var t=document.createElement("div");return t.className="TicketPriorityIcon "+this._iconCssClass,t},e}(AutotaskItemSelectionSystem.IconGenerator),window.AutotaskItemSelectionSystem.TicketStatusIconGenerator=function(t){"use strict";function e(e,i){t.call(this),this._iconCssClass=e,this._colorId=i}return autotask.inherit(e,t),e.prototype._colorId=null,e.prototype._iconCssClass=null,e.prototype.___get_cssClasses=function(){return"CircularIconContainer16 "+this.___generateColorCssClasses(this._colorId)},e.prototype.___generateNestedElement=function(){var t=document.createElement("div");return t.className="TicketStatusIcon "+this._iconCssClass,t},e}(AutotaskItemSelectionSystem.IconGenerator),window.Autotask.JsonGetRoute=function(){"use strict";function t(t){this._requestCoordinator=new Autotask.AjaxRequestCoordinator("GET",t)}return t.prototype._requestCoordinator=null,t.prototype._onResponseProcessing=function(t,e){if(null!==e){var i={};if(void 0!==t.responseDataId){var n=new Autotask.InstanceTracker(t.responseDataId,null);n.__loadScript(t.script);var o=autotask.find(t.responseDataId);i.responseData=o.data,n.__dispose()}e(i)}},t.prototype.makeRequest=function(t,e){var i=null;null!==t&&(i=t.__data);var n=new Autotask.AjaxRequestData(i,!0).__serialize(),o=this;this._requestCoordinator.__sendRequest(n,(function(t){o._onResponseProcessing(t,e)}),null,!1,"ResponseData")},t}(),window.JsonGetRouteCreator=function(){"use strict";function t(){}return t.prototype.createJsonGetRoute=function(t){return new Autotask.JsonGetRoute(t)},t}(),window.Autotask.JsonPostRoute=function(){"use strict";function t(t){this._requestCoordinator=new Autotask.AjaxRequestCoordinator("POST",t)}return t.prototype._requestCoordinator=null,t.prototype._onResponseProcessing=function(t,e){if(null!==e){var i={};if(void 0!==t.responseDataId){var n=new Autotask.InstanceTracker(t.responseDataId,null);n.__loadScript(t.script);var o=autotask.find(t.responseDataId);i.responseData=o.data,n.__dispose()}e(i)}},t.prototype.makeRequest=function(t,e){var i=null;null!==t&&(i=t.__data);var n=new Autotask.AjaxRequestData(i,!0).__serialize(),o=this;this._requestCoordinator.__sendRequest(n,(function(t){o._onResponseProcessing(t,e)}),null,!0,"ResponseData")},t}(),window.JsonPostRouteCreator=function(){"use strict";function t(){}return t.prototype.createJsonPostRoute=function(t){return new Autotask.JsonPostRoute(t)},t}(),window.Autotask.RestrictedJsonPostRoute=function(){"use strict";function t(t){this._requestCoordinator=new Autotask.AjaxRequestCoordinator("POST",t)}return t.prototype._requestCoordinator=null,t.prototype._onResponseProcessing=function(t,e){if(null!==e){var i={};if(void 0!==t.responseDataId){var n=new Autotask.InstanceTracker(t.responseDataId,null);n.__loadScript(t.script);var o=autotask.find(t.responseDataId);i.responseData=o.data,n.__dispose()}e(i)}},t.prototype.__makeRequest=function(t,e,i){var n=null;null!==t&&(n=t.__data);var o=new Autotask.AjaxRequestData(n,!0).__serialize(),a=this;this._requestCoordinator.__sendRequest(o,(function(t){a._onResponseProcessing(t,e)}),null,i,"RestrictedResponseData")},t}(),window.RestrictedJsonPostRouteCreator=function(){"use strict";function t(){}return t.prototype.createRestrictedJsonPostRoute=function(t){return new Autotask.RestrictedJsonPostRoute(t)},t}(),Autotask.CollapsibleStateManager=function(){"use strict";function t(t,e,i,n){this._stateKey=t,this._saveUrl=e,this._stateKeyParameterName=i,this._isCollapsedParameterName=n}return t.prototype._isCollapsedParameterName=null,t.prototype._stateKey=null,t.prototype._stateKeyParameterName=null,t.prototype._saveUrl=null,t.prototype.__saveState=function(t){var e={};e[this._stateKeyParameterName]=this._stateKey,e[this._isCollapsedParameterName]=t,autotask.ajax.__restrictedPostRequest(this._saveUrl,e,null).__deprecatedJson(!1)},t}(),window.Autotask.DetailsSection=function(t){"use strict";function e(e,i,n){t.call(this,e,i,n)}return autotask.inherit(e,t),e}(Autotask.CollapsibleContainer),Autotask.Hotspot=function(){"use strict";function t(t,e){autotask.instanceManagement.__addRegistrationKey(this,t),this._page=e,this._hotspotElement=document.getElementById(t),this._tabLabelElement=this._hotspotElement.children[0],this._contentElement=this._hotspotElement.children[1]}return t.prototype._contentElement=null,t.prototype._hotspotElement=null,t.prototype._page=null,t.prototype._tabLabelElement=null,t.prototype._click=function(){this._page.open(null)},t.prototype._mouseEnter=function(){this._tabLabelElement.classList.remove("Active"),this._contentElement.classList.add("Active")},t.prototype._mouseLeave=function(){this._tabLabelElement.classList.add("Active"),this._contentElement.classList.remove("Active")},t.prototype.__initialize=function(){var t=this;this._hotspotElement.addEventListener("click",(function(){t._click()})),this._hotspotElement.addEventListener("mouseenter",(function(){t._mouseEnter()})),this._hotspotElement.addEventListener("mouseleave",(function(){t._mouseLeave()}))},t}(),function(){"use strict";window.Autotask.ImageHotspot=function(t,e,i,n){autotask.instanceManagement.__addRegistrationKey(this,t),this._clickHandler=n,this._activeCssClass="Active",this._imageHotspot=document.getElementById(t),this._simpleLabel=document.getElementById(e),this._completeLabel=document.getElementById(i),this._registerHandlers()},window.Autotask.ImageHotspot.prototype={_activeOverlay:null,_completeLabel:null,_simpleLabel:null,_activeCssClass:null,_clickHandler:null,_click:function(t){var e=!0;return null!==this._clickHandler&&(e=this._clickHandler()),e},_mouseEnter:function(t){this._completeLabel.classList.add(this._activeCssClass),this._simpleLabel.classList.remove(this._activeCssClass)},_mouseLeave:function(t){this._completeLabel.classList.remove(this._activeCssClass),this._simpleLabel.classList.add(this._activeCssClass)},_registerHandlers:function(){this._imageHotspot.addEventListener("click",autotask.proxy(this._click,this)),this._imageHotspot.addEventListener("mouseenter",autotask.proxy(this._mouseEnter,this)),this._imageHotspot.addEventListener("mouseleave",autotask.proxy(this._mouseLeave,this))}}}(),function(){"use strict";window.Autotask.LayoutAnalysis=function(){},window.Autotask.LayoutAnalysis.prototype={__calculateOffsetY:function(t){var e,i,n=null;t.touches?(t.touches.length>0?(e=document.elementFromPoint(t.touches[0].clientX,t.touches[0].clientY),i=t.touches[0].pageY):(e=document.elementFromPoint(t.changedTouches[0].pageX,t.changedTouches[0].pageY),i=t.changedTouches[0].pageY),n=i-AutotaskDomSystem.Other.positionOffset(e).top):n=null!==t.currentTarget?t.pageY-AutotaskDomSystem.Other.positionOffset(t.currentTarget).top:t.offsetY;return n}}}(),Autotask.PostedColumn=function(){"use strict";function t(t){autotask.instanceManagement.__addRegistrationKey(this,t),this._fieldContainer=document.getElementById(t),this._immutableData=[]}return t.prototype._fieldContainer=null,t.prototype._fieldValidation=null,t.prototype._immutableData=null,t.prototype._validationSummary=null,t.prototype.get_customValidationSummary=function(){return this._validationSummary.__get_customValidationSummary()},t.prototype.generateFieldData=function(){for(var t=[this._fieldContainer],e=new AutotaskRequestDataSystem.SerializedRequestData(t),i=0;i<this._immutableData.length;i++)e.__addImmutableData(this._immutableData[i]);return e},t.prototype.validate=function(){return this._validate(!1)},t.prototype.validateEditor=function(t){return"function"==typeof t.validate?t.validate():this._fieldValidation.__validateLegacyEditor(t.__get_id(),!1)},t.prototype.__addImmutableData=function(t){this._immutableData.push(t)},t.prototype.__finalize=function(){this._fieldValidation.__parse()},t.prototype.__initialize=function(){this._fieldValidation=new Autotask.PostedContainerValidation(this._fieldContainer),this._validationSummary=autotask.validationSummaryManagement.__findValidationSummary(this._fieldContainer)},t.prototype.__registerHandlers=function(){this._fieldValidation.__registerValidationSummary(this._validationSummary)},t.prototype.__resetValidation=function(){this._fieldValidation.__reset(),this._validationSummary.__get_isActive()&&this._validate(!0)},t.prototype._validate=function(t){var e=this._fieldValidation.__validate();return e||this._fieldValidation.__validationFailed(),this._fieldValidation.__validationCompleted(e,t),e},t}(),Autotask.ReplaceableColumnContainer=function(){"use strict";function t(t,e,i,n,o){autotask.instanceManagement.__addRegistrationKey(this,t),this._id=t,this._trackerKey=t,this._containerElement=AutotaskDomSystem.Document.getElementById(t),this._transitionContainerElement=this._containerElement.nextElementSibling,this._loadingIndicatorElement=this._transitionContainerElement.nextElementSibling,this._route=e,this._initialSuccessHandler=i,this._isLoadingIndicatorActive=n,this._size=o,this._contentTransitioningHandlers=[],this._activeCssClass="Active",this._fadeInCssClass="FadeIn",this._tabbingSystem=new AutotaskTabbingSystem.TabbingSystem(this._containerElement,autotask.proxy(this._tabbingAwayHandler,this)),this._tabbingAwayHandlers=[]}return t.prototype._activeCssClass=null,t.prototype._canceler=null,t.prototype._containerElement=null,t.prototype._contentTransitioningHandlers=null,t.prototype._fadeInCssClass=null,t.prototype._id=null,t.prototype._initialSuccessHandler=null,t.prototype._instanceTracker=null,t.prototype._isLoadingIndicatorActive=null,t.prototype._loadingIndicatorElement=null,t.prototype._route=null,t.prototype._size=null,t.prototype._tabbingAwayHandlers=null,t.prototype._tabbingSystem=null,t.prototype._trackerKey=null,t.prototype._transitionContainerElement=null,t.prototype._transitionCoordinator=null,Object.defineProperty(t.prototype,"id",{get:function(){return this._id}}),Object.defineProperty(t.prototype,"isEnabled",{get:function(){return this._tabbingSystem.hasFocusableParticipants}}),t.prototype.addContentTransitioningHandler=function(t){this._contentTransitioningHandlers.push(t)},t.prototype.addTabbingAwayHandler=function(t){this._tabbingAwayHandlers.push(t),this._tabbingSystem.isEnabled||(this._tabbingSystem.reset(),this._tabbingSystem.isEnabled=!0)},t.prototype.focus=function(){this._tabbingSystem.focusFirstParticipant()},t.prototype.focusEnd=function(){this._tabbingSystem.focusLastParticipant()},t.prototype.focusStart=function(){this._tabbingSystem.focusFirstParticipant()},t.prototype.replaceContent=function(t,e,i){this._cancel();var n=this,o=function(t){n._canceler=null,n._instanceTracker.__loadHtmlAndJavaScript(t.html,t.javaScript),n.__resetValidation(),n._resetTabbing(),null!==e&&e()},a=i;null==a&&(a=this._route),"EntityPageLarge"===this._size?this._canceler=a.__replaceEntityPageLargeColumnContent(t,o):"Large"===this._size?this._canceler=a.__replaceLargeColumnContent(t,o):"Normal"===this._size?this._canceler=a.__replaceNormalColumnContent(t,o):"Operand"===this._size?this._canceler=a.__replaceOperandColumnContent(t,o):autotask.throwException("The replaceable column size is not supported.")},t.prototype.transitionContent=function(t,e){var i=e;null==i&&(i=this._route),this._transitionContent(t,i)},t.prototype.__complete=function(){this._isLoadingIndicatorActive&&this._transitionContent(this._initialSuccessHandler,this._route)},t.prototype.__dispose=function(){this._cancel(),this._instanceTracker.__dispose()},t.prototype.__initialize=function(){this._instanceTracker=autotask.instanceTrackerManagement.__findInstanceTracker(this._trackerKey)},t.prototype.__resetValidation=function(){var t=this._containerElement.parentElement,e=t.parentElement.closest(".ReplaceableColumnContainer");if(null!==e){var i=e.firstElementChild.firstElementChild.id;autotask.find(i).__resetValidation();var n=e.firstElementChild.id;autotask.find(n).__resetValidation()}else{var o=t.closest(".Dialog2");if(null!==o){var a=o.id;autotask.find(a).__resetValidation()}else{var s=t.closest(".TabContainer");if(null!==s){var r=s.id;autotask.find(r).__resetValidation()}else autotask.findPage().__resetValidation()}}},t.prototype._cancel=function(){null!==this._canceler&&(this._canceler.__cancelRequest(),this._canceler=null,this._transitionContainerElement.classList.remove(this._activeCssClass),this._loadingIndicatorElement.classList.remove(this._activeCssClass)),null!==this._transitionCoordinator&&(this._transitionCoordinator.cancel(),this._transitionCoordinator=null)},t.prototype._raiseContentTransitioningEvent=function(t){for(var e=0;e<this._contentTransitioningHandlers.length;e++)this._contentTransitioningHandlers[e](t)},t.prototype._resetTabbing=function(){this._tabbingSystem.reset()},t.prototype._tabbingAwayHandler=function(t){if(this._tabbingAwayHandlers.length>0)for(var e=new AutotaskTabbingSystem.TabbingAwayEventArgs(this._id,t,(function(){})),i=0;i<this._tabbingAwayHandlers.length;i++)this._tabbingAwayHandlers[i](e)},t.prototype._transitionContent=function(t,e){this._cancel(),this._transitionContainerElement.classList.add(this._activeCssClass),this._loadingIndicatorElement.classList.add(this._activeCssClass);var i=40;this._containerElement.clientHeight>i&&(i=this._containerElement.clientHeight),this._containerElement.style.minHeight=i.toString()+"px",this._instanceTracker.__clear();var n=new AutotaskReplaceableColumnSystem.ContentTransitioningEventArgs;this._raiseContentTransitioningEvent(n);var o=n.requestData,a=this,s=function(e){a._transitionContentSuccess(e,t)};"EntityPageLarge"===this._size?this._canceler=e.__transitionEntityPageLargeColumnContent(o,s):"Large"===this._size?this._canceler=e.__transitionLargeColumnContent(o,s):"Normal"===this._size?this._canceler=e.__transitionNormalColumnContent(o,s):"Operand"===this._size?this._canceler=e.__transitionOperandColumnContent(o,s):autotask.throwException("The replaceable column size is not supported.")},t.prototype._transitionContentLoaded=function(t){this.__resetValidation(),this._resetTabbing(),null!==t&&t(),this._transitionContainerElement.classList.add(this._fadeInCssClass)},t.prototype._transitionContentLoading=function(){this._containerElement.style.minHeight=""},t.prototype._transitionContentSuccess=function(t,e){this._canceler=null;var i=this,n=new Autotask.TransitionCoordinator(100,autotask.proxy(this._transitionStarting,this),100,(function(){i._transitionContentLoaded(e)}),autotask.proxy(this._transitionReset,this));n.contentLoadingHandler=autotask.proxy(this._transitionContentLoading,this),n.configureEndingEvent(autotask.proxy(this._transitionEnding,this),500),n.executeTransition([this._instanceTracker.__createLoadContentDelegate(t.html,t.javaScript)]),this._transitionCoordinator=n},t.prototype._transitionEnding=function(){this._transitionContainerElement.classList.remove(this._activeCssClass),this._transitionContainerElement.classList.remove(this._fadeInCssClass)},t.prototype._transitionReset=function(){this._loadingIndicatorElement.style.minHeight="",this._loadingIndicatorElement.classList.remove(this._fadeInCssClass),this._transitionContainerElement.classList.remove(this._activeCssClass),this._transitionContainerElement.classList.remove(this._fadeInCssClass)},t.prototype._transitionStarting=function(){this._loadingIndicatorElement.classList.remove(this._activeCssClass)},t}(),Autotask.SearchFilterSection=function(){"use strict";function t(t,e,i,n,o,a,s,r,l,_,u,c){autotask.instanceManagement.__addRegistrationKey(this,t),this._section=document.getElementById(t),document.getElementById(c).addEventListener("scroll",autotask.proxy(this._onScroll,this)),this._areaName=r,this._backingSectionId=e,this._chooseFiltersDialogUrl=n,this._chooseFiltersDialogSuccessPointer=o,this._controllerName=l,this._dirtyPageConfirmationText=a,this._gridId=s,this._hasPreAppliedFilters=u,this._searchButtonId=i,this._searchFilterConfigurationKey=_,this._sectionElement=document.getElementById(t),this._sectionElementValidation=new Autotask.PostedContainerValidation(this._sectionElement),this._filtersClearedHandlers=[],this._immutableData=[],this._participants=[],this._searchPointers=[]}return t.prototype._section=null,t.prototype._areaName=null,t.prototype._backingSectionId=null,t.prototype._backingSectionInstance=null,t.prototype._chooseFiltersDialogSuccessPointer=null,t.prototype._chooseFiltersDialogUrl=null,t.prototype._controllerName=null,t.prototype._dirtyPageConfirmationText=null,t.prototype._filtersClearedHandlers=null,t.prototype._grid=null,t.prototype._gridId=null,t.prototype._hasPreAppliedFilters=null,t.prototype._immutableData=null,t.prototype._participants=null,t.prototype._searchButton=null,t.prototype._searchButtonId=null,t.prototype._searchFilterConfigurationKey=null,t.prototype._searchPointers=null,t.prototype._sectionElement=null,t.prototype._sectionElementValidation=null,t.prototype.__get_hasPreAppliedFilters=function(){return this._hasPreAppliedFilters},t.prototype._legacyEditorKeyUp=function(t){if(AutotaskDomSystem.KeyCode.isEnter(t.which)){document.activeElement&&document.activeElement.blur();var e=autotask.proxy(this._search,this);this._checkDirtyAndConfirm(e,e)}},t.prototype._onConfirmChooseFilters=function(){this._grid.refresh(autotask.proxy(this._showChooseFiltersDialog,this))},t.prototype._onChooseFiltersDialogSuccess=function(){autotask.chooseFiltersDialog.setSuccessHandler(this._chooseFiltersDialogSuccessPointer)},t.prototype._onScroll=function(){autotask.contextOverlayManagement.__hideVisibleContextOverlays()},t.prototype._onSearchButtonClick=function(){var t=autotask.proxy(this._search,this);this._checkDirtyAndConfirm(t,t)},t.prototype._participantBroadcastedKeyDownHandler=function(t){if(t.isEnter){autotask.find(t.broadcasterId).removeFocus();var e=autotask.proxy(this._search,this);this._checkDirtyAndConfirm(e,e)}},t.prototype.addFiltersClearedHandler=function(t){this._filtersClearedHandlers.push(t)},t.prototype.__addImmutableData=function(t){this._immutableData.push(t)},t.prototype.__addSearch=function(t){this._searchPointers.push(t)},t.prototype.__chooseFilters=function(){null===this._chooseFiltersDialogUrl&&autotask.throwException("Choosing search filters is not supported."),this._checkDirtyAndConfirm(autotask.proxy(this._showChooseFiltersDialog,this),autotask.proxy(this._onConfirmChooseFilters,this))},t.prototype.__clearFilters=function(){for(var t=null,e=0;e<this._participants.length;e++)"function"!=typeof(t=this._participants[e]).clearValue?("function"!=typeof t.get_enabled||t.get_enabled())&&("function"==typeof t.clear?t.clear():"function"==typeof t.set_value?t.set_value(null):"function"==typeof t.clearSelection&&t.clearSelection(),"function"==typeof t.__triggerChange&&t.__triggerChange()):this._participants[e].isEnabled&&this._participants[e].clearValue();this._raiseFiltersClearedEvent()},t.prototype.__finalize=function(){this._sectionElementValidation.__registerValidationSummary(autotask.findPage().__get_validationSummary()),this._sectionElementValidation.__parse()},t.prototype.__generateSerializedRequestData=function(){for(var t=new window.AutotaskRequestDataSystem.SerializedRequestData([this._sectionElement]),e=0;e<this._immutableData.length;e++)t.__addImmutableData(this._immutableData[e]);return t},t.prototype.__initialize=function(){this._grid=autotask.find(this._gridId),this._searchButton=autotask.find(this._searchButtonId),this._backingSectionInstance=autotask.find(this._backingSectionId),this._backingSectionInstance.addCollapsedStateChangeHandler(autotask.proxy(this._collapsedStateChangeHandler,this));for(var t=this._section.querySelectorAll("[data-systems]"),e=0;e<t.length;e++)this._isSearchFilterSectionParticipant(t[e].dataset.systems)&&this._participants.push(autotask.find(t[e].dataset.alphaId))},t.prototype.__registerHandlers=function(){var t=new AutotaskButtonSystem.ClickEventHandler(autotask.proxy(this._onSearchButtonClick,this));this._searchButton.addEventHandler(t);for(var e=autotask.proxy(this._participantBroadcastedKeyDownHandler,this),i=autotask.proxy(this._legacyEditorKeyUp,this),n=0;n<this._participants.length;n++)"function"==typeof this._participants[n].addBroadcastKeyUpHandler?this._participants[n].addBroadcastKeyUpHandler(e):"function"==typeof this._participants[n].__addKeyUp&&this._participants[n].__addKeyUp(i)},t.prototype.__validate=function(){var t=this._sectionElementValidation.__validate();return t||this._sectionElementValidation.__validationFailed(),this._sectionElementValidation.__validationCompleted(t,!1),t},t.prototype._checkDirtyAndConfirm=function(t,e){if(this._grid.get_modifiedDisplayData().get_isDirty()){var i=new Autotask.ConfirmationDialogOptions;i.set_description(this._dirtyPageConfirmationText),i.set_confirmPointer(e),i.set_operation(Autotask.ConfirmationDialogOptions.Operation.Warning),autotask.confirmationDialog.show(i)}else t()},t.prototype._collapsedStateChangeHandler=function(t){t.isCollapsed?this._section.classList.add("Collapsed"):this._section.classList.remove("Collapsed")},t.prototype._isSearchFilterSectionParticipant=function(t){return"1"===t[4]},t.prototype._raiseFiltersClearedEvent=function(){for(var t=0;t<this._filtersClearedHandlers.length;t++)this._filtersClearedHandlers[t]()},t.prototype._search=function(){for(var t=0;t<this._searchPointers.length;t++)this._searchPointers[t]()},t.prototype._showChooseFiltersDialog=function(){var t={gridId:this._gridId,areaName:this._areaName,controllerName:this._controllerName,searchFilterConfigurationClassName:this._searchFilterConfigurationKey};autotask.ajax.postRequest(this._chooseFiltersDialogUrl,t,autotask.proxy(this._onChooseFiltersDialogSuccess,this)).dialog()},t}(),Autotask.ToggleManagement=function(){"use strict";function t(){}return t.prototype.__expandSectionByElement=function(t){var e=t.closest(".Section.Collapsed");if(null!==e){autotask.find(e.id).expand()}else{var i=t.closest(".DetailsSection.Collapsed");if(null!==i)autotask.find(i.id).expand()}},t.prototype.__initialize=function(){},t}(),function(){"use strict";window.Autotask.TransitionManagement=function(){this._activeCssClass="Active",this._fadeInCssClass="FadeIn",this._fadeOutCssClass="FadeOut"},window.Autotask.TransitionManagement.prototype={_activeCssClass:null,_fadeInCssClass:null,_fadeOutCssClass:null,__startFadeTransitionForContextOverlayContent:function(t){var e=this._findContextOverlayContainersContent(t);e&&e.classList.contains(this._activeCssClass)&&(e.classList.remove(this._fadeInCssClass),e.classList.add(this._fadeOutCssClass))},__stopFadeTransitionForContextOverlayContent:function(t){var e=this._findContextOverlayContainersContent(t);e&&e.classList.contains(this._fadeOutCssClass)&&(e.classList.remove(this._fadeOutCssClass),e.classList.add(this._fadeInCssClass))},_findContextOverlayContainersContent:function(t){for(var e=t;null!=e&&e.classList.contains("ContextOverlayContainer");)e=e.parentNode;return e?e.querySelector(".Content"):null}}}(),function(){"use strict";Autotask.Convert=function(){this._minimumDate=new Date(1753,0,2),this._maximumDate=new Date(9999,11,30)},Autotask.Convert.prototype={_dateConverter:null,_globalize:null,_maximumDate:null,_minimumDate:null,_timeConverter:null,currencyToDecimal:function(t,e){null==e&&(e=2);var i=Math.pow(10,e);return Math.round(this._globalize.parseFloat(t,10)*i)/i},dateToString:function(t,e){return this._dateConverter.toString(t,e)},decimalToString:function(t,e,i){null==e&&(e=4),null==i&&(i=!1);var n=this._globalize.format(t,"n"+e);if(e>0&&i){var o=autotask.culture._numberFormat.get_decimalSeparator(),a=n.split(o);a[1]=a[1].replace(/0+$/,""),0===a[1].length&&a.splice(1,1),n=a.join(o)}return n},decimalToCurrency:function(t,e){return null==e?this._globalize.format(t,"c"):this._globalize.format(t,"c"+e)},integerToString:function(t){return this._globalize.format(t,"n0")},integerToStringWithoutGroupSeparator:function(t){var e=this.integerToString(t),i=autotask.culture._numberFormat.get_groupSeparator(),n=new RegExp("["+i+"]","g");return e.replace(n,"")},timeToString:function(t,e){return this._timeConverter.toString(t,e)},stringToInteger:function(t){return Math.round(this._globalize.parseFloat(t,10))},dateToDateTimeString:function(t){return{date:this.dateToString(t),time:this.timeToString(t)}},dateTimeStringToDate:function(t,e){var i=this.stringToDate(t),n=this.stringToTime(e);return null===i||null===n?null:new Date(i.getFullYear(),i.getMonth(),i.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),0)},stringToDate:function(t,e){return this._dateConverter.toDate(t,e)},stringToDecimal:function(t,e){return null==e&&(e=4),this._calculateExponentialValue(Math.round(this._calculateExponentialValue(this._globalize.parseFloat(t,10),e)),-1*e)},stringToTime:function(t,e){return this._timeConverter.toTime(t,e)},__formatDateForGetRequest:function(t){var e=null;if(t instanceof Date){var i=t.getMonth()+1;i<10&&(i="0"+i);var n=t.getDate();n<10&&(n="0"+n),e=t.getFullYear()+"/"+i+"/"+n}return e},_calculateExponentialValue:function(t,e){return Number(t.toString()+"e"+e.toString())},_initialize:function(){this._globalize=autotask.culture._globalize,this._timeConverter=new Autotask.Convert.TimeConverter(this._globalize),this._dateConverter=new Autotask.Convert.DateConverter(this._globalize)},_formatString:function(t,e){for(var i="",n=0;;){var o=t.indexOf("{",n),a=t.indexOf("}",n);if(o<0&&a<0){i+=t.slice(n);break}if(a>0&&(a<o||o<0))"}"!==t.charAt(a+1)&&autotask.throwException("There is a curly-brace mismatch in the string format used in Convert.formatString()."),i+=t.slice(n,a+1),n=a+2;else if(i+=t.slice(n,o),n=o+1,"{"!==t.charAt(n)){a<0&&autotask.throwException("There is a curly-brace mismatch in the string format used in Convert.formatString().");var s=t.substring(n,a),r=s.indexOf(":"),l=parseInt(r<0?s:s.substring(0,r),10);isNaN(l)&&autotask.throwException("There should be numbers in the curly-braces in the string format used in Convert.formatString().");var _=r<0?"":s.substring(r+1),u=e[l];null==u&&(u=""),u.toFormattedString?i+=u.toFormattedString(_):u.format?i+=u.format(_):i+=u.toString(),n=a+1}else i+="{",n++}return i}}}(),function(){"use strict";window.Autotask.Culture=function(){this._globalize=null,this._culture=null},window.Autotask.Culture.prototype={_initialize:function(){this._setupGlobalize(),this._globalize=window.Globalize;var t=null;for(var e in this._globalize.cultures)if("default"!=e&&"en"!=e){t=e;break}this._globalize.culture(t),window.Globalize=null,this._culture=this._globalize.cultures[t],this._numberFormat=this._initializeNumberFormat(this._culture),this._calendarFormat=this._initializeCalendarFormat(this._culture)},_initializeNumberFormat:function(t){return{get_negativeSign:function(){return t.numberFormat["-"]},get_decimalSeparator:function(){return t.numberFormat["."]},get_groupSeparator:function(){return t.numberFormat[","]}}},_initializeCalendarFormat:function(t){var e=[0,1,2,3,4,5,6],i=t.calendar.firstDay;return i>0&&(e=e.concat(e.splice(0,i))),{get_dateSeparator:function(){return t.calendar["/"]},get_timeSeparator:function(){return t.calendar[":"]},get_anteMeridiem:function(){return t.calendar.AM},get_postMeridiem:function(){return t.calendar.PM},getPattern:function(e){return t.calendar.patterns[e]},get_orderedDays:function(){return e}}},_setupGlobalize:function(){window.___cultureInfo.DateTimeFormat.ShortDatePattern=window.___cultureInfoOverrides[0],window.___cultureInfo.DateTimeFormat.LongDatePattern=window.___cultureInfoOverrides[1],window.___cultureInfo.DateTimeFormat.ShortTimePattern=window.___cultureInfoOverrides[2],window.___cultureInfo.DateTimeFormat.LongTimePattern=window.___cultureInfoOverrides[3],window.___cultureInfo.DateTimeFormat.DateSeparator=window.___cultureInfoOverrides[4],window.___cultureInfo.DateTimeFormat.TimeSeparator=window.___cultureInfoOverrides[5],window.___cultureInfo.DateTimeFormat.FirstDayOfWeek=window.___cultureInfoOverrides[6],window.___cultureInfo.NumberFormat.CurrencySymbol=window.___cultureInfoOverrides[7],window.___cultureInfo.CurrencyNegativePattern=window.___cultureInfoOverrides[8],window.___cultureInfo.CurrencyPositivePattern=window.___cultureInfoOverrides[9],window.___cultureInfo.PercentNegativePattern=window.___cultureInfoOverrides[10],window.___cultureInfo.PercentPositivePattern=window.___cultureInfoOverrides[11],window.___cultureInfo.NumberFormat.CurrencyDecimalSeparator=window.___cultureInfoOverrides[12],window.___cultureInfo.NumberFormat.NumberDecimalSeparator=window.___cultureInfoOverrides[13],window.___cultureInfo.NumberFormat.PercentDecimalSeparator=window.___cultureInfoOverrides[14],window.___cultureInfo.NumberFormat.CurrencyGroupSeparator=window.___cultureInfoOverrides[15],window.___cultureInfo.NumberFormat.NumberGroupSeparator=window.___cultureInfoOverrides[16],window.___cultureInfo.NumberFormat.PercentGroupSeparator=window.___cultureInfoOverrides[17];var t=null;"en-US"===window.___cultureInfo.Name?t=window.Globalize.cultures.default.calendars.standard.AM:""!==window.___cultureInfo.DateTimeFormat.AMDesignator&&(t=[window.___cultureInfo.DateTimeFormat.AMDesignator,window.___cultureInfo.DateTimeFormat.AMDesignator,window.___cultureInfo.DateTimeFormat.AMDesignator]);var e=null;"en-US"===window.___cultureInfo.Name?e=window.Globalize.cultures.default.calendars.standard.PM:""!==window.___cultureInfo.DateTimeFormat.PMDesignator&&(e=[window.___cultureInfo.DateTimeFormat.PMDesignator,window.___cultureInfo.DateTimeFormat.PMDesignator,window.___cultureInfo.DateTimeFormat.PMDesignator]),window.Globalize.addCultureInfo(window.___cultureInfo.Name,"default",{name:window.___cultureInfo.Name,englishName:window.___cultureInfo.EnglishName,nativeName:window.___cultureInfo.NativeName,language:window.___cultureInfo.Language,numberFormat:{",":window.___cultureInfo.NumberFormat.NumberGroupSeparator,".":window.___cultureInfo.NumberFormat.NumberDecimalSeparator,percent:{pattern:[window.___cultureInfo.PercentNegativePattern,window.___cultureInfo.PercentPositivePattern],",":window.___cultureInfo.NumberFormat.PercentGroupSeparator,".":window.___cultureInfo.NumberFormat.PercentDecimalSeparator},currency:{pattern:[window.___cultureInfo.CurrencyNegativePattern,window.___cultureInfo.CurrencyPositivePattern],",":window.___cultureInfo.NumberFormat.CurrencyGroupSeparator,".":window.___cultureInfo.NumberFormat.CurrencyDecimalSeparator,symbol:window.___cultureInfo.NumberFormat.CurrencySymbol}},calendars:{standard:{"/":window.___cultureInfo.DateTimeFormat.DateSeparator,firstDay:window.___cultureInfo.DateTimeFormat.FirstDayOfWeek,days:{names:window.___cultureInfo.DateTimeFormat.DayNames,namesAbbr:window.___cultureInfo.DateTimeFormat.AbbreviatedDayNames,namesShort:window.___cultureInfo.DateTimeFormat.ShortestDayNames},months:{names:window.___cultureInfo.DateTimeFormat.MonthNames,namesAbbr:window.___cultureInfo.DateTimeFormat.AbbreviatedMonthNames},monthsGenitive:{names:window.___cultureInfo.DateTimeFormat.MonthGenitiveNames,namesAbbr:window.___cultureInfo.DateTimeFormat.AbbreviatedMonthGenitiveNames},AM:t,PM:e,patterns:{d:window.___cultureInfo.DateTimeFormat.ShortDatePattern,D:window.___cultureInfo.DateTimeFormat.LongDatePattern,t:window.___cultureInfo.DateTimeFormat.ShortTimePattern,T:window.___cultureInfo.DateTimeFormat.LongTimePattern,f:window.___cultureInfo.DateTimeFormat.LongDatePattern+" "+window.___cultureInfo.DateTimeFormat.ShortTimePattern,F:window.___cultureInfo.DateTimeFormat.FullDateTimePattern,M:window.___cultureInfo.DateTimeFormat.MonthDayPattern,Y:window.___cultureInfo.DateTimeFormat.YearMonthPattern}}}})}}}(),function(){"use strict";window.Autotask.Convert.DateConverter=function(t){this._globalize=t,this._format=autotask.culture._culture.calendar.patterns.d,this._separator=autotask.culture._calendarFormat.get_dateSeparator()},window.Autotask.Convert.DateConverter.prototype={_format:null,_formatKeys:null,_globalize:null,_separator:null,_formatWithoutYear:null,_formatList:null,_smallFormat:null,_smallMonthDayFormat:null,_get_formatWithoutYear:function(){if(null===this._formatWithoutYear){for(var t=this._format.split(this._separator),e=t.length-1;e>=0;e--)if(t[e].indexOf("yy")>=0){t.splice(e,1);break}this._formatWithoutYear=t.join(this._separator)}return this._formatWithoutYear},_get_formatKeys:function(){if(null===this._formatKeys){this._formatKeys=this._createDateContainer("","","");for(var t=Autotask.Convert.GlobalizeClone._getParseRegExp(this._format).groups,e=0;e<t.length;e++){var i=t[e];i.indexOf("d")>=0?this._formatKeys.day=i:i.indexOf("M")>=0?this._formatKeys.month=i:i.indexOf("yy")>=0&&(this._formatKeys.year=i)}}return this._formatKeys},_get_smallMonthDayFormat:function(){return null===this._smallMonthDayFormat&&(this._smallMonthDayFormat=this._format.replace(/M+/,"M").replace(/d+/,"d")),this._smallMonthDayFormat},_get_smallFormat:function(){return null===this._smallFormat&&(this._smallFormat=this._get_smallMonthDayFormat().replace(/y+/,"yy")),this._smallFormat},toDate:function(t,e){null==e&&(e="d");var i=null;if(/^[0-9]+$/.test(t))i=this._convertNumberToDate(t);else if(""!==t){var n=t.replace(/[\/\.\-]/gi,this._separator);if(!(i=this._globalize.parseDate(n,e))){var o=this._convertMalformedDate(n);i=this._globalize.parseDate(o)}}return i<this._minimumDate?i=new Date(this._minimumDate.valueOf()):i>this._maximumDate&&(i=new Date(this._maximumDate.valueOf())),i},toString:function(t,e){return null==e&&(e="d"),this._globalize.format(t,e)},_createDateContainer:function(t,e,i){return{month:t,day:e,year:i}},_convertNumberToDate:function(t){var e=null;if(6==t.length){var i={};i[this._format.indexOf("d").toString()]="dd",i[this._format.indexOf("M").toString()]="MM",i[this._format.indexOf("y").toString()]="yy";var n=[];for(var o in i)i.hasOwnProperty(o)&&n.push(parseInt(o,10));n.sort();for(var a="",s=0;s<n.length;s++)a+=i[n[s].toString()];e=this._globalize.parseDate(t,a)}return e},_convertMalformedDate:function(t){var e=null;return(e=this._reformatDateString(t,this._get_smallMonthDayFormat()))||(e=this._reformatDateString(t,this._get_smallFormat())),e||(e=this._reformatDateString(t,this._get_formatWithoutYear())),e},_reformatDateString:function(t,e){var i=null,n=Autotask.Convert.GlobalizeClone._getParseRegExp(e),o=new RegExp(n.regExp).exec(t),a=n.groups;if(o&&o.length==a.length+1){for(var s=this._get_formatKeys(),r=this._createDateContainer(null,null,null),l=0;l<a.length;l++)if(t=parseInt(o[l+1],10),a[l].indexOf("d")>=0){var _="dd"==s.day&&t<10?"0":"";r.day=_+t}else if(a[l].indexOf("M")>=0){var u="MM"==s.month&&t<10?"0":"";r.month=u+t}else a[l].indexOf("yy")>=0&&("yyyy"==s.year&&t<100&&(t=Autotask.Convert.GlobalizeClone._expandYear(t)),r.year=t.toString());if(s.year.length>0&&!r.year){var c=(new Date).getFullYear();"yy"==s.year&&(c=(c+="").substr(c.length-2)),r.year=c}var d=this._format;for(var h in s)s.hasOwnProperty(h)&&(d=d.replace(s[h],r[h]));/[dmy]+/.test(d)||(i=d)}return i}},window.Autotask.Convert.GlobalizeClone={_expandYear:function(t){var e=autotask.culture._culture.calendar,i=new Date,n=this._getEra(i);if(t<100){var o=e.twoDigitYearMax;o="string"==typeof o?(new Date).getFullYear()%100+parseInt(o,10):o;var a=this._getEraYear(i,e,n);(t+=a-a%100)>o&&(t-=100)}return t},_getParseRegExp:function(t,e){e||(e=autotask.culture._culture.calendar);for(var i,n=t.replace(/([\^\$\.\*\+\?\|\[\]\(\)\{\}])/g,"\\\\$1"),o=["^"],a=[],s=0,r=0,l=this._getTokenRegExp();null!==(i=l.exec(n));){var _=n.slice(s,i.index);if(s=l.lastIndex,(r+=this._appendPreOrPostMatch(_,o))%2)o.push(i[0]);else{var u=i[0],c=u.length,d=this._selectRegularExpressionGroup(u,c,e);null!==d&&o.push(d),a.push(i[0])}}return this._appendPreOrPostMatch(n.slice(s),o),o.push("$"),{regExp:o.join("").replace(/\s+/g,"\\s+"),groups:a}},_getTokenRegExp:function(){return/\/|dddd|ddd|dd|d|MMMM|MMM|MM|M|yyyy|yy|y|hh|h|HH|H|mm|m|ss|s|tt|t|fff|ff|f|zzz|zz|z|gg|g/g},_appendPreOrPostMatch:function(t,e){for(var i=0,n=!1,o=0,a=t.length;o<a;o++){var s=t.charAt(o);switch(s){case"'":n?e.push("'"):i++,n=!1;break;case"\\":n&&e.push("\\"),n=!n;break;default:e.push(s),n=!1}}return i},_getEra:function(t,e){if(!e)return 0;for(var i,n=t.getTime(),o=0,a=e.length;o<a;o++)if(null===(i=e[o].start)||n>=i)return o;return 0},_getEraYear:function(t,e,i,n){var o=t.getFullYear();return!n&&e.eras&&(o-=e.eras[i].offset),o},_selectRegularExpressionGroup:function(t,e,i){var n=null;switch(t){case"dddd":case"ddd":case"MMMM":case"MMM":case"gg":case"g":n="(\\D+)";break;case"tt":case"t":n="(\\D*)";break;case"yyyy":case"fff":case"ff":case"f":n="(\\d{"+e+"})";break;case"dd":case"d":case"MM":case"M":case"yy":case"y":case"HH":case"H":case"hh":case"h":case"mm":case"m":case"ss":case"s":n="(\\d\\d?)";break;case"zzz":n="([+-]?\\d\\d?:\\d{2})";break;case"zz":case"z":n="([+-]?\\d\\d?)";break;case"/":n="(\\"+i["/"]+")";break;default:throw"Invalid date format pattern '"+t+"'."}return n}}}(),function(){"use strict";window.Autotask.LocalizedText=function(){},window.Autotask.LocalizedText.prototype={_addBookmarkTitle:null,_alertDialogDefaultTitle:null,_alertDialogInformationTitle:null,_alertDialogSuccessTitle:null,_confirmationDialogDefaultTitle:null,_confirmationDialogConfirmationTitle:null,_confirmationDialogWarningTitle:null,_confirmButtonText:null,_denyButtonText:null,_elegantErrorText:null,_gridDeleteConfirmationDescription:null,_gridDeleteConfirmationHeading:null,_okayButtonText:null,_removeBookmarkTitle:null,__get_addBookmarkTitle:function(){return this._addBookmarkTitle},__set_addBookmarkTitle:function(t){this._addBookmarkTitle=t},_get_alertDialogDefaultTitle:function(){return this._alertDialogDefaultTitle},_set_alertDialogDefaultTitle:function(t){this._alertDialogDefaultTitle=t},_get_alertDialogInformationTitle:function(){return this._alertDialogInformationTitle},_set_alertDialogInformationTitle:function(t){this._alertDialogInformationTitle=t},_get_alertDialogSuccessTitle:function(){return this._alertDialogSuccessTitle},_set_alertDialogSuccessTitle:function(t){this._alertDialogSuccessTitle=t},_get_confirmationDialogDefaultTitle:function(){return this._confirmationDialogDefaultTitle},_set_confirmationDialogDefaultTitle:function(t){this._confirmationDialogDefaultTitle=t},_get_confirmationDialogConfirmationTitle:function(){return this._confirmationDialogConfirmationTitle},_set_confirmationDialogConfirmationTitle:function(t){this._confirmationDialogConfirmationTitle=t},_get_confirmationDialogWarningTitle:function(){return this._confirmationDialogWarningTitle},_set_confirmationDialogWarningTitle:function(t){this._confirmationDialogWarningTitle=t},_get_confirmButtonText:function(){return this._confirmButtonText},_set_confirmButtonText:function(t){this._confirmButtonText=t},_get_denyButtonText:function(){return this._denyButtonText},_set_denyButtonText:function(t){this._denyButtonText=t},__get_elegantErrorText:function(){return this._elegantErrorText},__set_elegantErrorText:function(t){this._elegantErrorText=t},_get_gridDeleteConfirmationDescription:function(){return this._gridDeleteConfirmationDescription},_set_gridDeleteConfirmationDescription:function(t){this._gridDeleteConfirmationDescription=t},_get_gridDeleteConfirmationHeading:function(){return this._gridDeleteConfirmationHeading},_set_gridDeleteConfirmationHeading:function(t){this._gridDeleteConfirmationHeading=t},_get_okayButtonText:function(){return this._okayButtonText},_set_okayButtonText:function(t){this._okayButtonText=t},__get_removeBookmarkTitle:function(){return this._removeBookmarkTitle},__set_removeBookmarkTitle:function(t){this._removeBookmarkTitle=t}}}(),function(){"use strict";window.Autotask.Convert.TimeConverter=function(t){this._globalize=t,this._format=autotask.culture._culture.calendar.patterns.t,this._formatUSTimeArray=[this._format,this._format.replace("m t","mt"),this._format.replace(":mm t"," t"),this._format.replace(":mm t","t")];var e=autotask.culture._calendarFormat.get_anteMeridiem();this._amSymbol=e&&e.length>0?e[0]:"";var i=autotask.culture._calendarFormat.get_postMeridiem();this._pmSymbol=i&&i.length>0?i[0]:""},window.Autotask.Convert.TimeConverter.prototype={_amSymbol:null,_globalize:null,_format:null,_formatUSTimeArray:null,_pmSymbol:null,toTime:function(t,e){null==e&&(e="t");var i=null;return/^[0-9]+$/.test(t)?i=this._convertNumberToTime(t):""!==t&&((i=this._globalize.parseDate(t))||(i=this._convertIncompleteTime(t)),i||(i=this._convertUSEnglishTypingFailure(t))),i},toString:function(t,e){return null==e&&(e="t"),this._globalize.format(t,e)},_convertIncompleteTime:function(t){var e=null,i=this._createParsedTime(t,this._format.replace(/[t]+/g,"").trim());return i&&(e=this._initializeDateTime(i)),e},_convertUSEnglishTypingFailure:function(t){var e=null;if("en-US"===autotask.culture._culture.name){for(var i=null,n=0;n<this._formatUSTimeArray.length&&null===i;n++)i=this._createParsedTime(t,this._formatUSTimeArray[n]);if(i&&i.meridiem){var o=i.meridiem.toLowerCase();o===this._amSymbol.charAt(0).toLowerCase()?o=this._amSymbol.toLowerCase():o===this._pmSymbol.charAt(0).toLowerCase()&&(o=this._pmSymbol.toLowerCase()),o!==this._pmSymbol.toLowerCase()&&o!==this._amSymbol.toLowerCase()||o&&i.hours>0&&i.hours<=12&&(o===this._pmSymbol.toLowerCase()&&i.hours<12?i.hours+=12:12===i.hours&&o===this._amSymbol.toLowerCase()&&(i.hours=0),null===i.minutes&&(i.minutes=0),e=this._initializeDateTime(i))}}return e},_convertNumberToTime:function(t){var e=null,i=this._parseNumericTime(t);return null!==i&&(e=this._initializeDateTime(i)),e},_createParsedTime:function(t,e){var i=window.Autotask.Convert.GlobalizeClone._getParseRegExp(e),n=new RegExp(i.regExp).exec(t),o=null;return n&&(o={hours:null,minutes:null,meridiem:null},i.groups.forEach((function(t,e){if(t.length>0){var i=t.charAt(0);"h"==i||"H"==i?o.hours=parseInt(n[e+1],10):"m"==i?o.minutes=parseInt(n[e+1],10):"t"==i&&(o.meridiem=n[e+1])}}))),o},_initializeDateTime:function(t){var e=null;return null!==t.hours&&null!==t.minutes&&t.hours<24&&t.minutes<60&&((e=new Date).setDate(1),e.setMonth(0),e.setHours(t.hours),e.setMinutes(t.minutes),e.setSeconds(0,0)),e},_parseNumericTime:function(t){var e=parseInt(t,10),i=null,n=null;if(t.length>=3&&t.charAt(0)&&e<=59)i=0,n=e;else if(e>=0&&e<=23)i=e,n=0;else if(e>=100&&e<=2359){var o=e/100;i=~~o,n=Math.round(100*(o-i))}return null===n||null===i||n>59||i>23?null:{hours:i,minutes:n}}}}(),Autotask.LocalStorageManagement=function(){"use strict";function t(){this._currentKey=0,this._storageChangedHandlers={}}return t.prototype._currentKey=null,t.prototype._storageChangedHandlers=null,t.prototype.__addStorageChangedHandler=function(t){return this._currentKey++,this._storageChangedHandlers[this._currentKey]=t,this._currentKey},t.prototype.__getItem=function(t){return window.localStorage.getItem(t)},t.prototype.__initialize=function(){window.addEventListener("storage",autotask.proxy(this._storageListener,this))},t.prototype.__removeItem=function(t){return window.localStorage.removeItem(t)},t.prototype.__removeStorageChangedPointer=function(t){void 0===this._storageChangedHandlers[t]&&autotask.throwException("The key does not exist."),delete this._storageChangedHandlers[t]},t.prototype.__setItem=function(t,e){try{window.localStorage.setItem(t,e)}catch(e){var i=0,n=0,o="";for(var a in window.localStorage)window.localStorage.hasOwnProperty(a)&&(n+=a.length+window.localStorage[a].length,i<100&&(o+=a+="|"),i++);var s="An exception occured setting a value in local storage. ";s+="key: "+t+" ",s+="used space: "+(n/1024).toFixed(2)+"kb ",s+="used length: "+n+" ",s+="first 100 keys: "+o+" ",s+="message: "+e.message+" ",autotask.throwException(s)}},t.prototype._storageListener=function(t){var e=t.key,i=t.newValue;for(var n in this._storageChangedHandlers)this._storageChangedHandlers.hasOwnProperty(n)&&this._storageChangedHandlers[n](e,i)},t}(),function(){"use strict";window.Autotask.BookmarkManagement=function(){this._selectedClass="Selected"},window.Autotask.BookmarkManagement.prototype={_addBookmarkUrl:null,_bookmarkButtonElement:null,_removeBookmarkUrl:null,_selectedClass:null,__set_addBookmarkUrl:function(t){this._addBookmarkUrl=t},__set_removeBookmarkUrl:function(t){this._removeBookmarkUrl=t},__initialize:function(){this._bookmarkButtonElement=document.querySelector(".TitleBarButton.Star")},__addBookmark:function(t,e,i){var n=this._createRequestData(t,e);n.allowOverwrite=!1;autotask.ajax.__restrictedPostRequest(this._addBookmarkUrl,n,(function(){autotask.siteNavigation.__updateBookmarks(!0),i()})).__addBookmark()},__removeBookmark:function(t,e,i){var n=this._createRequestData(t,e);autotask.ajax.__restrictedPostRequest(this._removeBookmarkUrl,n,(function(){autotask.siteNavigation.__updateBookmarks(!1),i()})).__removeBookmark()},__toggleBookmark:function(t,e){var i=this._createRequestData(t,e);this._bookmarkButtonElement.classList.contains(this._selectedClass)?this._removeBookmark(i):this._addBookmark(i)},_addBookmark:function(t){t.allowOverwrite=!1,autotask.ajax.__restrictedPostRequest(this._addBookmarkUrl,t,autotask.proxy(this._bookmarkAdded,this)).__addBookmark()},_bookmarkAdded:function(t){t&&(this._bookmarkButtonElement.classList.add(this._selectedClass),this._bookmarkButtonElement.setAttribute("title",autotask.localizedText.removeBookmarkTitle),autotask.siteNavigation.__updateBookmarks(!0))},_bookmarkRemoved:function(){this._bookmarkButtonElement.classList.remove(this._selectedClass),this._bookmarkButtonElement.setAttribute("title",autotask.localizedText.addBookmarkTitle),autotask.siteNavigation.__updateBookmarks(!1)},_createRequestData:function(t,e){var i={pageKey:t};return null!==e&&(i.primaryKeyValue=e),i},_removeBookmark:function(t){autotask.ajax.__restrictedPostRequest(this._removeBookmarkUrl,t,autotask.proxy(this._bookmarkRemoved,this)).__removeBookmark()}}}(),Autotask.CurrentWindowPage=function(t){"use strict";function e(e,i,n,o,a,s){t.call(this,e,i,n,o,a),this._isLoadingIndicatorEnabled=s}return autotask.inherit(e,t),e.prototype._isLoadingIndicatorEnabled=null,e.prototype.__open=function(t){this._isLoadingIndicatorEnabled&&autotask.overlayManagement.__showLoadingIndicator();var e=this.___buildUrl(t);window.location.assign(e)},e}(Autotask.PageCore),function(){"use strict";window.Autotask.LegacyPopupSettings=function(t,e,i,n,o,a,s,r,l,_,u){this._enableDirectories=t,this._enableLocationBar=e,this._enableMenuBar=i,this._enableStatusBar=n,this._enableToolBar=o,this._height=a,this._left=s,this._resizable=r,this._scrollable=l,this._top=_,this._width=u},window.Autotask.LegacyPopupSettings.prototype={_enableDirectories:null,_enableLocationBar:null,_enableMenuBar:null,_enableStatusBar:null,_enableToolBar:null,_height:null,_left:null,_resizable:null,_scrollable:null,_top:null,_width:null,get_height:function(){return this._height},set_height:function(t){this._height=t},get_left:function(){return this._left},set_left:function(t){this._left=t},get_resizable:function(){return this._resizable},set_resizable:function(t){this._resizable=t},get_top:function(){return this._top},set_top:function(t){this._top=t},get_width:function(){return this._width},set_width:function(t){this._width=t},__clone:function(){return new Autotask.LegacyPopupSettings(this._enableDirectories,this._enableLocationBar,this._enableMenuBar,this._enableStatusBar,this._enableToolBar,this._height,this._left,this._resizable,this._scrollable,this._top,this._width)},__toString:function(){var t=[];return this._height&&t.push("height="+this._height),this._width&&t.push("width="+this._width),this._top&&t.push("top="+this._top),this._left&&t.push("left="+this._left),t.push("status="+(this._enableStatusBar?1:0)),t.push("toolBar="+(this._enableToolBar?1:0)),t.push("menubar="+(this._enableMenuBar?1:0)),t.push("directories="+(this._enableDirectories?1:0)),t.push("resizable="+(this._resizable?1:0)),t.push("scrollbars="+(this._scrollable?1:0)),t.join()}}}(),Autotask.NavigationRoute=function(){"use strict";function t(t){this._page=t}return t.prototype._page=null,t.prototype.__navigate=function(){this._page.open(null)},t}(),Autotask.NewWindowPage=function(t){"use strict";function e(e,i,n,o,a,s){t.call(this,e,i,n,o,a),this._isAlwaysOpenedInNewWindow=s}return autotask.inherit(e,t),e.prototype._isAlwaysOpenedInNewWindow=null,e.prototype.__open=function(t){var e=this.___buildUrl(t),i=null;if(this._isAlwaysOpenedInNewWindow)i="_blank";else{i=this.__get_pageCode();var n=t||this.__get_defaultPrimaryParameterValue();null!=n&&(i+=(n=n.toString()).replace(/[,]/g,"_"))}var o=window.open(e,i);return o.focus(),o},e}(Autotask.PageCore),Autotask.PopupPage=function(t){"use strict";function e(e,i,n,o,a,s,r){t.call(this,e,i,n,o,a),this._isAlwaysOpenedInNewWindow=s,this._popupSettings=r}return autotask.inherit(e,t),e.prototype._isAlwaysOpenedInNewWindow=null,e.prototype._popupSettings=null,e.prototype.__open=function(t){var e=this.___buildUrl(t),i=null;if(this._isAlwaysOpenedInNewWindow)i="_blank";else{i=this.__get_pageCode();var n=t||this.__get_defaultPrimaryParameterValue();null!=n&&(i+=(n=n.toString()).replace(/[,]/g,"_"))}var o=this._popupSettings.__generateSettings(),a=window.open(e,i,o);return a.focus(),a},e}(Autotask.PageCore),Autotask.PopupSettings=function(){"use strict";function t(t,e,i,n,o){this._largeHeight=e,this._largeWidth=n,this._isScrollable=o,this._smallHeight=t,this._smallWidth=i}return t.prototype._largeHeight=null,t.prototype._largeWidth=null,t.prototype._isScrollable=null,t.prototype._smallHeight=null,t.prototype._smallWidth=null,t.prototype.__generateSettings=function(){var t=[],e=this._smallHeight;null!==this._largeHeight&&window.screen.availHeight>=this._largeHeight&&(e=this._largeHeight),t.push("height="+e);var i=this._smallWidth;return null!==this._largeWidth&&window.screen.availWidth>=this._largeWidth&&(i=this._largeWidth),t.push("width="+i),t.push("scrollbars="+(this._isScrollable?1:0)),t.push("resizable=1"),t.push("status=0"),t.push("toolBar=0"),t.push("menubar=0"),t.push("directories=0"),t.join()},t}(),function(){"use strict";Autotask.SiteNavigation=function(){this._isRefreshWorkListOverdue=!1,this._isRefreshWorkListSuspended=!1},Autotask.SiteNavigation.prototype={_isRefreshWorkListOverdue:null,_isRefreshWorkListSuspended:null,activateAndRefreshDashboard:function(){autotask.workspaceLocator.__get_workspace(!0).activateAndRefreshDashboard()},activateDashboard:function(t){autotask.workspaceLocator.__get_workspace(!0).activateDashboard(t)},disableTitleBarNavigationButton:function(){var t=autotask.find("TitleBarNavigationButton");t&&t.set_enabled(!1)},hideVisibleContextOverlay:function(){var t=autotask.workspaceLocator.__get_navigationWindow();t&&t.autotask.contextOverlayManagement.__hideVisibleContextOverlays()},userActivity:function(t){var e=autotask.workspaceLocator.__get_navigationWindow();e&&e.autotask.findPage().activity.resumeActivityActionFromLegacy(t)},navigateToHomePage:function(t){var e=autotask.workspaceLocator.__get_navigationWindow();e&&e.autotask.findPage().homepage.navigateToHomepage(t)},launchInWorkspace:function(t){autotask.workspaceLocator.__get_navigationWindow().autotask.findPage().__workspace.navigate(t)},updateAccountCount:function(){this._refreshCounts()},updateAppointmentCount:function(){this._refreshSchedule()},updateChangeRequestCount:function(){this._refreshCounts()},updateContactCount:function(){this._refreshCounts()},updateExpenseReportCount:function(){this._refreshCounts()},updateLiveLinks:function(){this._refreshLiveLinks()},updateQuoteCount:function(){this._refreshCounts()},updateNoteCount:function(){this._refreshCounts()},updateOpportunityCount:function(){this._refreshCounts()},updateSalesOrderCount:function(){this._refreshCounts()},updateServiceCallCount:function(){this._refreshCounts(),this._refreshSchedule()},updateProjectCount:function(){this._refreshCounts()},updateTaskCount:function(){this._refreshCounts()},updateTicketCount:function(){this._refreshCounts()},updateTimeOffRequestCount:function(){this._refreshCounts()},updateTimesheetCount:function(){this._refreshCounts()},updateToDoCount:function(){this._refreshCounts(),this._refreshSchedule()},updateUnpaidExpenseReportCount:function(){this._refreshCounts()},refresh:function(){var t=autotask.workspaceLocator.__get_navigationWindow();t&&(autotask.overlayManagement.__showLoadingIndicator(),t.location.reload(!0))},refreshBookmarks:function(t){this.__updateBookmarks(t)},refreshDashboardNavigation:function(){this._refreshDashboardNavigation()},refreshHompage:function(t){this._refreshHomepage(t)},refreshRecentItems:function(){this.__updateRecentItems()},refreshWorkList:function(){this._isRefreshWorkListSuspended?this._isRefreshWorkListOverdue=!0:(this._isRefreshWorkListOverdue=!1,this._refreshWorkList())},resumeRefreshWorkListActivity:function(){this._isRefreshWorkListSuspended=!1,this._isRefreshWorkListOverdue&&(this._isRefreshWorkListOverdue=!1,this._refreshWorkList())},signOutUser:function(){window.location="/Mvc/Framework/Authentication.mvc/InvalidateSession"},suspendRefreshWorkListActivity:function(){this._isRefreshWorkListSuspended=!0},__navigate:function(t){t.__navigate()},__openPage:function(t){t.__open(null)},__updateBookmarks:function(t){var e=autotask.workspaceLocator.__get_realTimeDataManager();e&&e.refreshBookmarks(t)},__updateRecentItems:function(){var t=autotask.workspaceLocator.__get_realTimeDataManager();t&&t.refreshRecentItems()},_refreshCounts:function(){var t=autotask.workspaceLocator.__get_realTimeDataManager();t&&t.refreshMyEntities()},_refreshDashboardNavigation:function(){var t=autotask.workspaceLocator.__get_dashboardNavigationManagement();t&&t.refreshDashboardNavigation()},_refreshHomepage:function(t){var e=autotask.workspaceLocator.__get_homepageManagement();e&&e.__refreshHomepage(t)},_refreshLiveLinks:function(){var t=autotask.workspaceLocator.__get_realTimeDataManager();t&&t.refreshLiveLinks()},_refreshSchedule:function(){var t=autotask.workspaceLocator.__get_realTimeDataManager();t&&t.refreshSchedule()},_refreshWorkList:function(){var t=autotask.workspaceLocator.__get_realTimeDataManager();t&&t.refreshWorkList()}}}(),Autotask.Url=function(){"use strict";function t(t){this._querystring=null,this._other="",this._isConcatenationMode=!1;var e=/(.*)\?([^\?#]*)(.*)/gi.exec(t);null===e?this._url=t:(this._url=e[1],e.length>3&&(this._querystring=this._parseQueryString(e[2]),4==e.length&&(this._other=e[3])))}return t.prototype._isConcatenationMode=null,t.prototype._other=null,t.prototype._querystring=null,t.prototype._url=null,t.prototype.get_isConcatenationMode=function(){return this._isConcatenationMode},t.prototype.set_isConcatenationMode=function(t){this._isConcatenationMode=t},t.prototype.add=function(t,e){return this._querystring||(this._querystring={}),this._querystring[t]=e,this},t.prototype.remove=function(t){return this._querystring&&delete this._querystring[t],this},t.prototype.toQueryString=function(t){var e=this._convertToQueryString(this._querystring),i=this._convertToQueryString(t);e.length>0&&i.length>0&&(i=(this._isConcatenationMode?"":"&")+i);return e+i},t.prototype.toString=function(t){var e=this.toUrlString(),i=this.toQueryString(t);return e+(!this._isConcatenationMode&&e.length>0&&i.length>0?"?":"")+i+this._other},t.prototype.toUrlString=function(){return this._url},t.prototype._convertToQueryString=function(t){var e,i="",n=!0,o=this._isConcatenationMode?"":"=",a=this._isConcatenationMode?"":"&";if(t)for(var s in t)t.hasOwnProperty(s)&&(e=s+o+(null===t[s]?"":t[s]),i+=n?e:a+e,n=!1);return i},t.prototype._parseQueryString=function(t){for(var e=t.split("&"),i={},n=0;n<e.length;n++){var o=e[n].split("="),a=o[0];if(a.length>0){var s=o.length>0?o[1]:"";i[a]=s}}return i},t}(),window.Autotask.WindowManagement=function(){"use strict";function t(){this._refreshDelegates={},this._windowCleanUpData=[]}return t.prototype._windowCleanUpData=null,t.prototype._refreshDelegates=null,t.prototype._onBeforeUnload=function(){for(var t=null,e=null,i=null,n=null,o=null,a=0;a<this._windowCleanUpData.length;a++)if(e=(t=this._windowCleanUpData[a]).url,i=t.createDataDelegate(),void 0!==window.navigator.sendBeacon){for(var s in n=new FormData,i)i.hasOwnProperty(s)&&n.append(s,i[s]);window.navigator.sendBeacon(e,n)}else(o=new XMLHttpRequest).open("post",e,!1),o.send(i)},t.prototype.addRefreshDelegate=function(t,e){this._refreshDelegates[t]=e},t.prototype.addWindowCleanUp=function(t,e){var i={createDataDelegate:t,url:e};this._windowCleanUpData.push(i)},t.prototype.clearWindowCleanUpData=function(){this._windowCleanUpData.splice(0)},t.prototype.isWindowInWorkspace=function(){var t=!1;window.parent!=window&&(t=null!==window.parent.document.getElementById("PageContainerFrame"));return t},t.prototype.isWindowOpenerAccessible=function(){var t=!1;if(null!==window.opener&&void 0!==window.opener)try{t=!window.opener.closed&&window.origin===window.opener.origin}catch{}return t},t.prototype.openPage=function(t,e,i){i?t.__openInNewWindow(e):t.__open(e)},t.prototype.refresh=function(t,e){for(var i in this._refreshDelegates)this._refreshDelegates.hasOwnProperty(i)&&this._refreshDelegates[i](t,e)},t.prototype.refreshParent=function(t){try{this.isWindowOpenerAccessible()&&void 0!==window.opener.refresh&&window.opener.refresh()}catch(t){}!0===t&&window.close()},t.prototype.removeRefreshDelegate=function(t){delete this._refreshDelegates[t]},t.prototype.__disableScrollRestoration=function(){window.history.scrollRestoration="manual"},t.prototype.__initialize=function(){var t=this;window.addEventListener("beforeunload",(function(){t._onBeforeUnload()}))},t}(),function(){"use strict";Autotask.WorkspaceLocator=function(){},Autotask.WorkspaceLocator.prototype={__get_dashboardNavigationManagement:function(){var t=this.__get_navigationWindow();return t&&t.autotask&&t.autotask.findPage()&&t.autotask.findPage().__dashboardNavigation?t.autotask.findPage().__dashboardNavigation:null},__get_homepageManagement:function(){var t=this.__get_navigationWindow();return t&&t.autotask&&t.autotask.findPage()&&t.autotask.findPage().homepage?t.autotask.findPage().homepage:null},__get_realTimeDataManager:function(){var t=this.__get_navigationWindow();return t&&t.autotask&&t.autotask.findPage()&&t.autotask.findPage().__realTimeData?t.autotask.findPage().__realTimeData:null},__get_securityManagement:function(){var t=this.__get_navigationWindow();return t&&t.autotask&&t.autotask.findPage()&&t.autotask.findPage().security?t.autotask.findPage().security:null},__get_navigationWindow:function(){var t=null,e=window.top;if(this._isNavigationWindow(e))t=e;else try{for(var i=e.opener,n=[];i;){if(n.push(i),this._isNavigationWindow(i)){t=i;break}if(i=i.top,this._isNavigationWindow(i)){t=i;break}if(n.push(i),i=i.opener,n.indexOf(i)>-1)break}}catch(t){}return t},__get_workspace:function(t){var e=null;return t?e=this.__get_navigationWindow():this._isNavigationWindow(window)&&(e=window),e&&e.autotask&&e.autotask.findPage()?e.autotask.findPage().__workspace:null},_isNavigationWindow:function(t){return t.autotask&&t.autotask.isLandingPage}}}(),Autotask.WorkspacePage=function(t){"use strict";function e(e,i,n,o,a,s,r){t.call(this,e,i,n,o,a),this._isWindowOpenerUsedInWorkspaceRetrieval=s,this._isLoadingIndicatorEnabled=r}return autotask.inherit(e,t),e.prototype._isLoadingIndicatorEnabled=null,e.prototype._isWindowOpenerUsedInWorkspaceRetrieval=null,e.prototype.__open=function(t){var e=autotask.workspaceLocator.__get_workspace(this._isWindowOpenerUsedInWorkspaceRetrieval),i=this.___buildUrl(t);!e&&this._isWindowOpenerUsedInWorkspaceRetrieval?autotask.throwException("This page is instructed to open in the workspace, but the workspace can not be found."):e?(this._showLoadingIndicator(e),e.navigate(i)):window.location=i},e.prototype._showLoadingIndicator=function(t){var e=new Autotask.Navigation.PageLoadingEventArgs(this._isLoadingIndicatorEnabled);t.onBeginPageLoading(e)},e}(Autotask.PageCore),Autotask.MessageBarContainer=function(){"use strict";function t(t,e){this._id=t,this._container=document.getElementById(t),this._instanceTrackerKey=e,autotask.instanceManagement.__addRegistrationKey(this,this._id),this._activeCssClass="Active"}return t.prototype._container=null,t.prototype._activeCssClass=null,t.prototype._id=null,t.prototype._instanceTrackerKey=null,t.prototype.removeAll=function(){var t=this._container.querySelectorAll(".MessageBar");this._removeMessageBars(t)},t.prototype.remove=function(t){var e=this._container.querySelectorAll('[data-message-bar-key="'+t+'"]');this._removeMessageBars(e)},t.prototype.addMessageBars=function(t,e){var i=this;new Autotask.AddMessageBarsRoute(t).sendAddMessageBarsRequest(e,(function(t){i.__loadHtmlAndJavaScript(t)}))},t.prototype.__dispose=function(){autotask.instanceTrackerManagement.__findInstanceTracker(this._instanceTrackerKey).__dispose()},t.prototype.__loadHtmlAndJavaScript=function(t){var e=t.htmlForInstanceTrackerContainer,i=t.script;this._container.insertAdjacentHTML("afterbegin",e),autotask.instanceTrackerManagement.__findInstanceTracker(this._instanceTrackerKey).__loadScript(i),this._container.classList.add(this._activeCssClass)},t.prototype._removeMessageBars=function(t){for(var e=0;e<t.length;e++){t[e].remove()}0===this._container.children.length&&this._container.classList.remove(this._activeCssClass)},t}(),window.Autotask.AddMessageBarsRoute=function(){"use strict";function t(t){this._requestCoordinator=new Autotask.AjaxRequestCoordinator("GET",t)}return t.prototype._requestCoordinator=null,t.prototype._onResponseProcessing=function(t,e){!0!==t.isResponseEmpty&&e(new Autotask.AjaxResponseHtmlAndJavaScript(t.htmlJavaScriptPair))},t.prototype.sendAddMessageBarsRequest=function(t,e){var i=null;null!==t&&(i=t.__data);var n=new Autotask.AjaxRequestData(i,!1).__serialize(),o=this;this._requestCoordinator.__sendRequest(n,(function(t){o._onResponseProcessing(t,e)}),null,!1,"AddMessageBars");return new Autotask.AjaxRequestCanceler((function(){o._requestCoordinator.__cancelRequest()}))},t}(),function(){"use strict";window.Autotask.ContextOverlayActionEventArgs=function(){},window.Autotask.ContextOverlayActionEventArgs.prototype={__currentTarget:null,__isMouseEvent:null}}(),function(){"use strict";window.Autotask.ContextOverlayAssociation=function(t,e){this._launchingElement=t,this._overlayContainerId=e},window.Autotask.ContextOverlayAssociation.prototype={_clientInstanceTracker:null,_hidingTimeoutId:null,_launchingElement:null,_overlayHtml:null,_overlayContainerId:null,_showingTimeoutId:null,get_overlay:function(){return this._overlayHtml.get_overlay()},get_launchingElement:function(){return this._launchingElement},get_overlayHtml:function(){return this._overlayHtml},set_overlayHtml:function(t){this._overlayHtml=t},__dispose:function(){null!==this._clientInstanceTracker&&(this._clientInstanceTracker.__dispose(),this._clientInstanceTracker=null)},hide:function(t,e){this._overlayHtml.hide(),this._overlayHtml.removeCssClasses(this._launchingElement),t&&this._overlayHtml.resetPositioning(),e&&(this._overlayHtml.removeContent(),null!==this._clientInstanceTracker&&(this._clientInstanceTracker.__dispose(),this._clientInstanceTracker=null)),this._overlayHtml.unbindMouseEvents()},isEqual:function(t){return this._launchingElement==t.get_launchingElement()},isEqualToLaunchingElement:function(t){return this._launchingElement==t},loadContent:function(t,e){this._overlayHtml.loadHtml(t),null===this._clientInstanceTracker&&(this._clientInstanceTracker=new Autotask.InstanceTracker(this._overlayContainerId,null)),this._clientInstanceTracker.__clearInstancesAndLoadScript(e)},position:function(t){var e=this.get_launchingElement();this._overlayHtml.position(e,t)},show:function(t,e,i,n){this._overlayHtml.show(t,e,i,n)},startHidingTimer:function(t,e){0===e?(t(),this._hidingTimeoutId=null):this._hidingTimeoutId=window.setTimeout(t,e)},startShowingTimer:function(t,e){this._showingTimeoutId=window.setTimeout(t,e)},stopHidingTimer:function(){null!==this._hidingTimeoutId&&window.clearTimeout(this._hidingTimeoutId)},stopShowingTimer:function(){window.clearTimeout(this._showingTimeoutId)}}}(),Autotask.ContextOverlayDirectionPriority=function(){"use strict";function t(){}return t.prototype._firstPriorityDirection=null,t.prototype._secondPriorityDirection=null,t.prototype._thirdPriorityDirection=null,t.prototype._fourthPriorityDirection=null,t.prototype.get_firstPriorityDirection=function(){return this._firstPriorityDirection},t.prototype.set_firstPriorityDirection=function(t){this._firstPriorityDirection=t},t.prototype.get_secondPriorityDirection=function(){return this._secondPriorityDirection},t.prototype.set_secondPriorityDirection=function(t){this._secondPriorityDirection=t},t.prototype.get_thirdPriorityDirection=function(){return this._thirdPriorityDirection},t.prototype.set_thirdPriorityDirection=function(t){this._thirdPriorityDirection=t},t.prototype.get_fourthPriorityDirection=function(){return this._fourthPriorityDirection},t.prototype.set_fourthPriorityDirection=function(t){this._fourthPriorityDirection=t},t}(),function(){"use strict";window.Autotask.ContextOverlayEventsManagement=function(){this._mousePointerType="mouse",this._isTouchEvent=!1},window.Autotask.ContextOverlayEventsManagement.prototype={_hideFunctionPointer:null,_isTouchEvent:null,_mousePointerType:null,_showFunctionPointer:null,_clickHandler:null,_mouseEnterHandler:null,_mouseLeaveHandler:null,_touchStartHandler:null,_touchEndHandler:null,_onClick:function(t,e){(null===t||e.currentTarget.contains(e.target.closest(t)))&&(this._isTouchEvent=!1)},_onMouseEnter:function(t,e){if((null===t||e.target.matches(t))&&!this._isTouchEvent){var i=this._createContextOverlayActionEventArgs(e,!0);this._performShowAction(i)}},_onMouseLeave:function(t,e){if((null===t||e.target.matches(t))&&!this._isTouchEvent){var i=this._createContextOverlayActionEventArgs(e,!0);this._performHideAction(i)}},_onTouchEnd:function(t,e){if(null===t||e.currentTarget.contains(e.target.closest(t))){var i=this._createContextOverlayActionEventArgs(e,!1);this._performShowAction(i)}},_onTouchStart:function(t,e){(null===t||e.currentTarget.contains(e.target.closest(t)))&&(this._isTouchEvent=!0)},__registerSelection:function(t,e,i,n){this._showFunctionPointer=i,this._hideFunctionPointer=n,this._clickHandler=autotask.proxy(this._onClick,this,e),this._mouseEnterHandler=autotask.proxy(this._onMouseEnter,this,e),this._mouseLeaveHandler=autotask.proxy(this._onMouseLeave,this,e),this._touchStartHandler=autotask.proxy(this._onTouchStart,this,e),this._touchEndHandler=autotask.proxy(this._onTouchEnd,this,e);var o=null!==e;t.addEventListener("click",this._clickHandler),t.addEventListener("mouseenter",this._mouseEnterHandler,o),t.addEventListener("mouseleave",this._mouseLeaveHandler,o),t.addEventListener("touchstart",this._touchStartHandler,{capture:o,passive:!0}),t.addEventListener("touchend",this._touchEndHandler,o)},__unregisterSelection:function(t,e){var i=null!==e;t.removeEventListener("click",this._clickHandler),t.removeEventListener("mouseenter",this._mouseEnterHandler,i),t.removeEventListener("mouseleave",this._mouseLeaveHandler,i),t.removeEventListener("touchstart",this._touchStartHandler,{capture:i,passive:!0}),t.removeEventListener("touchend",this._touchEndHandler,i)},_createContextOverlayActionEventArgs:function(t,e){var i=new Autotask.ButtonActionEventArgs;return i.__isMouseEvent=e,i.__currentTarget=t.target,i},_performHideAction:function(t){void 0!==this._hideFunctionPointer&&null!==this._hideFunctionPointer&&this._hideFunctionPointer(t)},_performShowAction:function(t){void 0!==this._showFunctionPointer&&this._showFunctionPointer&&this._showFunctionPointer(t)}}}(),function(){"use strict";window.Autotask.ContextOverlayHidingEventArgs=function(t){this._launchingElement=t},window.Autotask.ContextOverlayHidingEventArgs.prototype={_launchingElement:null,get_launchingElement:function(){return this._launchingElement}}}(),function(){"use strict";window.Autotask.ContextOverlayHtml=function(t){this._activeCssClass="Active",this._isVisible=!1,this._launchingElementPositioningCssClasses=[],this._positioningCssClasses=[],this._showingCssClasses=[],this._overlay=t,this._content=t.querySelector(".Content"),this._loadingIndicator=t.querySelector(".LoadingIndicator"),this._arrow=t.querySelector(":scope > .Arrow:not(.Outline)"),this._arrowOutline=t.querySelector(":scope > .Arrow.Outline"),this._eventsManagement=new Autotask.ContextOverlayEventsManagement},window.Autotask.ContextOverlayHtml.prototype={_arrow:null,_arrowOutline:null,_content:null,_loadingIndicator:null,_overlay:null,_activeCssClass:null,_eventsManagement:null,_isVisible:null,_launchingElementPositioningCssClasses:null,_positioningCssClasses:null,_showingCssClasses:null,get_overlay:function(){return this._overlay},get_isVisible:function(){return this._isVisible},hide:function(){this._overlay.classList.remove(this._activeCssClass),this._content.classList.remove(this._activeCssClass),null!==this._loadingIndicator&&this._loadingIndicator.classList.remove(this._activeCssClass),this._isVisible=!1},loadHtml:function(t){null!==this._loadingIndicator&&this._loadingIndicator.classList.remove(this._activeCssClass),this._content.innerHTML=t,this._content.classList.add(this._activeCssClass)},position:function(t,e){var i=new Autotask.ContextOverlayLocationCalculator(this._overlay,t,this._arrow,this._arrowOutline,e);i.calculate();var n=i.get_left(),o=i.get_top(),a=i.get_cssClass(),s=i.get_launchingElementCssClass();this._removePositioningCssClasses(t),null!==s&&this._addLaunchingElementPositioningCssClass(t,s),null!==a&&this._addPositioningCssClass(this._overlay,a),null!==e.get_cssClass()&&this._addPositioningCssClass(this._overlay,e.get_cssClass()),this._overlay.style.left=n+"px",this._overlay.style.top=o+"px"},removeContent:function(){this._content.innerHTML=""},removeCssClasses:function(t){this._removeCssClasses(this._overlay,this._showingCssClasses),this._removePositioningCssClasses(t)},resetPositioning:function(){this._overlay.setAttribute("style",""),AutotaskDomSystem.Document.getChildElementByClassName(this._overlay,"Content").setAttribute("style","")},show:function(t,e,i,n){null!==n&&this._addShowingCssClass(this._overlay,n),this._eventsManagement.__registerSelection(this._overlay,null,t,e),i?this._loadingIndicator.classList.add(this._activeCssClass):this._content.classList.add(this._activeCssClass),this._overlay.classList.add(this._activeCssClass),this._isVisible=!0},unbindMouseEvents:function(){this._eventsManagement.__unregisterSelection(this._overlay,null)},_addPositioningCssClass:function(t,e){this._positioningCssClasses.push(e),t.classList.add(e)},_addShowingCssClass:function(t,e){this._showingCssClasses.push(e),t.classList.add(e)},_addLaunchingElementPositioningCssClass:function(t,e){this._launchingElementPositioningCssClasses.push(e),t.classList.add(e)},_removeCssClasses:function(t,e){if(e.length>0)for(var i=0;i<e.length;i++)t.classList.remove(e[i])},_removePositioningCssClasses:function(t){this._removeCssClasses(this._overlay,this._positioningCssClasses),this._removeCssClasses(t,this._launchingElementPositioningCssClasses),this._positioningCssClasses=[],this._launchingElementPositioningCssClasses=[]}}}(),function(){"use strict";window.Autotask.ContextOverlayHtmlManager=function(t){var e=t.querySelectorAll(".ContextOverlay");this._overlayHtml1=new Autotask.ContextOverlayHtml(e[0]),e.length>1&&(this._overlayHtml2=new Autotask.ContextOverlayHtml(e[1]))},window.Autotask.ContextOverlayHtmlManager.prototype={_overlayHtml1:null,_overlayHtml2:null,getAvailableOverlayHtml:function(){return this._overlayHtml1.get_isVisible()&&null!==this._overlayHtml2?this._overlayHtml2:this._overlayHtml1}}}(),function(){"use strict";window.Autotask.ContextOverlayLocation=function(t,e){this._arrowAdjustment=1,this._left=0,this._top=0,this._arrow=t,this._arrowOutline=e},window.Autotask.ContextOverlayLocation.prototype={_arrow:null,_arrowOutline:null,_arrowAdjustment:null,_cssClass:null,_launchingElementCssClass:null,_left:null,_top:null,get_cssClass:function(){return this._cssClass},get_launchingElementCssClass:function(){return this._launchingElementCssClass},get_left:function(){return this._left},get_top:function(){return this._top},addToArrowAdjustment:function(t){this._arrowAdjustment+=t},setupPosition:function(t,e,i,n,o,a){this._left=o,this._top=a,this._orientArrow(e,i,n),this._cssClass=t.get_cssClass(),this._launchingElementCssClass=t.get_launchingElementCssClass()},_orientArrow:function(t,e,i){var n=null!==i?i:this._arrowAdjustment;null!==this._arrow&&(this._arrow.setAttribute("class",""),this._arrow.setAttribute("style",""),this._arrow.classList.add(t),this._arrow.classList.add("Arrow"),this._arrow.setAttribute("style",e+": "+n+"px")),null!==this._arrowOutline&&(this._arrowOutline.setAttribute("class",""),this._arrowOutline.setAttribute("style",""),this._arrowOutline.classList.add(t),this._arrowOutline.classList.add("Outline"),this._arrowOutline.classList.add("Arrow"),this._arrowOutline.setAttribute("style",e+": "+n+"px"))}}}(),Autotask.ContextOverlayLocationCalculator=function(){"use strict";function t(t,e,i,n,o){this._positioningEventArgs=o,this._overlay=t,this._overlayOuterHeight=t.offsetHeight,this._overlayHeightOffset=this._overlayOuterHeight-AutotaskDomSystem.Other.getComputedStyle(t).height,this._overlayWidthOffset=t.offsetWidth-AutotaskDomSystem.Other.getComputedStyle(t).width,this._margin=5,this._initializeMeasurements(e),this._location=new Autotask.ContextOverlayLocation(i,n)}return t.prototype._overlay=null,t.prototype._documentHeight=null,t.prototype._documentWidth=null,t.prototype._launchingElementLeftOffset=null,t.prototype._launchingElementTopOffset=null,t.prototype._location=null,t.prototype._margin=null,t.prototype._overlayHeightOffset=null,t.prototype._overlayOuterHeight=null,t.prototype._overlayWidthOffset=null,t.prototype._positioningEventArgs=null,t.prototype.get_cssClass=function(){return this._location.get_cssClass()},t.prototype.get_launchingElementCssClass=function(){return this._location.get_launchingElementCssClass()},t.prototype.get_left=function(){return this._location.get_left()},t.prototype.get_top=function(){return this._location.get_top()},t.prototype.calculate=function(){var t=this._positioningEventArgs.__get_priority(),e=[];null!==t.get_firstPriorityDirection()&&e.push(t.get_firstPriorityDirection()),null!==t.get_secondPriorityDirection()&&e.push(t.get_secondPriorityDirection()),null!==t.get_thirdPriorityDirection()&&e.push(t.get_thirdPriorityDirection()),null!==t.get_fourthPriorityDirection()&&e.push(t.get_fourthPriorityDirection()),0===e.length&&autotask.throwException("At least one direction priority must be set.");for(var i=!1,n=0;n<e.length;n++)if(this._attemptLocation(e[n])){i=!0;break}if(!i)for(var o=0;o<e.length&&!this._forceLocation(e[o]);o++);},t.prototype._applyHeightOverrideCss=function(t,e){var i=t-this._overlayHeightOffset,n=e-this._overlayHeightOffset,o=AutotaskDomSystem.Document.getChildElementByClassName(this._overlay,"Content");o.style.minHeight=i.toString()+"px",o.style.maxHeight=n.toString()+"px"},t.prototype._applyWidthOverrideCss=function(t,e){var i=t-this._overlayWidthOffset,n=e-this._overlayWidthOffset,o=AutotaskDomSystem.Document.getChildElementByClassName(this._overlay,"Content");o.style.minWidth=i.toString()+"px",o.style.maxWidth=n.toString()+"px",this._overlay.style.maxWidth=n.toString()+"px"},t.prototype._attemptBottomLocation=function(){var t=this._documentHeight-(this._launchingElementTopOffset+this._positioningEventArgs.__get_launchingElementHeight()+this._positioningEventArgs.get_bottomPosition().get_topOffset()+this._margin),e=this._documentWidth-(this._launchingElementLeftOffset+this._positioningEventArgs.get_bottomPosition().get_leftOffset()+this._margin),i=!1;return this._attemptHeightSetup(this._positioningEventArgs.get_bottomPosition(),t,!1)&&(i=this._attemptWidthSetup(this._positioningEventArgs.get_bottomPosition(),e,!0))&&this._forceBottomLocation(),i},t.prototype._attemptHeightSetup=function(t,e,i){var n=!1,o=this._overlayOuterHeight,a=this._positioningEventArgs.__get_overlayMinimumHeightOverride(),s=this._positioningEventArgs.__get_overlayMaximumHeightOverride();return null!==a?a+this._positioningEventArgs.__get_overlayVerticalMarginOverride()<e&&(e<s+this._positioningEventArgs.__get_overlayVerticalMarginOverride()&&(s=e-this._positioningEventArgs.__get_overlayVerticalMarginOverride()-1),this._applyHeightOverrideCss(a,s),n=!0):o<e&&(n=!0),!n&&i&&(n=this._attemptVerticalSlide(t,e)),n},t.prototype._attemptHorizontalSlide=function(t,e){var i=!1;if(t.get_isSlidingEnabled()){var n=this._positioningEventArgs.__get_overlayWidth(),o=this._positioningEventArgs.__get_overlayMinimumWidthOverride();null!==o&&(n=o,this._applyWidthOverrideCss(o,this._positioningEventArgs.__get_overlayMaximumWidthOverride()));var a=n-e;t.set_leftOffset(t.get_leftOffset()-a),this._location.addToArrowAdjustment(a),i=!0}return i},t.prototype._attemptLeftLocation=function(){var t=this._launchingElementLeftOffset-this._positioningEventArgs.get_leftPosition().get_leftOffset()-this._margin,e=this._documentHeight-(this._launchingElementTopOffset+this._positioningEventArgs.get_leftPosition().get_topOffset()+this._margin),i=!1;return this._attemptWidthSetup(this._positioningEventArgs.get_leftPosition(),t,!1)&&(i=this._attemptHeightSetup(this._positioningEventArgs.get_leftPosition(),e,!0))&&this._forceLeftLocation(),i},t.prototype._attemptLocation=function(t){var e=!1;switch(t){case Autotask.ContextOverlayPositionDirection.Bottom:e=this._attemptBottomLocation();break;case Autotask.ContextOverlayPositionDirection.Left:e=this._attemptLeftLocation();break;case Autotask.ContextOverlayPositionDirection.Right:e=this._attemptRightLocation();break;case Autotask.ContextOverlayPositionDirection.Top:e=this._attemptTopLocation();break;default:autotask.throwException('The "_attemptLocation" method on "ContextOverlayLocationCalculator" has a switch statement with an invalid case.')}return e},t.prototype._attemptRightLocation=function(){var t=this._documentWidth-(this._launchingElementLeftOffset+this._positioningEventArgs.__get_launchingElementWidth()+this._positioningEventArgs.get_rightPosition().get_leftOffset()+this._margin),e=this._documentHeight-(this._launchingElementTopOffset+this._positioningEventArgs.get_rightPosition().get_topOffset()+this._margin),i=!1;return this._attemptWidthSetup(this._positioningEventArgs.get_rightPosition(),t,!1)&&(i=this._attemptHeightSetup(this._positioningEventArgs.get_rightPosition(),e,!0))&&this._forceRightLocation(),i},t.prototype._attemptTopLocation=function(){var t=this._launchingElementTopOffset-this._margin,e=this._documentWidth-(this._launchingElementLeftOffset+this._positioningEventArgs.get_topPosition().get_leftOffset()+this._margin),i=!1;return this._attemptHeightSetup(this._positioningEventArgs.get_topPosition(),t,!1)&&(i=this._attemptWidthSetup(this._positioningEventArgs.get_topPosition(),e,!0))&&this._forceTopLocation(),i},t.prototype._attemptVerticalSlide=function(t,e){var i=!1;if(t.get_isSlidingEnabled()){var n=this._overlayOuterHeight,o=this._positioningEventArgs.__get_overlayMinimumHeightOverride();null!==o&&(n=o,this._applyHeightOverrideCss(o,this._positioningEventArgs.__get_overlayMaximumHeightOverride()));var a=n-e;t.set_topOffset(t.get_topOffset()-a),this._location.addToArrowAdjustment(a),i=!0}return i},t.prototype._attemptWidthSetup=function(t,e,i){var n=!1,o=this._positioningEventArgs.__get_overlayWidth(),a=this._positioningEventArgs.__get_overlayMinimumWidthOverride(),s=this._positioningEventArgs.__get_overlayMaximumWidthOverride();return null!==a?a+this._positioningEventArgs.__get_overlayHorizontalMarginOverride()<e&&(e<s+this._positioningEventArgs.__get_overlayHorizontalMarginOverride()&&(s=e-this._positioningEventArgs.__get_overlayHorizontalMarginOverride()-1),this._applyWidthOverrideCss(a,s),n=!0):o<e&&(n=!0),!n&&i&&(n=this._attemptHorizontalSlide(t,e)),n},t.prototype._calculateCenteringArrowAdjustment=function(t,e){var i=null;if(this._positioningEventArgs.__get_isArrowCentered()){i=0;i=t/2-9-1-e}return i},t.prototype._forceBottomLocation=function(){var t=this._launchingElementLeftOffset+this._positioningEventArgs.get_bottomPosition().get_leftOffset(),e=this._launchingElementTopOffset+this._positioningEventArgs.__get_launchingElementHeight()+this._positioningEventArgs.get_bottomPosition().get_topOffset(),i=this._positioningEventArgs.get_bottomPosition().get_leftOffset(),n=this._calculateCenteringArrowAdjustment(this._positioningEventArgs.__get_launchingElementWidth(),i);this._location.setupPosition(this._positioningEventArgs.get_bottomPosition(),"Bottom","left",n,t,e)},t.prototype._forceLeftLocation=function(){var t=this._launchingElementLeftOffset-this._overlay.offsetWidth+this._positioningEventArgs.get_leftPosition().get_leftOffset(),e=this._launchingElementTopOffset+this._positioningEventArgs.get_leftPosition().get_topOffset(),i=this._positioningEventArgs.get_leftPosition().get_topOffset(),n=this._calculateCenteringArrowAdjustment(this._positioningEventArgs.__get_launchingElementHeight(),i);this._location.setupPosition(this._positioningEventArgs.get_leftPosition(),"Left","top",n,t,e)},t.prototype._forceLocation=function(t){var e=!1;switch(t){case Autotask.ContextOverlayPositionDirection.Bottom:this._forceBottomLocation(),e=!0;break;case Autotask.ContextOverlayPositionDirection.Left:this._forceLeftLocation(),e=!0;break;case Autotask.ContextOverlayPositionDirection.Right:this._forceRightLocation(),e=!0;break;case Autotask.ContextOverlayPositionDirection.Top:this._forceTopLocation(),e=!0;break;default:autotask.throwException('The "_forceLocation" method on "ContextOverlayLocationCalculator" has a switch statement with an invalid case.')}return e},t.prototype._forceRightLocation=function(){var t=this._launchingElementLeftOffset+this._positioningEventArgs.__get_launchingElementWidth()+this._positioningEventArgs.get_rightPosition().get_leftOffset(),e=this._launchingElementTopOffset+this._positioningEventArgs.get_rightPosition().get_topOffset(),i=this._positioningEventArgs.get_rightPosition().get_topOffset(),n=this._calculateCenteringArrowAdjustment(this._positioningEventArgs.__get_launchingElementHeight(),i);this._location.setupPosition(this._positioningEventArgs.get_rightPosition(),"Right","top",n,t,e)},t.prototype._forceTopLocation=function(){var t=this._launchingElementLeftOffset+this._positioningEventArgs.get_topPosition().get_leftOffset(),e=this._launchingElementTopOffset-this._overlay.offsetHeight+this._positioningEventArgs.get_topPosition().get_topOffset(),i=this._positioningEventArgs.get_topPosition().get_leftOffset(),n=this._calculateCenteringArrowAdjustment(this._positioningEventArgs.__get_launchingElementWidth(),i);this._location.setupPosition(this._positioningEventArgs.get_topPosition(),"Top","left",n,t,e)},t.prototype._initializeMeasurements=function(t){this._documentHeight=document.documentElement.clientHeight,this._documentWidth=document.documentElement.clientWidth,this._launchingElementLeftOffset=AutotaskDomSystem.Other.positionOffset(t).left,this._launchingElementTopOffset=AutotaskDomSystem.Other.positionOffset(t).top-window.scrollY},t}(),function(){"use strict";window.Autotask.ContextOverlayPosition=function(){this._enabled=!0,this._isSlidingEnabled=!0,this._leftOffset=0,this._topOffset=0},window.Autotask.ContextOverlayPosition.prototype={_cssClass:null,_enabled:null,_isSlidingEnabled:null,_launchingElementCssClass:null,_leftOffset:null,_topOffset:null,get_cssClass:function(){return this._cssClass},set_cssClass:function(t){this._cssClass=t},get_isSlidingEnabled:function(){return this._isSlidingEnabled},set_isSlidingEnabled:function(t){this._isSlidingEnabled=t},get_launchingElementCssClass:function(){return this._launchingElementCssClass},set_launchingElementCssClass:function(t){this._launchingElementCssClass=t},get_leftOffset:function(){return this._leftOffset},set_leftOffset:function(t){this._leftOffset=t},get_topOffset:function(){return this._topOffset},set_topOffset:function(t){this._topOffset=t}}}(),Autotask.ContextOverlayPositionDirection={Bottom:"Bottom",Left:"Left",Right:"Right",Top:"Top"},Autotask.ContextOverlayPositioningEventArgs=function(){"use strict";function t(t,e){this._isArrowCentered=!1,this._launchingElementHeight=t.offsetHeight,this._launchingElementWidth=t.offsetWidth,this._overlayWidth=e.offsetWidth,this._overlay=e,this._bottomPosition=new Autotask.ContextOverlayPosition,this._leftPosition=new Autotask.ContextOverlayPosition,this._rightPosition=new Autotask.ContextOverlayPosition,this._topPosition=new Autotask.ContextOverlayPosition;var i=new Autotask.ContextOverlayDirectionPriority;i.set_firstPriorityDirection(Autotask.ContextOverlayPositionDirection.Bottom),i.set_secondPriorityDirection(Autotask.ContextOverlayPositionDirection.Top),i.set_thirdPriorityDirection(Autotask.ContextOverlayPositionDirection.Right),i.set_fourthPriorityDirection(Autotask.ContextOverlayPositionDirection.Left),this._priority=i}return t.prototype._overlay=null,t.prototype._bottomPosition=null,t.prototype._cssClass=null,t.prototype._isArrowCentered=null,t.prototype._launchingElementHeight=null,t.prototype._launchingElementWidth=null,t.prototype._leftPosition=null,t.prototype._overlayHorizontalMarginOverride=null,t.prototype._overlayMaximumHeightOverride=null,t.prototype._overlayMaximumWidthOverride=null,t.prototype._overlayMinimumHeightOverride=null,t.prototype._overlayMinimumWidthOverride=null,t.prototype._overlayVerticalMarginOverride=null,t.prototype._overlayWidth=null,t.prototype._priority=null,t.prototype._rightPosition=null,t.prototype._topPosition=null,t.prototype.get_bottomPosition=function(){return this._bottomPosition},t.prototype.get_cssClass=function(){return this._cssClass},t.prototype.set_cssClass=function(t){this._cssClass=t},t.prototype.get_leftPosition=function(){return this._leftPosition},t.prototype.get_rightPosition=function(){return this._rightPosition},t.prototype.get_topPosition=function(){return this._topPosition},t.prototype.__get_isArrowCentered=function(){return this._isArrowCentered},t.prototype.__set_isArrowCentered=function(t){this._isArrowCentered=t},t.prototype.__get_launchingElementHeight=function(){return this._launchingElementHeight},t.prototype.__get_launchingElementWidth=function(){return this._launchingElementWidth},t.prototype.__get_overlayHorizontalMarginOverride=function(){return this._overlayHorizontalMarginOverride},t.prototype.__get_overlayMaximumHeightOverride=function(){return this._overlayMaximumHeightOverride},t.prototype.__get_overlayMaximumWidthOverride=function(){return this._overlayMaximumWidthOverride},t.prototype.__get_overlayMinimumHeightOverride=function(){return this._overlayMinimumHeightOverride},t.prototype.__get_overlayMinimumWidthOverride=function(){return this._overlayMinimumWidthOverride},t.prototype.__get_overlayVerticalMarginOverride=function(){return this._overlayVerticalMarginOverride},t.prototype.__get_overlayWidth=function(){return this._overlayWidth},t.prototype.__get_priority=function(){return this._priority},t.prototype.__overridePriority=function(t){this._priority=t},t.prototype.__setOverlaySizeOverrideValues=function(t,e,i,n,o,a){this._overlayMinimumWidthOverride=t,this._overlayMaximumWidthOverride=e,this._overlayMinimumHeightOverride=i,this._overlayMaximumHeightOverride=n,this._overlayHorizontalMarginOverride=o,this._overlayVerticalMarginOverride=a},t}(),Autotask.ContextOverlayShowingEventArgs=function(){"use strict";function t(t){this._launchingElement=t,this._allowedConcurrentlyVisibleOverlays=[]}return t.prototype._allowedConcurrentlyVisibleOverlays=null,t.prototype._cssClass=null,t.prototype._launchingElement=null,t.prototype.get_launchingElement=function(){return this._launchingElement},t.prototype.get_allowedConcurrentlyVisibleOverlays=function(){return this._allowedConcurrentlyVisibleOverlays},t.prototype.get_cssClass=function(){return this._cssClass},t.prototype.set_cssClass=function(t){this._cssClass=t},t.prototype.addAllowedConcurrentlyVisibleOverlay=function(t){this._allowedConcurrentlyVisibleOverlays.push(t)},t}(),window.Autotask.OverlayManagement=function(){"use strict";function t(){this._cssClassActive="Active",this._delayNotificationCount=0,this._dialogCount=0,this._isBackgroundOverlayActive=!1,this._loadingIndicatorCount=0,this._zIndexBaseline=1e4,this._zIndexForDelayNotification=2e4,this._zIndexForLoadingIndicator=25e3}return t.prototype._backgroundOverlay=null,t.prototype._delayNotification=null,t.prototype._loadingIndicator=null,t.prototype._cssClassActive=null,t.prototype._delayNotificationCount=null,t.prototype._dialogCount=null,t.prototype._isBackgroundOverlayActive=null,t.prototype._loadingIndicatorCount=null,t.prototype._zIndexBaseline=null,t.prototype._zIndexForDelayNotification=null,t.prototype._zIndexForLoadingIndicator=null,t.prototype.__set_isLoadingIndicatorEnabledOnRender=function(t){!0===t&&this._loadingIndicatorCount++},t.prototype.__hideDelayNotification=function(){this._delayNotificationCount--,0===this._delayNotificationCount?(this._delayNotification.classList.remove(this._cssClassActive),this._hideBackgroundOverlay()):this._delayNotificationCount<0&&autotask.throwException("The delay notification count cannot drop below zero and the current value is: "+this._delayNotificationCount)},t.prototype.__isDialogVisible=function(){return this._dialogCount>0},t.prototype.__hideLoadingIndicator=function(){this._loadingIndicatorCount--,0===this._loadingIndicatorCount?(this._loadingIndicator.classList.remove(this._cssClassActive),this._hideBackgroundOverlay()):this._loadingIndicatorCount<0&&autotask.throwException("The loading indicator count cannot drop below zero and the current value is: "+this._loadingIndicatorCount)},t.prototype.__initialize=function(){this._backgroundOverlay=document.getElementById("BackgroundOverlay"),this._delayNotification=document.getElementById("DelayNotification"),this._loadingIndicator=document.getElementById("LoadingIndicator")},t.prototype.__pullDialogOffStack=function(t,e){null!==t?t.classList.remove(this._cssClassActive):e(),this._dialogCount--,this._hideBackgroundOverlay()},t.prototype.__pushDialogOnStack=function(t,e){this._dialogCount++,this._showBackgroundOverlay();var i=this._calculateDialogDepth();null!==t?(t.style.zIndex=i,t.classList.add(this._cssClassActive)):e(i)},t.prototype.__showDelayNotification=function(){if(this._delayNotificationCount++,1===this._delayNotificationCount){var t=this._zIndexForDelayNotification+1;this._delayNotification.style.zIndex=t,this._delayNotification.classList.add(this._cssClassActive),this._showBackgroundOverlay()}},t.prototype.__showLoadingIndicator=function(){this._loadingIndicatorCount++,1===this._loadingIndicatorCount&&(this._loadingIndicator.classList.add(this._cssClassActive),this._showBackgroundOverlay())},t.prototype.__turnOnUnselectable=function(){for(var t=this._backgroundOverlay.querySelectorAll("*"),e=0;e<t.length;e++)t[e].setAttribute("unselectable","on");this._backgroundOverlay.setAttribute("unselectable","on")},t.prototype._adjustBackgroundOverlayDepth=function(t){this._backgroundOverlay.style.zIndex=t},t.prototype._calculateBackgroundDepth=function(){var t=0;return this._loadingIndicatorCount>0?t=this._zIndexForLoadingIndicator:this._delayNotificationCount>0?t=this._zIndexForDelayNotification:this._dialogCount>0&&(t=this._zIndexBaseline+2*this._dialogCount),t},t.prototype._calculateDialogDepth=function(){return this._zIndexBaseline+2*this._dialogCount+1},t.prototype._hideBackgroundOverlay=function(){var t=this._calculateBackgroundDepth();0===t?(this._backgroundOverlay.classList.remove(this._cssClassActive),this._isBackgroundOverlayActive=!1):this._adjustBackgroundOverlayDepth(t)},t.prototype._showBackgroundOverlay=function(){var t=this._calculateBackgroundDepth();this._isBackgroundOverlayActive||(this._backgroundOverlay.classList.add(this._cssClassActive),this._isBackgroundOverlayActive=!0),this._adjustBackgroundOverlayDepth(t)},t}(),window.Autotask.EntityCategorySelectionPage=function(){"use strict";function t(t,e,i,n,o,a){autotask.instanceManagement.__addRegistrationKey(this,t),autotask.registerPage(this),this._dropDownListId=e,this._entityNewPage=i,this._noSelectionErrorMessage=n,this._isAuthenticated=o;var s=new window.AutotaskDirtyStateSystem.DirtyStateManagement;this.dirtyState=new window.AutotaskDirtyStateSystem.PageFacade(s),this.__dirtyState=new window.AutotaskDirtyStateSystem.InternalPageFacade(s);var r=new window.AutotaskButtonEventsSystem.ButtonEventsManagement;this.__buttonEvents=new window.AutotaskButtonEventsSystem.InternalPageFacade(r),this._sessionExpirationManagement=new AutotaskSessionExpirationSystem.SessionExpirationManagement(t,!1,a),this.__sessionExpiration=new AutotaskSessionExpirationSystem.InternalPageFacade(this._sessionExpirationManagement)}return t.prototype.dirtyState=null,t.prototype.__buttonEvents=null,t.prototype.__dirtyState=null,t.prototype.__sessionExpiration=null,t.prototype._dropDownList=null,t.prototype._dropDownListId=null,t.prototype._entityNewPage=null,t.prototype._isAuthenticated=null,t.prototype._noSelectionErrorMessage=null,t.prototype._sessionExpirationManagement=null,t.prototype.__entityCategoryButtonClick=function(t){this._openEntityNewPage(t)},t.prototype.__okButtonClick=function(){var t=this._dropDownList.get_value();t.length>0?this._openEntityNewPage(t):this._displayNoSelectionErrorMessage()},t.prototype.__skipButtonClick=function(t){this._openEntityNewPage(t)},t.prototype.__initialize=function(){this._dropDownList=autotask.find(this._dropDownListId),this._isAuthenticated&&!autotask.windowManagement.isWindowInWorkspace()&&this._sessionExpirationManagement.__initialize()},t.prototype._alertDialogOkay=function(){this._dropDownList.focus()},t.prototype._displayNoSelectionErrorMessage=function(){var t=new Autotask.AlertDialogOptions;t.set_operation(Autotask.AlertDialogOptions.Operation.Information),t.set_description(this._noSelectionErrorMessage),t.set_okayPointer(autotask.proxy(this._alertDialogOkay,this)),autotask.alertDialog.show(t)},t.prototype._openEntityNewPage=function(t){autotask.overlayManagement.__showLoadingIndicator();var e={categoryId:t};this._entityNewPage.applyDynamicParameters(e),this._entityNewPage.__open(null)},t}(),window.Autotask.EntityDetailPage=function(t){"use strict";function e(e,i,n,o,a,s,r,l,_,u){t.call(this,e,_,u),this._activityTabShellId=i,this._accessoryTabShellId=n,this._imageViewerId=o,this._quickEditPage=a,this._quickEditEventHandler=s,this._quickEditTokenValueParameterName=r,this._quickEditOffsetParameterName=l}return autotask.inherit(e,t),e.prototype._accessoryTabShell=null,e.prototype._accessoryTabShellId=null,e.prototype._activityTabShell=null,e.prototype._activityTabShellId=null,e.prototype._imageViewer=null,e.prototype._imageViewerId=null,e.prototype._quickEditEventHandler=null,e.prototype._quickEditPage=null,e.prototype._quickEditOnStartPointer=null,e.prototype._quickEditOffsetParameterName=null,e.prototype._quickEditTokenValueParameterName=null,e.prototype.__get_imageViewer=function(){return this._imageViewer},e.prototype.setQuickEditStarting=function(t){this._quickEditOnStartPointer=t},e.prototype.refreshActivityTab=function(){this._activityTabShell.__refreshConversation()},e.prototype.refreshCurrentAccessoryTab=function(t){this._accessoryTabShell.__refreshCurrentTab(t)},e.prototype.__activateQuickEditing=function(e,i){if(null!==this._quickEditPage){var n=this,o=function(){n._openQuickEditPage(e,i)},a=function(){t.prototype.get_saveCoordinator.call(n).beginSaving(o)};if(null!==this._quickEditEventHandler){var s=new AutotaskQuickEditSystem.QuickEditEventArgs(a);this._quickEditEventHandler(s)}else a()}},e.prototype.__initialize=function(){t.prototype.__initialize.call(this),this._accessoryTabShell=autotask.find(this._accessoryTabShellId),this._activityTabShell=autotask.find(this._activityTabShellId),this._imageViewer=autotask.find(this._imageViewerId)},e.prototype.___createSaveCoordinator=function(){return new AutotaskSaveCoordinatorSystem.EntityDetailSaveCoordinator},e.prototype._openQuickEditPage=function(t,e){autotask.overlayManagement.__showLoadingIndicator();var i=autotask.quickEditManagement.quickEditOffset(t,e),n=new Autotask.QuickEditEventArgs;null!==this._quickEditOnStartPointer&&this._quickEditOnStartPointer(n),n.add(this._quickEditTokenValueParameterName,e),n.add(this._quickEditOffsetParameterName,i),this._quickEditPage.applyDynamicParameters(n.__applyValues(null)),this._quickEditPage.__open(null)},e}(Autotask.EntityPage),window.Autotask.ReplaceEntityDetailPageBodyContentRoute=function(){"use strict";function t(t){this._requestCoordinator=new Autotask.AjaxRequestCoordinator("POST",t)}return t.prototype._requestCoordinator=null,t.prototype._onResponseProcessing=function(t,e){var i=new Autotask.AjaxResponseHtmlAndJavaScript(t.htmlJavaScriptPair);e(i.htmlForInstanceTrackerContainer,i.script,t.helpId)},t.prototype.__makeRequest=function(t,e){var i=null;null!==t&&(i=t.__data);var n=new Autotask.AjaxRequestData(i,!0).__serialize(),o=this;this._requestCoordinator.__sendRequest(n,(function(t){o._onResponseProcessing(t,e)}),null,!0,"ReplaceEntityDetailBody")},t}(),window.Autotask.ReplaceEntityDetailPageDetailsContentRoute=function(){"use strict";function t(t){this._requestCoordinator=new Autotask.AjaxRequestCoordinator("POST",t)}return t.prototype._requestCoordinator=null,t.prototype._onResponseProcessing=function(t,e){var i=new Autotask.AjaxResponseHtmlAndJavaScript(t.htmlJavaScriptPair);e(i.htmlForInstanceTrackerContainer,i.script,t.helpId)},t.prototype.__makeRequest=function(t,e){var i=null;null!==t&&(i=t.__data);var n=new Autotask.AjaxRequestData(i,!0).__serialize(),o=this;this._requestCoordinator.__sendRequest(n,(function(t){o._onResponseProcessing(t,e)}),null,!0,"ReplaceEntityDetailDetails")},t}(),window.Autotask.EntityEditPage=function(t){"use strict";function e(e,i,n,o,a,s,r,l,_,u,c){t.call(this,e,u,c),this._accessoryTabShellId=a,this._activityTabShellId=o,this._detailsSecondaryContainer=document.getElementById(i),this._imageViewerId=s,this._modelParameterName=_,this._primaryContentPostedDataContainer=document.getElementById(n),this._quickEditToken=r,this._quickEditOffset=l,this._hasQuickEditOccurred=!1,this._immutableData=[]}return autotask.inherit(e,t),e.prototype._accessoryTabShell=null,e.prototype._accessoryTabShellId=null,e.prototype._activityTabShell=null,e.prototype._activityTabShellId=null,e.prototype._detailsSecondaryContainer=null,e.prototype._detailsValidation=null,e.prototype._hasQuickEditOccurred=null,e.prototype._imageViewer=null,e.prototype._imageViewerId=null,e.prototype._modelParameterName=null,e.prototype._notificationSlideOut=null,e.prototype._primaryContentPostedDataContainer=null,e.prototype._primaryContentValidation=null,e.prototype._quickEditToken=null,e.prototype._quickEditOffset=null,e.prototype._immutableData=null,e.prototype.get_hasQuickEditOccurred=function(){return this._hasQuickEditOccurred},e.prototype.__get_imageViewer=function(){return this._imageViewer},e.prototype._onSaveCoordinatorSubmitting=function(e){for(var i=e.data.__data,n=[this._detailsSecondaryContainer,this._primaryContentPostedDataContainer],o=new AutotaskRequestDataSystem.SerializedRequestData(n),a=0;a<this._immutableData.length;a++)o.__addImmutableData(this._immutableData[a]);if(i[this._modelParameterName]=o,null!==this._notificationSlideOut){var s=this._notificationSlideOut.get_panel();i[s.__get_postingModelParameterName()]=s.__createSerializedRequestData()}t.prototype.get_saveCoordinator.call(this);var r=t.prototype.get_customValidationSummary.call(this);autotask.ajax.__restrictedPostRequest(e.url,i,(function(t){e.successHandler(t)})).__deprecatedSubmit(r)},e.prototype._onSaveCoordinatorValidating=function(){return this.validate()},e.prototype.refreshActivityTab=function(){this._activityTabShell.__refreshConversation()},e.prototype.refreshCurrentAccessoryTab=function(t){this._accessoryTabShell.__refreshCurrentTab(t)},e.prototype.validate=function(){return this._validate(!1)},e.prototype.validateEditor=function(t){var e=null,i=null;return"function"==typeof t.validate?e=i=t.validate():(e=this._detailsValidation.__validateLegacyEditor(t.__get_id(),!1),i=this._primaryContentValidation.__validateLegacyEditor(t.__get_id(),!1)),e||this._detailsValidation.__validationFailed(),this._detailsValidation.__validationCompleted(e,!1),i||this._primaryContentValidation.__validationFailed(),this._primaryContentValidation.__validationCompleted(i,!1),e&&i},e.prototype.__addImmutableData=function(t){this._immutableData.push(t)},e.prototype.__setNotificationSlideOut=function(t){this._notificationSlideOut=t},e.prototype.__finalize=function(){this._detailsValidation.__parse(),this._primaryContentValidation.__parse(),null!==this._quickEditToken&&(autotask.quickEditManagement.scrollToToken(this._quickEditToken,this._quickEditOffset),autotask.overlayManagement.__hideLoadingIndicator(),this._hasQuickEditOccurred=!0)},e.prototype.__initialize=function(){t.prototype.__initialize.call(this),this._accessoryTabShell=autotask.find(this._accessoryTabShellId),this._activityTabShell=autotask.find(this._activityTabShellId),this._imageViewer=autotask.find(this._imageViewerId),this._detailsValidation=new Autotask.PostedContainerValidation(this._detailsSecondaryContainer),this._detailsValidation.__registerValidationSummary(this.___get_validationSummary()),this._primaryContentValidation=new Autotask.PostedContainerValidation(this._primaryContentPostedDataContainer),this._primaryContentValidation.__registerValidationSummary(this.___get_validationSummary()),this.___get_validationSummary().__addValidationFailed(autotask.proxy(this._validationFailedHandler,this)),null!==this._quickEditToken&&autotask.overlayManagement.__set_isLoadingIndicatorEnabledOnRender(!0)},e.prototype.__resetValidation=function(){this._detailsValidation.__reset(),this._primaryContentValidation.__reset(),this.___get_validationSummary().__get_isActive()&&this._validate(!0)},e.prototype.___createSaveCoordinator=function(){return new AutotaskSaveCoordinatorSystem.EntityEditSaveCoordinator(autotask.proxy(this._onSaveCoordinatorValidating,this),autotask.proxy(this._onSaveCoordinatorSubmitting,this))},e.prototype._validate=function(t){var e=this._validateDetails(t),i=this._validatePrimaryContent(t);return e&&i},e.prototype._validateDetails=function(t){var e=this._detailsValidation.__validate();return e||this._detailsValidation.__validationFailed(),this._detailsValidation.__validationCompleted(e,t),e},e.prototype._validatePrimaryContent=function(t){var e=this._primaryContentValidation.__validate();return e||this._primaryContentValidation.__validationFailed(),this._primaryContentValidation.__validationCompleted(e,t),e},e.prototype._validationFailedHandler=function(){null!==this._notificationSlideOut&&this._notificationSlideOut.hide()},e}(Autotask.EntityPage),window.Autotask.ReplaceEntityEditPageBodyContentRoute=function(){"use strict";function t(t){this._requestCoordinator=new Autotask.AjaxRequestCoordinator("POST",t)}return t.prototype._requestCoordinator=null,t.prototype._onResponseProcessing=function(t,e){var i=new Autotask.AjaxResponseHtmlAndJavaScript(t.htmlJavaScriptPair);e(i.htmlForInstanceTrackerContainer,i.script,t.helpId)},t.prototype.__makeRequest=function(t,e){var i=null;null!==t&&(i=t.__data);var n=new Autotask.AjaxRequestData(i,!0).__serialize(),o=this;this._requestCoordinator.__sendRequest(n,(function(t){o._onResponseProcessing(t,e)}),null,!0,"ReplaceEntityEditBody")},t}(),window.Autotask.ReplaceEntityEditPageDetailsContentRoute=function(){"use strict";function t(t){this._requestCoordinator=new Autotask.AjaxRequestCoordinator("POST",t)}return t.prototype._requestCoordinator=null,t.prototype._onResponseProcessing=function(t,e){var i=new Autotask.AjaxResponseHtmlAndJavaScript(t.htmlJavaScriptPair);e(i.htmlForInstanceTrackerContainer,i.script,t.helpId)},t.prototype.__makeRequest=function(t,e){var i=null;null!==t&&(i=t.__data);var n=new Autotask.AjaxRequestData(i,!0).__serialize(),o=this;this._requestCoordinator.__sendRequest(n,(function(t){o._onResponseProcessing(t,e)}),null,!0,"ReplaceEntityEditDetails")},t}(),window.Autotask.EntityNewPage=function(t){"use strict";function e(e,i,n,o,a,s){t.call(this,e,a,s),this._detailsSecondaryContainer=document.getElementById(i),this._modelParameterName=o,this._primaryContentPostedDataContainer=document.getElementById(n),this._immutableData=[]}return autotask.inherit(e,t),e.prototype._detailsSecondaryContainer=null,e.prototype._detailsValidation=null,e.prototype._modelParameterName=null,e.prototype._notificationSlideOut=null,e.prototype._primaryContentPostedDataContainer=null,e.prototype._primaryContentValidation=null,e.prototype._immutableData=null,e.prototype._onSaveCoordinatorSubmitting=function(e){for(var i=e.data.__data,n=[this._detailsSecondaryContainer,this._primaryContentPostedDataContainer],o=new AutotaskRequestDataSystem.SerializedRequestData(n),a=0;a<this._immutableData.length;a++)o.__addImmutableData(this._immutableData[a]);if(i[this._modelParameterName]=o,null!==this._notificationSlideOut){var s=this._notificationSlideOut.get_panel();i[s.__get_postingModelParameterName()]=s.__createSerializedRequestData()}t.prototype.get_saveCoordinator.call(this);var r=t.prototype.get_customValidationSummary.call(this);autotask.ajax.__restrictedPostRequest(e.url,i,(function(t){e.successHandler(t)})).__deprecatedSubmit(r)},e.prototype._onSaveCoordinatorValidating=function(){return this.validate()},e.prototype.validate=function(){return this._validate(!1)},e.prototype.validateEditor=function(t){var e=null,i=null;return"function"==typeof t.validate?e=i=t.validate():(e=this._detailsValidation.__validateLegacyEditor(t.__get_id(),!1),i=this._primaryContentValidation.__validateLegacyEditor(t.__get_id(),!1)),e||this._detailsValidation.__validationFailed(),this._detailsValidation.__validationCompleted(e,!1),i||this._primaryContentValidation.__validationFailed(),this._primaryContentValidation.__validationCompleted(i,!1),e&&i},e.prototype.__addImmutableData=function(t){this._immutableData.push(t)},e.prototype.__setNotificationSlideOut=function(t){this._notificationSlideOut=t},e.prototype.__finalize=function(){this._detailsValidation.__parse(),this._primaryContentValidation.__parse()},e.prototype.__initialize=function(){t.prototype.__initialize.call(this),this._detailsValidation=new Autotask.PostedContainerValidation(this._detailsSecondaryContainer),this._detailsValidation.__registerValidationSummary(this.___get_validationSummary()),this._primaryContentValidation=new Autotask.PostedContainerValidation(this._primaryContentPostedDataContainer),this._primaryContentValidation.__registerValidationSummary(t.prototype.___get_validationSummary.call(this)),this.___get_validationSummary().__addValidationFailed(autotask.proxy(this._validationFailedHandler,this))},e.prototype.__resetValidation=function(){this._detailsValidation.__reset(),this._primaryContentValidation.__reset(),this.___get_validationSummary().__get_isActive()&&this._validate(!0)},e.prototype.___createSaveCoordinator=function(){return new AutotaskSaveCoordinatorSystem.EntityNewSaveCoordinator(autotask.proxy(this._onSaveCoordinatorValidating,this),autotask.proxy(this._onSaveCoordinatorSubmitting,this))},e.prototype.___resize=function(){},e.prototype._validate=function(t){var e=this._validateDetails(t),i=this._validatePrimaryContent(t);return e&&i},e.prototype._validateDetails=function(t){var e=this._detailsValidation.__validate();return e||this._detailsValidation.__validationFailed(),this._detailsValidation.__validationCompleted(e,t),e},e.prototype._validatePrimaryContent=function(t){var e=this._primaryContentValidation.__validate();return e||this._primaryContentValidation.__validationFailed(),this._primaryContentValidation.__validationCompleted(e,t),e},e.prototype._validationFailedHandler=function(){null!==this._notificationSlideOut&&this._notificationSlideOut.hide()},e}(Autotask.EntityPage),window.Autotask.ReplaceEntityPageHeadingContentRoute=function(){"use strict";function t(t){this._requestCoordinator=new Autotask.AjaxRequestCoordinator("GET",t)}return t.prototype._requestCoordinator=null,t.prototype._onResponseProcessing=function(t,e){var i=new Autotask.AjaxResponseHtmlAndJavaScript(t.htmlJavaScriptPair);e(i.htmlForInstanceTrackerContainer,i.script,t.helpId)},t.prototype.__makeRequest=function(t,e){var i=null;null!==t&&(i=t.__data);var n=new Autotask.AjaxRequestData(i,!1).__serialize(),o=this;this._requestCoordinator.__sendRequest(n,(function(t){o._onResponseProcessing(t,e)}),null,!0,"ReplaceEntityHeadingContent")},t}(),window.Autotask.GanttChartPage=function(){"use strict";function t(t,e,i){autotask.instanceManagement.__addRegistrationKey(this,t),autotask.registerPage(this),this._isAuthenticated=e;var n=new window.AutotaskButtonEventsSystem.ButtonEventsManagement;this.__buttonEvents=new window.AutotaskButtonEventsSystem.InternalPageFacade(n),this._sessionExpirationManagement=new AutotaskSessionExpirationSystem.SessionExpirationManagement(t,!1,i),this.__sessionExpiration=new AutotaskSessionExpirationSystem.InternalPageFacade(this._sessionExpirationManagement)}return t.prototype.__buttonEvents=null,t.prototype.__sessionExpiration=null,t.prototype._isAuthenticated=null,t.prototype._sessionExpirationManagement=null,t.prototype.__initialize=function(){this._isAuthenticated&&!autotask.windowManagement.isWindowInWorkspace()&&this._sessionExpirationManagement.__initialize()},t}(),window.Autotask.HotspotPage=function(){"use strict";function t(t,e,i){autotask.instanceManagement.__addRegistrationKey(this,t),autotask.registerPage(this),this._isAuthenticated=e;var n=new window.AutotaskDirtyStateSystem.DirtyStateManagement;this.dirtyState=new window.AutotaskDirtyStateSystem.PageFacade(n),this.__dirtyState=new window.AutotaskDirtyStateSystem.InternalPageFacade(n);var o=new window.AutotaskButtonEventsSystem.ButtonEventsManagement;this.__buttonEvents=new window.AutotaskButtonEventsSystem.InternalPageFacade(o),this._sessionExpirationManagement=new AutotaskSessionExpirationSystem.SessionExpirationManagement(t,!1,i),this.__sessionExpiration=new AutotaskSessionExpirationSystem.InternalPageFacade(this._sessionExpirationManagement)}return t.prototype.dirtyState=null,t.prototype.__buttonEvents=null,t.prototype.__dirtyState=null,t.prototype.__sessionExpiration=null,t.prototype._isAuthenticated=null,t.prototype._sessionExpirationManagement=null,t.prototype.__initialize=function(){this._isAuthenticated&&!autotask.windowManagement.isWindowInWorkspace()&&this._sessionExpirationManagement.__initialize()},t}(),window.Autotask.LandingPage=function(){"use strict";function t(t,e,i,n,o,a,s){autotask.instanceManagement.__addRegistrationKey(this,t),autotask.registerPage(this),this._dashboardShellId=e,this._refreshDelayInMilliseconds=i,this.__restoreWorkspaceKey=n,this._availabilityToggle=document.getElementById(o),this._toggleInRoute=a,this._awayCssClass="Away",this._isAvailabilityUpdatePaused=!1,this._isDashboardActive=!0,this._isRefreshOverdue=!1,this._isRefreshingSuspended=!1,this._presentationModeManagement=new Autotask.PresentationModeManagement(autotask.proxy(this._presentationModeEnded,this));var r=new window.AutotaskSlideOutSystem.SlideOutManagement;this.slideOut=new window.AutotaskSlideOutSystem.PageFacade(r),this.__slideOut=new window.AutotaskSlideOutSystem.InternalPageFacade(r);var l=new window.AutotaskDirtyStateSystem.DirtyStateManagement;this.dirtyState=new window.AutotaskDirtyStateSystem.PageFacade(l),this.__dirtyState=new window.AutotaskDirtyStateSystem.InternalPageFacade(l);var _=new window.AutotaskButtonEventsSystem.ButtonEventsManagement;this.__buttonEvents=new window.AutotaskButtonEventsSystem.InternalPageFacade(_);var u=new window.AutotaskNavigationButtonBarEventRegistrationSystem.NavigationButtonBarEventRegistration;this.__navigationButtonBarEventRegistration=new window.AutotaskNavigationButtonBarEventRegistrationSystem.InternalPageFacade(u);var c=new window.AutotaskWorkListBadgeSystem.WorkListBadgeManagement;this.workListBadge=new window.AutotaskWorkListBadgeSystem.PageFacade(c),this.__workListBadge=new window.AutotaskWorkListBadgeSystem.InternalPageFacade(c);var d=new window.AutotaskActivitySystem.ActivityManagement;this.activity=new window.AutotaskActivitySystem.PageFacade(d),this.__activity=new window.AutotaskActivitySystem.InternalPageFacade(d);var h=new window.AutotaskGuideSystem.GuideManagement;this.__guide=new window.AutotaskGuideSystem.InternalPageFacade(h);var p=new window.AutotaskWorkspaceSystem.WorkspaceManagement;this.__workspace=new window.AutotaskWorkspaceSystem.InternalPageFacade(p);var y=new window.AutotaskFrameEventSystem.FrameEventManagement;this.__frameEvent=new window.AutotaskFrameEventSystem.InternalPageFacade(y);var g=new window.AutotaskLoginNotificationSystem.LoginNotificationManagement;this.__loginNotification=new window.AutotaskLoginNotificationSystem.InternalPageFacade(g);var m=new window.AutotaskSecuritySystem.SecurityManagement;this.security=new window.AutotaskSecuritySystem.PageFacade(m),this.__security=new window.AutotaskSecuritySystem.InternalPageFacade(m);var f=new window.AutotaskHomepageSystem.HomepageManagement;this.homepage=new window.AutotaskHomepageSystem.PageFacade(f),this.__homepage=new window.AutotaskHomepageSystem.InternalPageFacade(f);var v=new window.AutotaskDashboardNavigationSystem.DashboardNavigationManagement;this.dashboardNavigation=new window.AutotaskDashboardNavigationSystem.PageFacade(v),this.__dashboardNavigation=new window.AutotaskDashboardNavigationSystem.InternalPageFacade(v);var C=new window.AutotaskRealTimeDataSystem.RealTimeDataManagement(autotask.proxy(this._recentItemsRefreshedHandler,this),autotask.proxy(this._availabilityChangedHandler,this));this.realTimeData=new window.AutotaskRealTimeDataSystem.PageFacade(C),this.__realTimeData=new window.AutotaskRealTimeDataSystem.InternalPageFacade(C);var w=new window.AutotaskScheduleCalendarSystem.ScheduleCalendarManagement;this.__scheduleCalendar=new window.AutotaskScheduleCalendarSystem.InternalPageFacade(w);var S=new window.AutotaskAnnouncementsIndicatorSystem.AnnouncementsIndicatorManagement;this.announcementsIndicator=new window.AutotaskAnnouncementsIndicatorSystem.PageFacade(S),this.__announcementsIndicator=new window.AutotaskAnnouncementsIndicatorSystem.InternalPageFacade(S),this._sessionExpirationManagement=new AutotaskSessionExpirationSystem.SessionExpirationManagement(t,!0,s),this.__sessionExpiration=new AutotaskSessionExpirationSystem.InternalPageFacade(this._sessionExpirationManagement),this._localStorageAvailabilityKey="LandingAvailability",this._localStorageAvailabilityAwayValue="1",autotask.localStorageManagement.__addStorageChangedHandler(autotask.proxy(this._localStorageChangedHandler,this))}return t.prototype.dirtyState=null,t.prototype.slideOut=null,t.prototype.workListBadge=null,t.prototype.activity=null,t.prototype.security=null,t.prototype.homepage=null,t.prototype.dashboardNavigation=null,t.prototype.realTimeData=null,t.prototype.announcementsIndicator=null,t.prototype.__activity=null,t.prototype.__announcementsIndicator=null,t.prototype.__buttonEvents=null,t.prototype.__dashboardNavigation=null,t.prototype.__dirtyState=null,t.prototype.__frameEvent=null,t.prototype.__guide=null,t.prototype.__homepage=null,t.prototype.__loginNotification=null,t.prototype.__realTimeData=null,t.prototype.__restoreWorkspaceKey=null,t.prototype.__scheduleCalendar=null,t.prototype.__security=null,t.prototype.__sessionExpiration=null,t.prototype.__slideOut=null,t.prototype.__workListBadge=null,t.prototype.__workspace=null,t.prototype._availabilityToggle=null,t.prototype._awayCssClass=null,t.prototype._dashboardShell=null,t.prototype._dashboardShellId=null,t.prototype._isAvailabilityUpdatePaused=null,t.prototype._isDashboardActive=null,t.prototype._isRefreshOverdue=null,t.prototype._isRefreshingSuspended=null,t.prototype._localStorageAvailabilityAwayValue=null,t.prototype._localStorageAvailabilityKey=null,t.prototype._presentationModeManagement=null,t.prototype._refreshDelayInMilliseconds=null,t.prototype._refreshIntervalId=null,t.prototype._signingOutHandler=null,t.prototype._standardDashboardReplacingHandler=null,t.prototype._standardDashboardRoute=null,t.prototype._sessionExpirationManagement=null,t.prototype._toggledAwayHandler=null,t.prototype._toggleInRoute=null,t.prototype.set_signingOutHandler=function(t){this._signingOutHandler=t},t.prototype.set_toggledAwayHandler=function(t){this._toggledAwayHandler=t},t.prototype.__set_isDashboardActive=function(t){this._isDashboardActive=t},t.prototype.acquireWorkspaceUrl=function(){var t=null;return this._isDashboardActive||(t=this.__workspace.get_pageFrameCurrentUrl()),t},t.prototype.activateDashboard=function(){this.__workspace.activateDashboard(!1)},t.prototype.endPresentationMode=function(){this._presentationModeManagement.end()},t.prototype.refreshDashboard=function(){this._dashboardShell.__refresh()},t.prototype.refreshWidgets=function(){this._dashboardShell.__refreshWidgets()},t.prototype.startPresentationMode=function(t,e,i,n,o){this._presentationModeManagement.start(o),this.__activity.suspendActivityMonitoring(),this._suspendRefreshing(),this._isDashboardActive=!1,this._standardDashboardRoute=e,this._standardDashboardReplacingHandler=n,this._dashboardShell.__replaceWithPresentationDashboard(t,i)},t.prototype.targetDashboardTab=function(t){this._dashboardShell.__selectTab(t)},t.prototype.__initialize=function(){this._dashboardShell=autotask.find(this._dashboardShellId),this._dashboardShell.__registerUserInteractionEventHandlers(autotask.proxy(this._userInteractionEventStarted,this),autotask.proxy(this._userInteractionEventEnded,this)),this._dashboardShell.__registerStandardDashboardRefreshedHandler(autotask.proxy(this._standardDashboardRefreshed,this)),this.__activity.initialize(),this.__activity.addIdleHandler(autotask.proxy(this._idleActivity,this)),this.__activity.addResumeHandler(autotask.proxy(this._resumeActivity,this)),this._resetRefreshInterval(),this._sessionExpirationManagement.__initialize()},t.prototype.__preventDashboardWidgetShellsFromRefreshing=function(){this._dashboardShell.__preventDashboardWidgetShellsFromRefreshing()},t.prototype.__signOut=function(){this._isAvailabilityUpdatePaused=!0;var t=this._availabilityToggle.classList.contains(this._awayCssClass);this._raiseSigningOutEvent(t)},t.prototype.__toggleAvailability=function(){this._availabilityToggle.classList.contains(this._awayCssClass)?this._toggleIn():(this._availabilityToggle.classList.add(this._awayCssClass),autotask.localStorageManagement.__setItem(this._localStorageAvailabilityKey,this._localStorageAvailabilityAwayValue),this._isAvailabilityUpdatePaused=!0,this._raiseToggledAwayEvent())},t.prototype._availabilityChangedHandler=function(t){this._isAvailabilityUpdatePaused||(t&&!this._availabilityToggle.classList.contains(this._awayCssClass)?this._availabilityToggle.classList.add(this._awayCssClass):!t&&this._availabilityToggle.classList.contains(this._awayCssClass)&&this._availabilityToggle.classList.remove(this._awayCssClass))},t.prototype._idleActivity=function(){this._suspendRefreshing()},t.prototype._localStorageChangedHandler=function(t,e){this._isAvailabilityUpdatePaused||t!==this._localStorageAvailabilityKey||(e!==this._localStorageAvailabilityAwayValue||this._availabilityToggle.classList.contains(this._awayCssClass)?e!==this._localStorageAvailabilityAwayValue&&this._availabilityToggle.classList.contains(this._awayCssClass)&&this._availabilityToggle.classList.remove(this._awayCssClass):this._availabilityToggle.classList.add(this._awayCssClass))},t.prototype._presentationModeEnded=function(){this._dashboardShell.__replaceWithStandardDashboard(this._standardDashboardRoute,this._standardDashboardReplacingHandler,autotask.proxy(this._standardDashboardReplaceSuccess,this))},t.prototype._raiseSigningOutEvent=function(t){null!==this._signingOutHandler&&this._signingOutHandler(t)},t.prototype._raiseToggledAwayEvent=function(){if(null!==this._toggledAwayHandler){var t=this;this._toggledAwayHandler((function(){t._isAvailabilityUpdatePaused=!1}))}},t.prototype._recentItemsRefreshedHandler=function(){!this._isAvailabilityUpdatePaused&&this._availabilityToggle.classList.contains(this._awayCssClass)&&this._toggleIn()},t.prototype._refreshOnInterval=function(){this._isRefreshingSuspended||!this._isDashboardActive?this._isRefreshOverdue=!0:(this._isRefreshOverdue=!1,this._dashboardShell.__refresh())},t.prototype._resetRefreshInterval=function(){null!==this._refreshIntervalId&&(window.clearInterval(this._refreshIntervalId),this._refreshIntervalId=null),this._refreshIntervalId=window.setInterval(autotask.proxy(this._refreshOnInterval,this),this._refreshDelayInMilliseconds)},t.prototype._resumeActivity=function(){this._resumeRefreshing()},t.prototype._resumeRefreshing=function(){this._isDashboardActive&&(this._isRefreshingSuspended=!1,this._isRefreshOverdue&&(this._isRefreshOverdue=!1,this._dashboardShell.__refresh()))},t.prototype._standardDashboardRefreshed=function(){this._resetRefreshInterval()},t.prototype._standardDashboardReplaceSuccess=function(){this._resetRefreshInterval(),this._isDashboardActive=!0,this._resumeRefreshing(),this.__activity.resumeActivityMonitoring()},t.prototype._suspendRefreshing=function(){this._isRefreshingSuspended=!0},t.prototype._toggleIn=function(){this._availabilityToggle.classList.remove(this._awayCssClass),autotask.localStorageManagement.__setItem(this._localStorageAvailabilityKey,"0"),this._toggleInRoute.makeRequest(null,null)},t.prototype._userInteractionEventEnded=function(){this._resumeRefreshing()},t.prototype._userInteractionEventStarted=function(){this._suspendRefreshing()},t}(),window.Autotask.NotificationPage=function(){"use strict";function t(t,e,i,n){autotask.instanceManagement.__addRegistrationKey(this,t),autotask.registerPage(this),this._fieldContainer=document.getElementById(e),this._notificationPanelId=e,this._isAuthenticated=i,this._submittingPointers=[];var o=new window.AutotaskDirtyStateSystem.DirtyStateManagement;this.dirtyState=new window.AutotaskDirtyStateSystem.PageFacade(o),this.__dirtyState=new window.AutotaskDirtyStateSystem.InternalPageFacade(o);var a=new window.AutotaskButtonEventsSystem.ButtonEventsManagement;this.__buttonEvents=new window.AutotaskButtonEventsSystem.InternalPageFacade(a),this._sessionExpirationManagement=new AutotaskSessionExpirationSystem.SessionExpirationManagement(t,!1,n),this.__sessionExpiration=new AutotaskSessionExpirationSystem.InternalPageFacade(this._sessionExpirationManagement)}return t.prototype.dirtyState=null,t.prototype.__buttonEvents=null,t.prototype.__dirtyState=null,t.prototype.__sessionExpiration=null,t.prototype._fieldContainer=null,t.prototype._fieldValidation=null,t.prototype._isAuthenticated=null,t.prototype._notificationPanel=null,t.prototype._notificationPanelId=null,t.prototype._sessionExpirationManagement=null,t.prototype._submittingPointers=null,t.prototype._validationSummary=null,t.prototype.get_customValidationSummary=function(){return this._validationSummary.__get_customValidationSummary()},t.prototype.addSubmitting=function(t){this._submittingPointers.push(t)},t.prototype.ajaxSubmit=function(t,e){if(this.validate()){var i=new AutotaskAjaxSystem.SubmittingEventArgs;this._submitting(i);var n=i.requestData;n.addFieldData(this._notificationPanel.__get_postingModelParameterName(),this._notificationPanel.__createSerializedRequestData());var o=new Autotask.SubmitRoute(t),a=this.get_customValidationSummary();o.makeRequest(n,(function(t){a.clearMessages();for(var i=0;i<t.customValidationMessages.length;i++)a.addMessage(i.toString(),t.customValidationMessages[i]);var n={};n.validationFailure=t.customValidationMessages.length>0,n.responseData=t.responseData,e(n)}))}},t.prototype.deprecatedAjaxSubmit=function(t,e){if(this.validate()){var i=new Autotask.PageSubmittingEventArgs;this._submitting(i);var n=i.__get_data();n[this._notificationPanel.__get_postingModelParameterName()]=this._notificationPanel.__createSerializedRequestData();var o=this.get_customValidationSummary();autotask.ajax.__restrictedPostRequest(t,n,e).__deprecatedSubmit(o)}},t.prototype.validate=function(){return this._validate(!1)},t.prototype.__finalize=function(){this._fieldValidation.__parse()},t.prototype.__initialize=function(){this._fieldValidation=new Autotask.PostedContainerValidation(this._fieldContainer),this._notificationPanel=autotask.find(this._notificationPanelId),this._isAuthenticated&&!autotask.windowManagement.isWindowInWorkspace()&&this._sessionExpirationManagement.__initialize(),this._validationSummary=autotask.validationSummaryManagement.__findValidationSummary(this._fieldContainer)},t.prototype.__registerHandlers=function(){this._fieldValidation.__registerValidationSummary(this._validationSummary)},t.prototype.__resetValidation=function(){this._fieldValidation.__reset(),this._validationSummary.__get_isActive()&&this._validate(!0)},t.prototype._submitting=function(t){for(var e=0;e<this._submittingPointers.length;e++)this._submittingPointers[e](t)},t.prototype._validate=function(t){var e=this._fieldValidation.__validate();return e||this._fieldValidation.__validationFailed(),this._fieldValidation.__validationCompleted(e,t),e},t}(),window.Autotask.PageSubmittingEventArgs=function(){"use strict";function t(){this._data={},this._hasLegacyData=!1,this._hasRequestData=!1}return t.prototype._data=null,t.prototype._hasLegacyData=null,t.prototype._hasRequestData=null,t.prototype.__get_data=function(){return this._data},t.prototype.add=function(t,e){"string"!=typeof t&&window.autotask.throwException("When adding key/value pairs to PageSubmittingEventArgs, the key must be a string."),this._hasRequestData&&window.autotask.throwException("Do not use legacy data and request data simultaneously."),this._hasLegacyData=!0,this._data[t]=e},t.prototype.addRequestData=function(t){this._hasLegacyData&&window.autotask.throwException("Do not use legacy data and request data simultaneously."),this._hasRequestData=!0,this._data=t.__data},t}(),window.Autotask.PreviewDashboardPage=function(){"use strict";function t(t,e,i,n){autotask.instanceManagement.__addRegistrationKey(this,t),autotask.registerPage(this),this._dashboardShellId=e,this._isAuthenticated=i;var o=new window.AutotaskDirtyStateSystem.DirtyStateManagement;this.dirtyState=new window.AutotaskDirtyStateSystem.PageFacade(o),this.__dirtyState=new window.AutotaskDirtyStateSystem.InternalPageFacade(o);var a=new window.AutotaskButtonEventsSystem.ButtonEventsManagement;this.__buttonEvents=new window.AutotaskButtonEventsSystem.InternalPageFacade(a),this._sessionExpirationManagement=new AutotaskSessionExpirationSystem.SessionExpirationManagement(t,!1,n),this.__sessionExpiration=new AutotaskSessionExpirationSystem.InternalPageFacade(this._sessionExpirationManagement)}return t.prototype.dirtyState=null,t.prototype.__buttonEvents=null,t.prototype.__dirtyState=null,t.prototype.__sessionExpiration=null,t.prototype._dashboardShell=null,t.prototype._dashboardShellId=null,t.prototype._isAuthenticated=null,t.prototype._sessionExpirationManagement=null,t.prototype.addReplacing=function(t){this._dashboardShell.__addReplacing(t)},t.prototype.replaceDashboard=function(t){var e=new AutotaskDashboardSystem.ReplaceDashboardRoute(t);this._dashboardShell.__replace(e)},t.prototype.__initialize=function(){this._dashboardShell=autotask.find(this._dashboardShellId),this._isAuthenticated&&!autotask.windowManagement.isWindowInWorkspace()&&this._sessionExpirationManagement.__initialize()},t}(),window.Autotask.PrintPreviewPage=function(t){"use strict";function e(e,i,n,o,a){t.call(this,e,i,null,a),this._inlineframe=document.getElementById(n),this._inlineframe.addEventListener("load",autotask.proxy(this._inlineframeLoaded,this),!0),this._defaultUrl=o,this._refreshingPointers=[],this._successPointer=null}return autotask.inherit(e,t),e.prototype._defaultUrl=null,e.prototype._inlineframe=null,e.prototype._refreshingPointers=null,e.prototype._successPointer=null,e.prototype._inlineframeLoaded=function(){this._resizeInlineFrame(),this._resizeInlineFrame(),autotask.overlayManagement.__hideLoadingIndicator(),null!==this._successPointer&&this._successPointer()},e.prototype.addRefreshingHandler=function(t){this._refreshingPointers.push(t)},e.prototype.print=function(){autotask.browserDetection.isInternetExplorer()?this._inlineframe.contentWindow.document.execCommand("print",!1,null):this._inlineframe.contentWindow.print(),this._resizeInlineFrame()},e.prototype.refreshPreview=function(t,e){if(this.validate()){this._successPointer=e,autotask.overlayManagement.__showLoadingIndicator();var i=new AutotaskAjaxSystem.SubmittingEventArgs;this._onRefreshing(i);var n=i.requestData,o=new RetrievePrintPreviewUrlRoute(t),a=this;o.makeRequest(n,(function(t){var e=a.get_customValidationSummary();e.clearMessages();for(var i=0;i<t.customValidationMessages.length;i++)e.addMessage(i.toString(),t.customValidationMessages[i]);0===t.customValidationMessages.length&&(a._inlineframe.src=t.url)}))}},e.prototype.__initialize=function(){t.prototype.__initialize.call(this),autotask.overlayManagement.__showLoadingIndicator(),this._inlineframe.src=this._defaultUrl},e.prototype._onRefreshing=function(t){for(var e=0;e<this._refreshingPointers.length;e++)this._refreshingPointers[e](t)},e.prototype._resizeInlineFrame=function(){this._inlineframe.style.height=null,this._inlineframe.style.width=null,this._inlineframe.style.height=this._inlineframe.contentWindow.document.documentElement.scrollHeight+"px",this._inlineframe.style.width=this._inlineframe.contentWindow.document.documentElement.scrollWidth+"px",this._inlineframe.style.height=this._inlineframe.contentWindow.document.documentElement.scrollHeight+"px",this._inlineframe.style.width=this._inlineframe.contentWindow.document.documentElement.scrollWidth+"px"},e}(Autotask.Page),window.Autotask.SearchGridPage=function(t){"use strict";function e(e,i,n,o,a){t.call(this,e,n,null,null,a),this._sectionId=i,this._gridId=n,this._imageViewerId=o,this._isSearchRequested=!1}return autotask.inherit(e,t),e.prototype._grid=null,e.prototype._gridId=null,e.prototype._imageViewer=null,e.prototype._imageViewerId=null,e.prototype._isSearchRequested=null,e.prototype._section=null,e.prototype._sectionId=null,e.prototype._serializedRequestData=null,e.prototype.get_isSearchRequested=function(){return this._isSearchRequested},e.prototype.__get_imageViewer=function(){return this._imageViewer},e.prototype._onSearch=function(){this._section.__validate()&&(this._serializeDataAndRefreshGrid(),this._isSearchRequested=!0)},e.prototype.addFiltersClearedHandler=function(t){this._section.addFiltersClearedHandler(t)},e.prototype.generateFormData=function(){return this._serializedRequestData},e.prototype.__initialize=function(){t.prototype.__initialize.call(this),this._section=autotask.find(this._sectionId),this._grid=autotask.find(this._gridId),this._imageViewer=autotask.find(this._imageViewerId),this._section.__get_hasPreAppliedFilters()&&(this._serializedRequestData=this._section.__generateSerializedRequestData())},e.prototype.__registerHandlers=function(){t.prototype.__registerHandlers.call(this),this._section.__addSearch(autotask.proxy(this._onSearch,this))},e.prototype._serializeDataAndRefreshGrid=function(){this._serializedRequestData=this._section.__generateSerializedRequestData(),this._grid.refreshAndClearState(!1,!1,!1)},e}(Autotask.GridPage),window.Autotask.SessionExpiredPage=function(){"use strict";function t(t,e,i){autotask.instanceManagement.__addRegistrationKey(this,t),autotask.registerPage(this),this._restoreUrl=e,this._loginPage=i;var n=new window.AutotaskButtonEventsSystem.ButtonEventsManagement;this.__buttonEvents=new window.AutotaskButtonEventsSystem.InternalPageFacade(n),this._localStorageKeys=new AutotaskSessionExpirationSystem.LocalStorageKeys}return t.prototype._localStorageChangedHandlerKey=null,t.prototype._localStorageKeys=null,t.prototype._loginPage=null,t.prototype._restoreUrl=null,t.prototype.__buttonEvents=null,t.prototype.navigateToLoginPage=function(){this._loginPage.open(null)},t.prototype.__initialize=function(){this._localStorageChangedHandlerKey=autotask.localStorageManagement.__addStorageChangedHandler(autotask.proxy(this._localStorageChangedHandler,this))},t.prototype._localStorageChangedHandler=function(t,e){t===this._localStorageKeys.isInitializedKey&&null!==e&&(autotask.localStorageManagement.__removeStorageChangedPointer(this._localStorageChangedHandlerKey),window.location.href=this._restoreUrl)},t}(),window.Autotask.StandardDashboardPage=function(){"use strict";function t(t,e,i,n){autotask.instanceManagement.__addRegistrationKey(this,t),autotask.registerPage(this),this._dashboardShellId=e,this._isAuthenticated=i;var o=new window.AutotaskDirtyStateSystem.DirtyStateManagement;this.dirtyState=new window.AutotaskDirtyStateSystem.PageFacade(o),this.__dirtyState=new window.AutotaskDirtyStateSystem.InternalPageFacade(o);var a=new window.AutotaskButtonEventsSystem.ButtonEventsManagement;this.__buttonEvents=new window.AutotaskButtonEventsSystem.InternalPageFacade(a),this._sessionExpirationManagement=new AutotaskSessionExpirationSystem.SessionExpirationManagement(t,!1,n),this.__sessionExpiration=new AutotaskSessionExpirationSystem.InternalPageFacade(this._sessionExpirationManagement)}return t.prototype.dirtyState=null,t.prototype.__buttonEvents=null,t.prototype.__dirtyState=null,t.prototype.__sessionExpiration=null,t.prototype._dashboardShell=null,t.prototype._dashboardShellId=null,t.prototype._isAuthenticated=null,t.prototype._sessionExpirationManagement=null,t.prototype.addReplacing=function(t){this._dashboardShell.__addReplacing(t)},t.prototype.replaceDashboard=function(t){var e=new AutotaskDashboardSystem.ReplaceDashboardRoute(t);this._dashboardShell.__replace(e)},t.prototype.__initialize=function(){this._dashboardShell=autotask.find(this._dashboardShellId),this._isAuthenticated&&!autotask.windowManagement.isWindowInWorkspace()&&this._sessionExpirationManagement.__initialize()},t}(),window.Autotask.TabbedPage=function(){"use strict";function t(t,e,i,n,o,a,s){autotask.instanceManagement.__addRegistrationKey(this,t),autotask.registerPage(this),this._imageViewerId=o,this._isAuthenticated=a,this._submittingPointers=[],this._tabCoordinator=new Autotask.TabCoordinator(e,i,n);var r=new window.AutotaskDirtyStateSystem.DirtyStateManagement;this.dirtyState=new window.AutotaskDirtyStateSystem.PageFacade(r),this.__dirtyState=new window.AutotaskDirtyStateSystem.InternalPageFacade(r);var l=new window.AutotaskButtonEventsSystem.ButtonEventsManagement;this.__buttonEvents=new window.AutotaskButtonEventsSystem.InternalPageFacade(l),this._sessionExpirationManagement=new AutotaskSessionExpirationSystem.SessionExpirationManagement(t,!1,s),this.__sessionExpiration=new AutotaskSessionExpirationSystem.InternalPageFacade(this._sessionExpirationManagement)}return t.prototype.dirtyState=null,t.prototype.__buttonEvents=null,t.prototype.__dirtyState=null,t.prototype.__sessionExpiration=null,t.prototype._imageViewer=null,t.prototype._imageViewerId=null,t.prototype._isAuthenticated=null,t.prototype._notificationSlideOut=null,t.prototype._sessionExpirationManagement=null,t.prototype._submittingPointers=null,t.prototype._tabCoordinator=null,t.prototype._validationSummary=null,t.prototype.get_customValidationSummary=function(){return this._validationSummary.__get_customValidationSummary()},t.prototype.__get_imageViewer=function(){return this._imageViewer},t.prototype.__get_validationSummary=function(){return this._validationSummary},t.prototype._onTabCorrected=function(t){this._tabCoordinator.__fieldValidationCorrected(t.tabId)},t.prototype._onTabsFailed=function(t){this._tabCoordinator.__fieldValidationFailed(t.tabIds)},t.prototype._onWindowResize=function(){this._tabCoordinator.__get_selectedTab().__windowResized()},t.prototype.addSubmitting=function(t){this._submittingPointers.push(t)},t.prototype.ajaxSubmit=function(t,e){var i=new AutotaskAjaxSystem.SubmittingEventArgs;this._submitting(i);var n=i.requestData;if(null!==this._notificationSlideOut){var o=this._notificationSlideOut.get_panel();n.addFieldData(o.__get_postingModelParameterName(),o.__createSerializedRequestData())}var a=new Autotask.SubmitRoute(t),s=this.get_customValidationSummary();a.makeRequest(n,(function(t){s.clearMessages();for(var i=0;i<t.customValidationMessages.length;i++)s.addMessage(i.toString(),t.customValidationMessages[i]);var n={};n.validationFailure=t.customValidationMessages.length>0,n.responseData=t.responseData,e(n)}))},t.prototype.deprecatedAjaxSubmit=function(t,e){var i=new Autotask.PageSubmittingEventArgs;this._submitting(i);var n=i.__get_data();if(null!==this._notificationSlideOut){var o=this._notificationSlideOut.get_panel();n[o.__get_postingModelParameterName()]=o.__createSerializedRequestData()}var a=this.get_customValidationSummary();autotask.ajax.__restrictedPostRequest(t,n,e).__deprecatedSubmit(a)},t.prototype.selectTabByButton=function(t){this.__selectTabByTabButtonId(t.__get_id())},t.prototype.__finalize=function(){this._tabCoordinator.__get_selectedTab().__activateScrolling()},t.prototype.__setNotificationSlideOut=function(t){this._notificationSlideOut=t},t.prototype.__initialize=function(){this._isAuthenticated&&!autotask.windowManagement.isWindowInWorkspace()&&this._sessionExpirationManagement.__initialize(),this._tabCoordinator.__initialize();var t=document.querySelector(".PageHeadingContainer");this._validationSummary=autotask.validationSummaryManagement.__findValidationSummary(t),this._validationSummary.__addTabCorrected(autotask.proxy(this._onTabCorrected,this)),this._validationSummary.__addTabsFailed(autotask.proxy(this._onTabsFailed,this)),this._validationSummary.__addValidationFailed(autotask.proxy(this._validationFailedHandler,this)),this._imageViewer=autotask.find(this._imageViewerId),window.addEventListener("resize",autotask.proxy(this._onWindowResize,this))},t.prototype.__selectTabByTabButtonId=function(t){this._tabCoordinator.__selectTabByTabButtonId(t)},t.prototype._submitting=function(t){for(var e=0;e<this._submittingPointers.length;e++)this._submittingPointers[e](t)},t.prototype._validationFailedHandler=function(){null!==this._notificationSlideOut&&this._notificationSlideOut.hide()},t}(),window.Autotask.TabCoordinator=function(){"use strict";function t(t,e,i){this._selectedTabId=t,this._tabButtonIds=i,this._tabButtons=[],this._tabIds=e,this._tabs=[]}return t.prototype._selectedTab=null,t.prototype._selectedTabId=null,t.prototype._tabButtonIds=null,t.prototype._tabButtons=null,t.prototype._tabIds=null,t.prototype._tabs=null,t.prototype.__get_selectedTab=function(){return this._selectedTab},t.prototype.__initialize=function(){for(var t=0;t<this._tabButtonIds.length;t++)this._tabButtons.push(autotask.find(this._tabButtonIds[t]));for(var e=null,i=null,n=0;n<this._tabIds.length;n++)i=this._tabIds[n],e=autotask.find(i),this._tabs.push(e),this._selectedTabId===i&&(this._selectedTab=e)},t.prototype.__selectTabByTabButtonId=function(t){autotask.contextOverlayManagement.__hideVisibleContextOverlays();for(var e=null,i=0;i<this._tabButtonIds.length;i++)t===this._tabButtonIds[i]&&(e=i),this._changeTabSelection(i,!1);this._changeTabSelection(e,!0)},t.prototype.__fieldValidationCorrected=function(t){var e=this._tabIds.indexOf(t);this._tabs[e].__hasFieldValidationErrors()||this._tabButtons[e].__removeValidationStyling()},t.prototype.__fieldValidationFailed=function(t){for(var e=null,i=this._tabIds.length-1,n=0;n<t.length;n++)(e=this._tabIds.indexOf(t[n]))<i&&(i=e),this._tabButtons[e].__addValidationStyling();var o=this._tabButtonIds[i];this.__selectTabByTabButtonId(o)},t.prototype._changeTabSelection=function(t,e){this._tabButtons[t].set_selected(e),this._tabs[t].__setSelected(e),e&&(this._selectedTab=this._tabs[t],this._selectedTab.__activateScrolling())},t}(),window.Autotask.WorkListPopupPage=function(){"use strict";function t(t,e,i){autotask.instanceManagement.__addRegistrationKey(this,t),autotask.registerPage(this),this._isAuthenticated=e;var n=new window.AutotaskButtonEventsSystem.ButtonEventsManagement;this.__buttonEvents=new window.AutotaskButtonEventsSystem.InternalPageFacade(n),this._sessionExpirationManagement=new AutotaskSessionExpirationSystem.SessionExpirationManagement(t,!1,i),this.__sessionExpiration=new AutotaskSessionExpirationSystem.InternalPageFacade(this._sessionExpirationManagement)}return t.prototype.__buttonEvents=null,t.prototype.__sessionExpiration=null,t.prototype._isAuthenticated=null,t.prototype._sessionExpirationManagement=null,t.prototype.__initialize=function(){this._isAuthenticated&&!autotask.windowManagement.isWindowInWorkspace()&&this._sessionExpirationManagement.__initialize()},t}(),window.SavePerformanceWorkflowRoute=function(){"use strict";function t(t){this._requestCoordinator=new Autotask.AjaxRequestCoordinator("POST",t)}return t.prototype._requestCoordinator=null,t.prototype._onResponseProcessing=function(t,e){null!==e&&e(t.value)},t.prototype.makeRequest=function(t,e){var i=new Autotask.AjaxRequestData(t.__data,!0).__serialize(),n=this;this._requestCoordinator.__sendRequest(i,(function(t){n._onResponseProcessing(t,e)}),null,!0,"ResponseData");return new Autotask.AjaxRequestCanceler((function(){n._requestCoordinator.__cancelRequest()}))},t}(),Autotask.PresentationModeManagement=function(){"use strict";function t(t){this._endHandler=t,this._contextMenuHandler=autotask.proxy(this._documentContextMenu,this),this._fullscreenChangeHandler=autotask.proxy(this._fullscreenChange,this),this._keyDownHandler=autotask.proxy(this._keyDown,this),this._pageContainerFrameLoadedHandler=autotask.proxy(this._pageContainerFrameLoaded,this),this._isFullscreenStarted=!1,this._isSharedComputer=!1,this._presentationModeCssClass="PresentationMode"}return t.prototype._contextMenuHandler=null,t.prototype._fullscreenChangeHandler=null,t.prototype._isFullscreenStarted=null,t.prototype._isSharedComputer=null,t.prototype._keyDownHandler=null,t.prototype._pageContainerFrameLoadedHandler=null,t.prototype._presentationModeCssClass=null,t.prototype.end=function(){this._stopFullscreen(),this._unregisterHandlers(),window.document.body.classList.remove(this._presentationModeCssClass),this._isSharedComputer&&!autotask.findPage().security.get_isDashboardOnlyUser()?autotask.siteNavigation.signOutUser():this._endHandler()},t.prototype.start=function(t){this._isSharedComputer=t||autotask.findPage().security.get_isDashboardOnlyUser(),window.document.body.classList.add(this._presentationModeCssClass),this._startFullscreen(),this._registerHandlers()},t.prototype._documentContextMenu=function(t){this._isSharedComputer&&t.preventDefault()},t.prototype._fullscreenChange=function(){this._isFullscreenStarted?this.end():this._isFullscreenStarted=!0},t.prototype._isFullScreenEnabled=function(){return null!==(window.document.fullScreenElement||window.document.webkitFullscreenElement)},t.prototype._isFullscreenSupported=function(){return window.document.fullscreenEnabled||window.document.webkitFullscreenEnabled},t.prototype._keyDown=function(t){var e=!1;if((t.ctrlKey||t.altKey||t.metaKey)&&16!=t.keyCode&&17!=t.keyCode&&18!=t.keyCode)e=!1,t.preventDefault(),this.end();else switch(t.keyCode){case 27:e=!1,t.preventDefault(),this.end();break;case 123:case 116:case 8:e=!1,t.preventDefault()}return e},t.prototype._pageContainerFrameLoaded=function(){this.end()},t.prototype._registerHandlers=function(){window.document.addEventListener("fullscreenchange",this._fullscreenChangeHandler),window.document.addEventListener("webkitfullscreenchange",this._fullscreenChangeHandler),window.document.addEventListener("contextmenu",this._contextMenuHandler),window.document.addEventListener("keydown",this._keyDownHandler),document.getElementById("PageContainerFrame").addEventListener("load",this._pageContainerFrameLoadedHandler)},t.prototype._startFullscreen=function(){if(this._isFullscreenSupported()){var t=window.document.documentElement;t.requestFullscreen?t.requestFullscreen():t.webkitRequestFullscreen&&t.webkitRequestFullscreen()}},t.prototype._stopFullscreen=function(){this._isFullscreenSupported()&&this._isFullScreenEnabled()&&(window.document.exitFullscreen?window.document.exitFullscreen():document.webkitExitFullscreen&&document.webkitExitFullscreen()),this._isFullscreenStarted=!1},t.prototype._unregisterHandlers=function(){window.document.removeEventListener("fullscreenchange",this._fullscreenChangeHandler),window.document.removeEventListener("webkitfullscreenchange",this._fullscreenChangeHandler),window.document.removeEventListener("contextmenu",this._contextMenuHandler),window.document.removeEventListener("keydown",this._keyDownHandler),document.getElementById("PageContainerFrame").removeEventListener("load",this._pageContainerFrameLoadedHandler)},t}(),Autotask.QuickEditEventArgs=function(){"use strict";function t(){this._filters={}}return t.prototype._filters=null,t.prototype.add=function(t,e){this._filters[t]=e},t.prototype.__applyValues=function(t){var e={};return null!==t&&Object.assign(e,t),"string"==typeof t?autotask.throwException("Data must be an associative array."):Object.assign(e,this._filters),e},t}(),Autotask.QuickEditManagement=function(){"use strict";function t(){this._tokenStore=[]}return t.prototype._tokenStore=null,t.prototype.quickEditOffset=function(t,e){var i=0;if(null!==e){var n=AutotaskDomSystem.Document.getElementById(t);i=autotask.scrolling.__getElementScrollOffset(n)}return i},t.prototype.scrollToToken=function(t,e){var i=this._find(t);if(null!==i){var n=document.getElementById(this._tokenStore[t]);autotask.scrolling.__scrollToOffset(n,e,!1),i.focus()}},t.prototype.__addEditor=function(t,e){this._tokenStore[t]=e},t.prototype._find=function(t){var e=null;if(void 0!==this._tokenStore[t]){var i=autotask.find(this._tokenStore[t]);void 0!==i&&(e=i)}return e},t.prototype.__removeEditor=function(t){void 0!==this._tokenStore[t]&&delete this._tokenStore[t]},t}(),window.Autotask.QuickEditMapper=function(){"use strict";function t(t,e,i){this._id=t,this._quickEditTokenValue=e,this._editorId=i,autotask.instanceManagement.__addRegistrationKey(this,t)}return t.prototype._quickEditTokenValue=null,t.prototype._editorId=null,t.prototype._id=null,t.prototype.__dispose=function(){autotask.quickEditManagement.__removeEditor(this._quickEditTokenValue)},t.prototype.__initialize=function(){autotask.quickEditManagement.__addEditor(this._quickEditTokenValue,this._editorId)},t}(),Autotask.LabeledExpandableData=function(){"use strict";function t(t,e,i){autotask.instanceManagement.__addRegistrationKey(this,t),this._showAllButtonId=e,this._showLessButtonId=i;var n=document.getElementById(t);this._showAllButtonContainer=n.querySelector(":scope > .ShowAllButtonContainer"),this._showLessButtonContainer=n.querySelector(":scope > .ShowLessButtonContainer"),this._expandableData=n.querySelector(":scope > .ExpandableData")}return t.prototype._expandableData=null,t.prototype._showAllButtonContainer=null,t.prototype._showLessButtonContainer=null,t.prototype._showAllButtonId=null,t.prototype._showLessButtonId=null,t.prototype._showAllButtonClick=function(){this._showAllButtonContainer.classList.remove("Active"),this._showLessButtonContainer.classList.add("Active"),this._expandableData.classList.add("Active")},t.prototype._showLessButtonClick=function(){this._showAllButtonContainer.classList.add("Active"),this._showLessButtonContainer.classList.remove("Active"),this._expandableData.classList.remove("Active")},t.prototype.__registerHandlers=function(){var t=autotask.find(this._showAllButtonId),e=new AutotaskButtonSystem.ClickEventHandler(autotask.proxy(this._showAllButtonClick,this));t.addEventHandler(e);var i=autotask.find(this._showLessButtonId),n=new AutotaskButtonSystem.ClickEventHandler(autotask.proxy(this._showLessButtonClick,this));i.addEventHandler(n)},t}(),window.Autotask.UnmaskReadOnlyUserDefinedFieldRoute=function(){"use strict";function t(t){this._requestCoordinator=new Autotask.AjaxRequestCoordinator("GET",t)}return t.prototype._requestCoordinator=null,t.prototype._onResponseProcessing=function(t,e){e({value:t.value})},t.prototype.makeRequest=function(t){var e=this,i=new Autotask.AjaxRequestData(null,!1);this._requestCoordinator.__sendRequest(i.__serialize(),(function(i){e._onResponseProcessing(i,t)}),null,!1,"UnmaskReadOnlyUserDefinedField")},t}(),function(){"use strict";window.Autotask.Scrolling=function(){this._animationDuration=350},window.Autotask.Scrolling.prototype={_animationDuration:null,_scrollBarWidth:null,__get_scrollBarWidth:function(){return this._scrollBarWidth},__getElementScrollOffset:function(t){var e=this.__scrollParentForHtmlElement(t),i=this._documentScrollTop(),n=AutotaskDomSystem.Other.positionOffset(t).top-i;return n-=this._scrollParentHeaderHeight(e),Math.floor(n)},__initialize:function(){this._initializeScrollBarWidth()},__scrollParent:function(t){for(var e=t.parentElement;null!==e;){var i=window.getComputedStyle(e);if(/(auto|scroll)/.test(i.overflow+i.overflowY+i.overflowX))break;e=e.parentElement}return/fixed/.test(window.getComputedStyle(t).position)||null==e?document:e},__scrollParentForHtmlElement:function(t){var e=null,i=this.__scrollParent(t);return null!==i&&(e=i),e},__scrollToOffset:function(t,e,i){if(null!==t){var n=autotask.scrolling.__scrollParentForHtmlElement(t);if(null!==n&&n!==document){var o=e+this._scrollParentHeaderHeight(n),a=AutotaskDomSystem.Other.positionOffset(t).top-o;this._scroll(a,n,i)}}},__scrollUntilVisible:function(t,e,i){if(t.length>0){var n=t[0],o=autotask.scrolling.__scrollParentForHtmlElement(n),a=o===document.body,s=autotask.overlayManagement.__isDialogVisible()&&a;if(null!==o&&o!==document&&!s){var r=null,l=0,_=0,u=AutotaskDomSystem.Other.positionOffset(n).top-e;if(a){var c=this._scrollParentHeaderHeight(o);l=this._documentScrollTop(),_=window.innerHeight-c,u=u-l-c}else l=o.scrollTop,_=o.offsetHeight,u-=AutotaskDomSystem.Other.positionOffset(o).top;for(var d=2*e,h=0;h<t.length;h++)d+=t[h].offsetHeight;d<_&&u+d>_?r=l+u+d-_:(d>=_||u<0)&&(r=l+u),this._scroll(r,o,i),autotask.scrolling.__scrollUntilVisible([o],e,!0)}}},_documentScrollTop:function(){return document.body.scrollTop+document.documentElement.scrollTop},_initializeScrollBarWidth:function(){var t=AutotaskDomSystem.Document.getElementByClassName("CalculationContainer");t.classList.toggle("Fixed");var e=t.clientWidth;t.classList.toggle("Fixed"),t.classList.toggle("Scrolling");var i=t.clientWidth;t.classList.toggle("Scrolling"),this._scrollBarWidth=e-i},_scroll:function(t,e,i){if(null!==t){var n=e;n===document.body&&(n=document.body.parentNode);var o="auto";!0===i&&(o="smooth"),n.scroll({top:t,behavior:o})}},_scrollParentHeaderHeight:function(t){var e=0;t===document.body&&t.classList.contains("FullScroll")&&(e=autotask.findPage().__get_headingHeight());return e}}}(),window.Autotask.ScrollingContainer=function(){"use strict";function t(t){autotask.instanceManagement.__addRegistrationKey(this,t),this._scrollingContainer=AutotaskDomSystem.Document.getElementById(t),this._scrollingContainer.addEventListener("scroll",autotask.proxy(this._onScroll,this))}return t.prototype._scrollingContainer=null,t.prototype._onScroll=function(t){autotask.contextOverlayManagement.__hideVisibleContextOverlays()},t}(),window.AutotaskSearchMenuSystem.SearchMenuRadioButton=function(){"use strict";function t(t,e,i,n,o,a){autotask.instanceManagement.__addRegistrationKey(this,t),this._alternativeSearchOptions=o,this._backingEditorId=e,this._changeHandlers=[],this._page=i,this._searchType=n,this.addChangeHandler(a)}return t.prototype._alternativeSearchOptions=null,t.prototype._backingEditor=null,t.prototype._backingEditorId=null,t.prototype._changeHandlers=null,t.prototype._page=null,t.prototype._searchType=null,t.prototype.addChangeHandler=function(t){null!==t&&this._changeHandlers.push(t)},t.prototype.isSelected=function(){return this._searchType===this._backingEditor.value},t.prototype.search=function(t,e){if(null!==this._alternativeSearchOptions&&this._alternativeSearchOptions.matchesSearchPattern(t)){const i=new Autotask.ConfirmationDialogOptions;i.set_title(this._alternativeSearchOptions._title),i.set_description(this._alternativeSearchOptions._description),i.set_confirmButtonText(this._alternativeSearchOptions._confirmButtonText),i.set_denyButtonText(this._alternativeSearchOptions._denyButtonText),i.set_confirmPointer(autotask.proxy(this._alternativeSearchCallback,this,t,e)),i.set_denyPointer(autotask.proxy(this._searchCallback,this,t,e)),autotask.confirmationDialog.show(i)}else this._searchCallback(t,e)},t.prototype.get_searchType=function(){return this._searchType},t.prototype.__initialize=function(){this._backingEditor=autotask.find(this._backingEditorId),this._backingEditor.addChangeHandler(autotask.proxy(this._raiseChangeEvent,this))},t.prototype._alternativeSearchCallback=function(t,e){autotask.find(this._alternativeSearchOptions.alternativeSearchButtonId).search(t,e)},t.prototype._raiseChangeEvent=function(){if(this._changeHandlers.length>0)for(let t=0;t<this._changeHandlers.length;t++){(0,this._changeHandlers[t])()}},t.prototype._searchCallback=function(t,e){window.autotask.windowManagement.openPage(this._page,t.trim(),e),autotask.findPage().__realTimeData.saveAndRefreshRecentSearches(this._searchType,t,this._page.__get_pageCode())},t}(),Autotask.CollapsibleSectionStateManager=function(){"use strict";function t(t,e,i,n,o){this._sectionId=t,this._stateKey=e,this._saveUrl=i,this._stateKeyParameterName=n,this._isCollapsedParameterName=o}return t.prototype._isCollapsedParameterName=null,t.prototype.sectionId=null,t.prototype._stateKey=null,t.prototype._stateKeyParameterName=null,t.prototype._saveUrl=null,t.prototype.__initialize=function(){autotask.find(this._sectionId).addCollapsedStateChangeHandler(autotask.proxy(this._stateChangeHandler,this))},t.prototype.__saveState=function(t){var e={};e[this._stateKeyParameterName]=this._stateKey,e[this._isCollapsedParameterName]=t,autotask.ajax.__restrictedPostRequest(this._saveUrl,e,null).__deprecatedJson(!1)},t.prototype._stateChangeHandler=function(t){this.__saveState(t.isCollapsed)},t}(),Autotask.SecurityManagement=function(){"use strict";function t(){}return t.prototype._authorizationFailureUrl=null,t.prototype._logOnUrl=null,t.prototype._requestVerificationToken=null,t.prototype.__set_authorizationFailureUrl=function(t){this._authorizationFailureUrl=t},t.prototype.__get_requestVerificationToken=function(){return this._requestVerificationToken},t.prototype.__set_requestVerificationToken=function(t){this._requestVerificationToken=t},t.prototype.__set_logOnUrl=function(t){this._logOnUrl=t},t.prototype.authenticationFailure=function(){window.top.location=this._logOnUrl},t.prototype.authorizationFailure=function(){window.location=this._authorizationFailureUrl},t}(),window.AutotaskSiteNavigationSystem.ApplicationLauncherMenuRoute=function(){"use strict";function t(t){this._requestCoordinator=new Autotask.AjaxRequestCoordinator("GET",t)}return t.prototype._requestCoordinator=null,t.prototype._onResponseError=function(t,e){e(t.get_defaultErrorMessage())},t.prototype._onResponseProcessing=function(t,e){var i={};i.isMenuAvailable=t.isMenuAvailable,t.isMenuAvailable&&(i.html=t.htmlJavaScriptPair.Html.HtmlForInstanceTrackerContainer,i.javaScript=t.htmlJavaScriptPair.JavaScript),e(i)},t.prototype.__makeRequest=function(t,e){var i=new Autotask.AjaxRequestData({},!1).__serialize(),n=this;this._requestCoordinator.__sendRequest(i,(function(e){n._onResponseProcessing(e,t)}),(function(t){n._onResponseError(t,e)}),!1,"ApplicationLauncherMenu");return new Autotask.AjaxRequestCanceler((function(){n._requestCoordinator.__cancelRequest()}))},t}(),window.AutotaskSiteNavigationSystem.ApplicationLauncherUsageTrackingRoute=function(){"use strict";function t(t,e,i){this._productId=e,this._productIdParameterName=i,this._requestCoordinator=new Autotask.AjaxRequestCoordinator("POST",t)}return t.prototype._productId=null,t.prototype._productIdParameterName=null,t.prototype._requestCoordinator=null,t.prototype._onResponseError=function(){},t.prototype._onResponseProcessing=function(){},t.prototype.__makeRequest=function(){var t=new AutotaskRequestDataSystem.RequestData;t.addString(this._productIdParameterName,this._productId);var e=new Autotask.AjaxRequestData(t.__data,!0).__serialize(),i=this;this._requestCoordinator.__sendRequest(e,(function(){i._onResponseProcessing()}),(function(){i._onResponseError()}),!1,"ResponseData");return new Autotask.AjaxRequestCanceler((function(){i._requestCoordinator.__cancelRequest()}))},t}(),Autotask.Stopwatch=function(){"use strict";function t(t,e,i,n,o,a,s,r,l,_,u,c,d,h,p,y,g){this._stopwatchStates={None:"None",Stopped:"Stopped",Running:"Running",Paused:"Paused"},autotask.instanceManagement.__addRegistrationKey(this,t);var m=new Date;this._timezoneOffsetMs=60*m.getTimezoneOffset()*1e3;var f=r.getTime()-m.getTime();this._computerTimeToServerTimeOffsetMs=this._timezoneOffsetMs-f,this._workListItemId=e,this._syncCode=i,null!==n&&(this._startTime=this._convertServerDateToLocalDate(n)),null!==o&&(this._lastPausedTime=this._convertServerDateToLocalDate(o)),this._totalPausedSeconds=a,this._currentStopwatchState=s,this._isEnabled=l,this._timeEntryPage=u,this._recordClickDelegate=c,this._startStopwatchUrl=d,this._stopStopwatchUrl=h,this._pauseStopwatchUrl=p,this._pauseClientStopwatchUrl=y,this._isAutoStartEnabled=g;var v=document.getElementById(t);this._playPauseButton=v.querySelector(":scope > .Play"),this._stopButton=v.querySelector(":scope > .Stop"),_&&(this._recordButton=v.querySelector(":scope > .Record")),this._stopwatchTime=v.querySelector(":scope > .StopwatchTime"),this._stateChangeEventHandlers=[],this._totalRunningSeconds=0,this._tickEventHandlers=[]}return t.prototype._playPauseButton=null,t.prototype._recordButton=null,t.prototype._stopButton=null,t.prototype._stopwatchTime=null,t.prototype._isAutoStartEnabled=null,t.prototype._computerTimeToServerTimeOffsetMs=null,t.prototype._computerTimeToServerUtcTimeOffsetMs=null,t.prototype._currentStopwatchState=null,t.prototype._doNotNotify=null,t.prototype._ignoreClickEvents=null,t.prototype._initializing=null,t.prototype._initializingCompletePointer=null,t.prototype._isEnabled=null,t.prototype._lastPausedClientTime=null,t.prototype._lastPausedTime=null,t.prototype._pauseClientStopwatchUrl=null,t.prototype._pauseCompleteDelegate=null,t.prototype._pauseStopwatchUrl=null,t.prototype._recordClickDelegate=null,t.prototype._runningSeconds=null,t.prototype._runTimerTimeoutHandle=null,t.prototype._startStopwatchUrl=null,t.prototype._startTime=null,t.prototype._stateChangeEventHandlers=null,t.prototype._stopCompleteDelegate=null,t.prototype._stopStopwatchUrl=null,t.prototype._stopwatchStates=null,t.prototype._syncCode=null,t.prototype._syncManagement=null,t.prototype._testSecondsIntervalHandle=null,t.prototype._testSeconds=null,t.prototype._tickEventHandlers=null,t.prototype._timeEntryPage=null,t.prototype._timerStartTimeMs=null,t.prototype._timerTimeMs=null,t.prototype._timezoneOffsetMs=null,t.prototype._totalPausedSeconds=null,t.prototype._totalRunningSeconds=null,t.prototype._workListItemId=null,t.prototype.get_isEnabled=function(){return this._isEnabled},t.prototype.get_isInitialized=function(){return!this._initializing},t.prototype.get_lastPausedTime=function(){return this._lastPausedTime},t.prototype.get_pausedSeconds=function(){return this._totalPausedSeconds},t.prototype.get_runningSeconds=function(){return this._currentStopwatchState==this._stopwatchStates.Running?this._runningSeconds:this._totalRunningSeconds},t.prototype.get_state=function(){return this._currentStopwatchState},t.prototype.get_stopwatchStates=function(){return this._stopwatchStates},t.prototype.set_initializingCompletePointer=function(t){this._initializing?this._initializingCompletePointer=t:t()},t.prototype.set_workListItemId=function(t){null!==t&&"number"==typeof t||autotask.throwException("Stopwatch.set_workListItemId requires a non-null argument of type number."),this._workListItemId=t,this._syncManagement.__set_workListItemId(t)},t.prototype._get_currentComputerDate=function(){return new Date((new Date).getTime()+this._computerTimeToServerTimeOffsetMs)},t.prototype._onPlayPauseButtonClick=function(t){if(!this._ignoreClickEvents)switch(this._ignoreClickEvents=!0,this._currentStopwatchState){case this._stopwatchStates.Running:this._pauseStopwatch(!0);break;case this._stopwatchStates.Paused:case this._stopwatchStates.Stopped:this._startStopwatch(!1,!0);break;default:autotask.throwException("Unexpected stopwatch state: "+this._currentStopwatchState)}},t.prototype._onRecordButtonClick=function(t){t.stopPropagation(),this._ignoreClickEvents||(null!==this._timeEntryPage?this._openTimeEntryPage():this._recordClickDelegate())},t.prototype._onStopwatchNotify=function(t){this._doNotNotify=!0;var e=this._currentStopwatchState;if(this._currentStopwatchState=t.stopwatchState,this._runningSeconds=t.runningSeconds,this._totalRunningSeconds=t.totalRunningSeconds,this._totalPausedSeconds=t.totalPausedSeconds,t.startTime?this._startTime=new Date(t.startTime):this._startTime=null,t.lastPausedTime?this._lastPausedTime=new Date(t.lastPausedTime):this._lastPausedTime=null,this._timerStartTimeMs=t.timerStartTimeMs,this._timerTimeMs=t.timerTimeMs,e!==this._currentStopwatchState)switch(this._currentStopwatchState){case this._stopwatchStates.Running:this._startStopwatch(!0,!0);break;case this._stopwatchStates.Paused:e!==this._stopwatchStates.Stopped&&this._playPauseButton.classList.toggle("Pause"),this._lastPausedClientTime=new Date,this._refreshTimerTime(),this._raiseStateChangeEvent(this._currentStopwatchState,e,this._totalRunningSeconds,this._totalPausedSeconds);break;case this._stopwatchStates.Stopped:this._playPauseButton.classList.remove("DisabledState"),e!==this._stopwatchStates.Paused&&this._playPauseButton.classList.toggle("Pause"),this._startTime=null,this._lastPausedClientTime=null,this._refreshTimerTime(),this._raiseStateChangeEvent(this._currentStopwatchState,e,0,0);break;default:autotask.throwException("Unexpected stopwatch state: "+this._currentStopwatchState)}this._doNotNotify=!1},t.prototype._onStopButtonClick=function(t){if(this._currentStopwatchState!==this._stopwatchStates.Stopped){if(this._ignoreClickEvents)return;this._ignoreClickEvents=!0,this._stopStopwatch(!0)}},t.prototype.addStateChangeEventHandler=function(t){this._stateChangeEventHandlers.push(t)},t.prototype.addTickEventHandler=function(t){this._tickEventHandlers.push(t)},t.prototype.isAssociatedWithWorkListItem=function(){return null!==this._workListItemId},t.prototype.mergeAddToWorkListData=function(t){var e=0;if(null!==this._lastPausedTime){var i=this._lastPausedTime.getTime();e=Math.round(new Date((new Date).getTime()-i)/1e3)}var n=0;n=this._currentStopwatchState===this._stopwatchStates.Running?this._runningSeconds:this._totalRunningSeconds,t.stopwatchStateValue=this._currentStopwatchState,t.totalRunningSeconds=n,t.totalPausedSeconds=this._totalPausedSeconds,t.lastPausedSecondsAgo=e},t.prototype.pause=function(t){this._currentStopwatchState===this._stopwatchStates.Running&&(this._pauseCompleteDelegate=t||null,this._pauseStopwatch(!1))},t.prototype.stop=function(t){this._currentStopwatchState!==this._stopwatchStates.Stopped&&(this._stopCompleteDelegate=t||null,this._stopStopwatch(!1))},t.prototype.storeSyncData=function(){var t=new Autotask.StopwatchData(this._currentStopwatchState,this._runningSeconds,this._totalRunningSeconds,this._totalPausedSeconds,this._startTime,this._lastPausedTime,null!==this._lastPausedClientTime?this._lastPausedClientTime.getTime():null,this._timerStartTimeMs,this._timerTimeMs);return this._syncManagement.__storeSyncData(t),this._syncCode},t.prototype.__dispose=function(){window.clearInterval(this._testSecondsIntervalHandle),window.clearTimeout(this._runTimerTimeoutHandle),null!==this._syncManagement&&this._syncManagement.__clearListener()},t.prototype.__initialize=function(){if(this._initializing=!0,this._doNotNotify=!1,this._isEnabled){var t=!1;if(null!==this._syncCode?t=!0:(this._syncCode=(new Date).getTime().toString(),null===this._startTime&&this._currentStopwatchState===this._stopwatchStates.Running&&(this._startTime=this._get_currentComputerDate())),this._syncManagement=new Autotask.StopwatchSyncManagement(this._syncCode,this._workListItemId,autotask.proxy(this._onStopwatchNotify,this)),null===this._workListItemId){if(t){var e=this._syncManagement.__retrieveAndDeleteSyncData();null!==e?(this._currentStopwatchState=e.stopwatchState,this._runningSeconds=e.runningSeconds,this._totalRunningSeconds=e.totalRunningSeconds,this._totalPausedSeconds=e.totalPausedSeconds,null!==e.startTime?this._startTime=new Date(e.startTime):this._startTime=null,null!==e.lastPausedTime?this._lastPausedTime=new Date(e.lastPausedTime):this._lastPausedTime=null,null!==e.lastPausedClientTimeMs?this._lastPausedClientTime=new Date(e.lastPausedClientTimeMs):this._lastPausedClientTime=null,this._timerStartTimeMs=e.timerStartTimeMs,this._timerTimeMs=e.timerTimeMs):(this._syncCode=(new Date).getTime().toString(),this._syncManagement.__clearListener(),this._syncManagement=new Autotask.StopwatchSyncManagement(this._syncCode,this._workListItemId,autotask.proxy(this._onStopwatchNotify,this)),null===this._startTime&&this._currentStopwatchState===this._stopwatchStates.Running&&(this._startTime=this._get_currentComputerDate()))}}else{t&&this._syncManagement.__deleteSyncData();var i=this._syncManagement.__getLastNotification(autotask.notificationEventManagement.get_timestamp());i&&(new Date).getTime()-i.timestamp<2e3&&this._onStopwatchNotify(i)}switch(this._currentStopwatchState){case this._stopwatchStates.Running:if(this._totalRunningSeconds=this._calculateTotalRunningTime(this._get_currentComputerDate(),this._startTime,this._totalPausedSeconds),this._isTimerTooLong(this._totalRunningSeconds))return this._isInitializing=!1,void this._pauseStopwatch(!1);this._startStopwatch(!1,!1);break;case this._stopwatchStates.Paused:this._totalRunningSeconds=this._calculateTotalRunningTime(this._lastPausedTime,this._startTime,this._totalPausedSeconds),this._runningSeconds=this._totalRunningSeconds,this._stopwatchTime.classList.remove("Wait"),this._isTimerTooLong(this._totalRunningSeconds)&&(this._totalRunningSeconds=this._maxRunningSeconds(),this._playPauseButton.classList.add("DisabledState")),this._refreshTimerTime(),null!==this._workListItemId&&this._isAutoStartEnabled&&this._startStopwatch(!1,!1);break;case this._stopwatchStates.Stopped:this._runningSeconds=this._totalRunningSeconds,this._stopwatchTime.classList.remove("Wait"),this._refreshTimerTime(),null!==this._workListItemId&&this._isAutoStartEnabled&&this._startStopwatch(!1,!1);break;default:autotask.throwException("Unexpected stopwatch state: "+this._currentStopwatchState)}this._currentStopwatchState!==this._stopwatchStates.Running&&this._completeInitialization()}},t.prototype.__registerHandlers=function(){this._isEnabled&&(this._playPauseButton.addEventListener("click",autotask.proxy(this._onPlayPauseButtonClick,this)),this._stopButton.addEventListener("click",autotask.proxy(this._onStopButtonClick,this)),null!==this._recordButton&&this._recordButton.addEventListener("click",autotask.proxy(this._onRecordButtonClick,this)),this._ignoreClickEvents=!1)},t.prototype._calculateTotalRunningTime=function(t,e,i){var n=t.getTime()-e.getTime()-1e3*i,o=Math.floor(n/1e3);return o<0&&(o=0),o},t.prototype._checkSeconds=function(){(new Date).getSeconds()!==this._testSeconds&&(window.clearInterval(this._testSecondsIntervalHandle),this._timerStartTimeMs=(new Date).getTime(),this._runTimer(!0))},t.prototype._completeInitialization=function(){this._isAutoStartEnabled=!1,this._initializing=!1,null!==this._initializingCompletePointer&&this._initializingCompletePointer()},t.prototype._convertServerDateToLocalDate=function(t){return new Date(t.getTime()-this._timezoneOffsetMs+this._computerTimeToServerTimeOffsetMs)},t.prototype._enableButtonClickEvents=function(){if(this._ignoreClickEvents){var t=this;window.setTimeout((function(){t._ignoreClickEvents=!1}),2e3)}},t.prototype._formatTimeNumber=function(t){return t>9?t.toString():"0"+t.toString()},t.prototype._isTimerTooLong=function(t){return t>=this._maxRunningSeconds()},t.prototype._maxRunningSeconds=function(){return 86340},t.prototype._notify=function(){if(!this._doNotNotify){var t=new Autotask.StopwatchNotification(this._workListItemId,this._syncCode,this._currentStopwatchState,this._runningSeconds,this._totalRunningSeconds,this._totalPausedSeconds,this._startTime,this._lastPausedTime,this._timerStartTimeMs,this._timerTimeMs);this._syncManagement.__notify(t)}},t.prototype._openTimeEntryPage=function(){this._timeEntryPage.__open(null)},t.prototype._pauseStopwatch=function(t){this._currentStopwatchState=this._stopwatchStates.Paused,this._playPauseButton.classList.toggle("Pause"),this._totalRunningSeconds=this._runningSeconds,this._totalRunningSeconds<0&&(this._totalRunningSeconds=0),this._isTimerTooLong(this._totalRunningSeconds)&&(this._totalRunningSeconds=this._maxRunningSeconds(),this._refreshTimerTime(),this._playPauseButton.classList.add("DisabledState"));var e=this,i=function(i){e._pauseStopwatchSuccess(i,t)},n=null;if(this._workListItemId){var o=new Autotask.RestrictedJsonPostRoute(this._pauseStopwatchUrl);(n=new AutotaskRequestDataSystem.RequestData).addInteger("workListItemId",this._workListItemId),n.addInteger("totalRunningSeconds",this._totalRunningSeconds),n.addInteger("totalPausedSeconds",this._totalPausedSeconds),o.__makeRequest(n,i,!1)}else{o=new Autotask.RestrictedJsonPostRoute(this._pauseClientStopwatchUrl);(n=new AutotaskRequestDataSystem.RequestData).addInteger("totalRunningSeconds",this._totalRunningSeconds),n.addInteger("totalPausedSeconds",this._totalPausedSeconds),o.__makeRequest(n,i,!1)}this._enableButtonClickEvents()},t.prototype._pauseStopwatchSuccess=function(t,e){t.responseData.ID||(this._workListItemId=null),this._startTime=this._convertServerDateToLocalDate(t.responseData.StartTime),this._lastPausedTime=this._convertServerDateToLocalDate(t.responseData.LastPausedTime),this._totalPausedSeconds=t.responseData.TotalPausedSeconds,this._lastPausedClientTime=new Date,this._totalRunningSeconds=this._calculateTotalRunningTime(this._lastPausedTime,this._startTime,this._totalPausedSeconds),this._runningSeconds=this._totalRunningSeconds,this._stopwatchTime.classList.remove("Wait"),this._refreshTimerTime(),e&&this._raiseStateChangeEvent(this._currentStopwatchState,this._stopwatchStates.Running,this._totalRunningSeconds,this._totalPausedSeconds),this._notify(),null!==this._pauseCompleteDelegate&&(this._pauseCompleteDelegate(),this._pauseCompleteDelegate=null)},t.prototype._raiseStateChangeEvent=function(t,e,i,n){if(this._stateChangeEventHandlers.length>0)for(var o=new Autotask.StopwatchStateChangeEventArgs(t,e,i,n),a=0;a<this._stateChangeEventHandlers.length;a++)this._stateChangeEventHandlers[a](o)},t.prototype._raiseTickEvent=function(t,e){if(this._tickEventHandlers.length>0)for(var i=new Autotask.StopwatchTickEventArgs(t,e),n=0;n<this._tickEventHandlers.length;n++)this._tickEventHandlers[n](i)},t.prototype._refreshTimerTime=function(){var t=this._runningSeconds,e=t%60,i=(t-e)/60,n=i%60,o=parseInt(i/60,10),a=this._formatTimeNumber(o)+":"+this._formatTimeNumber(n)+":"+this._formatTimeNumber(e);this._stopwatchTime.innerText=a},t.prototype._runTimer=function(t){if(this._currentStopwatchState===this._stopwatchStates.Running){t&&this._runningSeconds>0||(t?this._timerTimeMs=0:this._timerTimeMs+=1e3,this._runningSeconds=Math.floor(this._timerTimeMs/1e3)+this._totalRunningSeconds);var e=0===this._timerTimeMs?0:(new Date).getTime()-this._timerStartTimeMs-this._timerTimeMs;if(e>1e3&&(this._timerTimeMs+=1e3*Math.floor(e/1e3),this._runningSeconds=Math.floor(this._timerTimeMs/1e3)+this._totalRunningSeconds,this._isTimerTooLong(this._runningSeconds)&&(this._runningSeconds=this._maxRunningSeconds()),e=0),this._stopwatchTime.classList.remove("Wait"),this._refreshTimerTime(),this._isTimerTooLong(this._runningSeconds))return void this._pauseStopwatch(!0);this._raiseTickEvent(this._runningSeconds,this._totalPausedSeconds),t&&(this._initializing&&null===this._workListItemId&&!this._isAutoStartEnabled||this._notify(),this._initializing&&this._completeInitialization()),this._runTimerTimeoutHandle=window.setTimeout(autotask.proxy(this._runTimer,this),1e3-e),this._enableButtonClickEvents()}},t.prototype._startStopwatch=function(t,e){if(!this._isTimerTooLong(this._totalRunningSeconds)){var i=this._currentStopwatchState;if(this._playPauseButton.classList.toggle("Pause"),!t)if(this._runningSeconds=0,this._lastPausedTime=null,this._currentStopwatchState=this._stopwatchStates.Running,this._workListItemId){var n=new Autotask.RestrictedJsonPostRoute(this._startStopwatchUrl),o=new AutotaskRequestDataSystem.RequestData;o.addInteger("workListItemId",this._workListItemId),n.__makeRequest(o,autotask.proxy(this._startStopwatchSuccess,this),!1)}else this._startTime||(this._startTime=this._get_currentComputerDate()),this._lastPausedClientTime&&(this._totalPausedSeconds+=Math.round(((new Date).getTime()-this._lastPausedClientTime.getTime())/1e3)),this._lastPausedClientTime=null;e&&this._raiseStateChangeEvent(this._currentStopwatchState,i,this._totalRunningSeconds,this._totalPausedSeconds),t?this._runTimer(!0):(this._testSeconds=(new Date).getSeconds(),this._testSecondsIntervalHandle=window.setInterval(autotask.proxy(this._checkSeconds,this),100))}},t.prototype._startStopwatchSuccess=function(t){t.responseData.ID?(this._totalPausedSeconds=t.responseData.TotalPausedSeconds,this._startTime||(this._startTime=this._convertServerDateToLocalDate(t.responseData.StartTime))):(this._workListItemId=null,this._lastPausedClientTime&&(this._totalPausedSeconds+=Math.round(((new Date).getTime()-this._lastPausedClientTime.getTime())/1e3))),this._lastPausedClientTime=null},t.prototype._stopStopwatch=function(t){this._runningSeconds=0,this._totalRunningSeconds=0,this._totalPausedSeconds=0,this._startTime=null,this._lastPausedTime=null,this._currentStopwatchState===this._stopwatchStates.Running&&this._playPauseButton.classList.toggle("Pause"),this._playPauseButton.classList.remove("DisabledState");var e=this._currentStopwatchState;if(this._currentStopwatchState=this._stopwatchStates.Stopped,this._refreshTimerTime(),t&&this._raiseStateChangeEvent(this._currentStopwatchState,e,0,0),this._workListItemId){var i=new Autotask.RestrictedJsonPostRoute(this._stopStopwatchUrl),n=new AutotaskRequestDataSystem.RequestData;n.addInteger("workListItemId",this._workListItemId),i.__makeRequest(n,autotask.proxy(this._stopStopwatchSuccess,this),!1),this._enableButtonClickEvents()}else this._notify(),this._enableButtonClickEvents(),null!==this._stopCompleteDelegate&&(this._stopCompleteDelegate(),this._stopCompleteDelegate=null)},t.prototype._stopStopwatchSuccess=function(t){t.responseData.IsWorklistItemFound||(this._workListItemId=null),this._notify(),null!==this._stopCompleteDelegate&&(this._stopCompleteDelegate(),this._stopCompleteDelegate=null)},t}(),Autotask.StopwatchData=function(){"use strict";function t(t,e,i,n,o,a,s,r,l){this.stopwatchState=t,this.runningSeconds=e,this.totalRunningSeconds=i,this.totalPausedSeconds=n,this.startTime=o,this.lastPausedTime=a,this.lastPausedClientTimeMs=s,this.timerStartTimeMs=r,this.timerTimeMs=l}return t.prototype.stopwatchState=null,t.prototype.runningSeconds=null,t.prototype.totalRunningSeconds=null,t.prototype.totalPausedSeconds=null,t.prototype.startTime=null,t.prototype.lastPausedTime=null,t.prototype.lastPausedClientTimeMs=null,t.prototype.timerStartTimeMs=null,t.prototype.timerTimeMs=null,t}(),Autotask.StopwatchStateChangeEventArgs=function(){"use strict";function t(t,e,i,n){this._currentState=t,this._previousState=e,this._runningSeconds=i,this._pausedSeconds=n}return t.prototype._currentState=null,t.prototype._pausedSeconds=null,t.prototype._previousState=null,t.prototype._runningSeconds=null,t.prototype.get_currentState=function(){return this._currentState},t.prototype.get_pausedSeconds=function(){return this._pausedSeconds},t.prototype.get_previousState=function(){return this._previousState},t.prototype.get_runningSeconds=function(){return this._runningSeconds},t}(),Autotask.StopwatchSyncManagement=function(){"use strict";function t(t,e,i){this._syncCode=t,this._workListItemId=e,this._notificationPointer=i,this._notificationType=autotask.notificationEventManagement.get_notificationTypes().StopwatchNotification,this._listenerId=(new Date).getTime(),autotask.notificationEventManagement.__addListener(this._notificationType,this._listenerId,autotask.proxy(this._onNotification,this))}return t.prototype._listenerId=null,t.prototype._notificationPointer=null,t.prototype._notificationType=null,t.prototype._syncCode=null,t.prototype._workListItemId=null,t.prototype.__set_workListItemId=function(t){this._workListItemId=t},t.prototype._onNotification=function(t){this._testNotificationOnwership(t)&&this._notificationPointer(t)},t.prototype.__clearListener=function(){autotask.notificationEventManagement.__removeListener(this._notificationType,this._listenerId),this._notificationPointer=null},t.prototype.__getLastNotification=function(t){var e=null,i=window.localStorage.getItem(this._notificationType);if(i&&(i=JSON.parse(i)),i&&i.length>1)for(var n=i.length-1;n>=0;n--)if(i[n].notificationEventManagerTimeStamp!==t&&this._testNotificationOnwership(i[n])){e=i[n];break}return e},t.prototype.__deleteSyncData=function(){autotask.localStorageManagement.__removeItem(this._syncCode)},t.prototype.__notify=function(t){autotask.notificationEventManagement.__notify(this._notificationType,t,this._listenerId)},t.prototype.__retrieveAndDeleteSyncData=function(){var t=null,e=autotask.localStorageManagement.__getItem(this._syncCode);return e&&(t=JSON.parse(e),this.__deleteSyncData()),t},t.prototype.__storeSyncData=function(t){autotask.localStorageManagement.__setItem(this._syncCode,JSON.stringify(t))},t.prototype._testNotificationOnwership=function(t){var e=!1;return(null!==t.workListItemId&&null!==this._workListItemId&&t.workListItemId===this._workListItemId||null!==t.syncCode&&null!==this._syncCode&&t.syncCode===this._syncCode)&&(e=!0),e},t}(),Autotask.StopwatchTickEventArgs=function(){"use strict";function t(t,e){this._runningSeconds=t,this._pausedSeconds=e}return t.prototype._pausedSeconds=null,t.prototype._runningSeconds=null,t.prototype.get_pausedSeconds=function(){return this._pausedSeconds},t.prototype.get_runningSeconds=function(){return this._runningSeconds},t}(),Autotask.NotificationEventManagement=function(){"use strict";function t(){this._notificationTypes={StopwatchNotification:"StopwatchNotification"},this._expireNotificationMs=1e4,this._timestamp=(new Date).getTime(),this._lastNotificationArray=[],this._notificationListeners=[]}return t.prototype._expireNotificationMs=null,t.prototype._lastNotificationArray=null,t.prototype._notificationListeners=null,t.prototype._timestamp=null,t.prototype.get_notificationTypes=function(){return this._notificationTypes},t.prototype.get_timestamp=function(){return this._timestamp},t.prototype._localStorageChangedHandler=function(t,e){var i=t;if(this._notificationListeners[i]){var n=null!==e?JSON.parse(e):null;if(null!==n){var o=this._getNewNotifications(n,this._lastNotificationArray[i]);this._lastNotificationArray[i]=n,o&&this._raiseNotifications(i,o)}}},t.prototype.__addListener=function(t,e,i){t?(this._notificationListeners[t]||(this._notificationListeners[t]=[]),this._notificationListeners[t].push({timestamp:(new Date).getTime(),listenerId:e,fn:i})):autotask.throwException("Invalid Notification Type when attempting to bind Listener.")},t.prototype.__initialize=function(){autotask.localStorageManagement.__addStorageChangedHandler(autotask.proxy(this._localStorageChangedHandler,this))},t.prototype.__notify=function(t,e,i){if(t){e.notificationEventManagerTimestamp=this.get_timestamp();var n=autotask.localStorageManagement.__getItem(t);if((n=(n=n?JSON.parse(n):[]).filter(autotask.proxy((function(t){return Number(t.timestamp)>(new Date).getTime()-this._expireNotificationMs}),this))).push(e),autotask.localStorageManagement.__setItem(t,JSON.stringify(n)),null!==i){var o=this._findSameWindowListeners(i,t);o.length>0&&this._raiseSameWindowNotifications(o,n)}}else autotask.throwException("Invalid Notification Object when attempting to Notify.")},t.prototype.__removeListener=function(t,e){if(t||autotask.throwException("Invalid Notification Type when attempting to bind Listener."),this._notificationListeners[t]){for(var i=this._notificationListeners[t],n=null,o=0;o<i.length;o++)if(i[o].listenerId===e){n=o;break}null!==n&&(i.splice(n,1),0===i.length&&this._notificationListeners.splice(this._notificationListeners.indexOf(t),1))}},t.prototype._findSameWindowListeners=function(t,e){var i=this._notificationListeners[e],n=[];if(i&&i.length>1)for(var o=0;o<i.length;o++)i[o].listenerId!==t&&n.push(i[o]);return n},t.prototype._getNewNotifications=function(t,e){if(!t)return null;if(!e||0===e.length)return t;for(var i=[],n=t.length;n--;){for(var o=!1,a=e.length;a--;)if(t[n].timestamp===e[a].timestamp){o=!0;break}o||i.push(t[n])}return 0===i.length?null:i},t.prototype._raiseNotifications=function(t,e){for(var i=0;i<this._notificationListeners[t].length;i++)for(var n=0;n<e.length;n++)e[n].timestamp>this._notificationListeners[t][i].timestamp&&this._timestamp!==e[n].notificationEventManagerTimestamp&&this._notificationListeners[t][i].fn.call(this._notificationListeners[t][i].fn,e[n])},t.prototype._raiseSameWindowNotifications=function(t,e){for(var i=0;i<t.length;i++)for(var n=0;n<e.length;n++)t[i].fn(e[n])},t}(),window.Autotask.DeprecatedSubmitRoute=function(){"use strict";function t(t){this._requestCoordinator=new Autotask.AjaxRequestCoordinator("POST",t)}return t.prototype._requestCoordinator=null,t.prototype._onResponseProcessing=function(t,e){if(null!==e){var i={};i.value=t.value;var n=[];if(void 0!==t.businessLogicErrors&&null!==t.businessLogicErrors&&t.businessLogicErrors.length>0)for(var o=0;o<t.businessLogicErrors.length;o++)n.push(t.businessLogicErrors[o]);i.customValidationMessages=n,e(i)}},t.prototype.makeRequest=function(t,e){var i=this,n=new Autotask.AjaxRequestData(t.__data,!0);this._requestCoordinator.__sendRequest(n.__serialize(),(function(t){i._onResponseProcessing(t,e)}),null,!0,"DeprecatedSubmit")},t}(),window.DeprecatedSubmitRouteCreator=function(){"use strict";function t(){}return t.prototype.createDeprecatedSubmitRoute=function(t){return new Autotask.DeprecatedSubmitRoute(t)},t}(),window.RetrievePrintPreviewUrlRoute=function(){"use strict";function t(t){this._requestCoordinator=new Autotask.AjaxRequestCoordinator("POST",t)}return t.prototype._requestCoordinator=null,t.prototype._onResponseProcessing=function(t,e){if(null!==e){var i={};i.url=t.url;var n=[];if(void 0!==t.validationMessages)for(var o=0;o<t.validationMessages.length;o++)n.push(t.validationMessages[o]);i.customValidationMessages=n,e(i)}},t.prototype.makeRequest=function(t,e){var i=null;null!==t&&(i=t.__data);var n=new Autotask.AjaxRequestData(i,!0).__serialize(),o=this;this._requestCoordinator.__sendRequest(n,(function(t){o._onResponseProcessing(t,e)}),null,!0,"PrintPreviewUrl")},t}(),window.Autotask.SubmitRoute=function(){"use strict";function t(t){this._requestCoordinator=new Autotask.AjaxRequestCoordinator("POST",t)}return t.prototype._requestCoordinator=null,t.prototype._onResponseProcessing=function(t,e){if(null!==e){var i={};if(void 0!==t.responseDataId){var n=new Autotask.InstanceTracker(t.responseDataId,null);n.__loadScript(t.script);var o=autotask.find(t.responseDataId);i.responseData=o.data,n.__dispose()}var a=[];if(void 0!==t.validationMessages)for(var s=0;s<t.validationMessages.length;s++)a.push(t.validationMessages[s]);i.customValidationMessages=a,e(i)}},t.prototype.makeRequest=function(t,e){var i=null;null!==t&&(i=t.__data);var n=new Autotask.AjaxRequestData(i,!0).__serialize(),o=this;this._requestCoordinator.__sendRequest(n,(function(t){o._onResponseProcessing(t,e)}),null,!0,"Submit")},t}(),window.SubmitRouteCreator=function(){"use strict";function t(){}return t.prototype.createSubmitRoute=function(t){return new Autotask.SubmitRoute(t)},t}(),window.AutotaskSummaryPages.ReplaceMenuContentRoute=function(){"use strict";function t(t){this._requestCoordinator=new Autotask.AjaxRequestCoordinator("GET",t)}return t.prototype._requestCoordinator=null,t.prototype._onResponseProcessing=function(t,e){var i=new Autotask.AjaxResponseHtmlAndJavaScript(t.htmlJavaScriptPair);e(t.menuInstanceId,i.htmlForInstanceTrackerContainer,i.script)},t.prototype.__makeRequest=function(t,e){var i=null;null!==t&&(i=t.__data);var n=new Autotask.AjaxRequestData(i,!1).__serialize(),o=this;this._requestCoordinator.__sendRequest(n,(function(t){o._onResponseProcessing(t,e)}),null,!0,"SummaryMenuContent")},t}(),window.AutotaskSummaryPages.ReplacePrimaryContentRoute=function(){"use strict";function t(t){this._requestCoordinator=new Autotask.AjaxRequestCoordinator("GET",t)}return t.prototype._requestCoordinator=null,t.prototype._onResponseProcessing=function(t,e){var i=new Autotask.AjaxResponseHtmlAndJavaScript(t.htmlJavaScriptPair);e(i.htmlForInstanceTrackerContainer,i.script,t.helpId)},t.prototype.__makeRequest=function(t,e){var i=null;null!==t&&(i=t.__data);var n=new Autotask.AjaxRequestData(i,!1).__serialize(),o=this;this._requestCoordinator.__sendRequest(n,(function(t){o._onResponseProcessing(t,e)}),null,!0,"SummaryPrimaryContent")},t}(),window.Autotask.FormTab=function(t){"use strict";function e(e){t.call(this,e)}return autotask.inherit(e,t),e.prototype.___adjustHeadingLayout=function(){},e}(Autotask.StandardTab),window.Autotask.SearchGridTab=function(t){"use strict";function e(e,i,n){t.call(this,e,n),this._gridId=n,this._isSearchRequested=!1,this._sectionId=i}return autotask.inherit(e,t),e.prototype._grid=null,e.prototype._gridId=null,e.prototype._isSearchRequested=null,e.prototype._section=null,e.prototype._sectionId=null,e.prototype._serializedRequestData=null,e.prototype.get_isSearchRequested=function(){return this._isSearchRequested},e.prototype._onSearch=function(){this._section.__validate()&&(this._serializeDataAndRefreshGrid(),this._isSearchRequested=!0)},e.prototype.generateFormData=function(){return this._serializedRequestData},e.prototype.__initialize=function(){t.prototype.__initialize.call(this),this._grid=autotask.find(this._gridId),this._section=autotask.find(this._sectionId),this._section.__get_hasPreAppliedFilters()&&(this._serializedRequestData=this._section.__generateSerializedRequestData())},e.prototype.__registerHandlers=function(){this._section.__addSearch(autotask.proxy(this._onSearch,this))},e.prototype._serializeDataAndRefreshGrid=function(){this._serializedRequestData=this._section.__generateSerializedRequestData(),this._grid.refreshAndClearState(!1,!1,!1)},e}(Autotask.GridTab),window.Autotask.Tab=function(t){"use strict";function e(e){t.call(this,e),this._fieldContainer=document.getElementById(e),this._immutableData=[],this._submittingPointers=[]}return autotask.inherit(e,t),e.prototype._fieldContainer=null,e.prototype._fieldValidation=null,e.prototype._immutableData=null,e.prototype._submittingPointers=null,e.prototype._validationSummary=null,e.prototype.addSubmitting=function(t){this._submittingPointers.push(t)},e.prototype.ajaxSubmit=function(t,e){var i=new AutotaskAjaxSystem.SubmittingEventArgs;this._submitting(i);var n=i.requestData,o=new Autotask.SubmitRoute(t),a=this._validationSummary.__get_customValidationSummary();o.makeRequest(n,(function(t){a.clearMessages();for(var i=0;i<t.customValidationMessages.length;i++)a.addMessage(i.toString(),t.customValidationMessages[i]);var n={};n.validationFailure=t.customValidationMessages.length>0,n.responseData=t.responseData,e(n)}))},e.prototype.deprecatedAjaxSubmit=function(t,e){if(this.validate()){var i=new Autotask.TabSubmittingEventArgs;this._submitting(i);var n=i.__get_data(),o=this._validationSummary.__get_customValidationSummary();autotask.ajax.__restrictedPostRequest(t,n,e).__deprecatedSubmit(o)}},e.prototype.generateFieldData=function(){for(var t=[this._fieldContainer],e=new AutotaskRequestDataSystem.SerializedRequestData(t),i=0;i<this._immutableData.length;i++)e.__addImmutableData(this._immutableData[i]);return e},e.prototype.validate=function(){return this._validate(!1)},e.prototype.validateEditor=function(t){return"function"==typeof t.validate?t.validate():this._fieldValidation.__validateLegacyEditor(t.__get_id(),!1)},e.prototype.__addImmutableData=function(t){this._immutableData.push(t)},e.prototype.__finalize=function(){this._fieldValidation.__parse()},e.prototype.__initialize=function(){this._fieldValidation=new Autotask.PostedContainerValidation(this._fieldContainer),this._validationSummary=autotask.validationSummaryManagement.__findValidationSummary(this._fieldContainer)},e.prototype.__registerHandlers=function(){this._fieldValidation.__registerValidationSummary(this._validationSummary)},e.prototype.__resetValidation=function(){this._fieldValidation.__reset(),this._validationSummary.__get_isActive()&&this._validate(!0)},e.prototype.___adjustHeadingLayout=function(){},e.prototype._submitting=function(t){for(var e=0;e<this._submittingPointers.length;e++)this._submittingPointers[e](t)},e.prototype._validate=function(t){var e=this._fieldValidation.__validate();return e||this._fieldValidation.__validationFailed(),this._fieldValidation.__validationCompleted(e,t),e},e}(Autotask.StandardTab),window.Autotask.TabSubmittingEventArgs=function(){"use strict";function t(){this._data={}}return t.prototype._data=null,t.prototype.__get_data=function(){return this._data},t.prototype.add=function(t,e){"string"!=typeof t&&window.autotask.throwException("When adding key/value pairs to TabSubmittingEventArgs, the key must be a string."),this._data[t]=e},t}(),window.Autotask.ReplaceColumnContentRoute=function(){"use strict";function t(t){this._requestCoordinator=new Autotask.AjaxRequestCoordinator("POST",t)}return t.prototype._requestCoordinator=null,t.prototype._onResponseProcessing=function(t,e){var i=new Autotask.AjaxResponseHtmlAndJavaScript(t.htmlJavaScriptPair),n={};n.html=i.htmlForInstanceTrackerContainer,n.javaScript=i.script,e(n)},t.prototype.__replaceEntityPageLargeColumnContent=function(t,e){return this._replaceContent(t,e,!0,"EntityPageReplaceableLargeColumn")},t.prototype.__replaceLargeColumnContent=function(t,e){return this._replaceContent(t,e,!0,"ReplaceableLargeColumn")},t.prototype.__replaceNormalColumnContent=function(t,e){return this._replaceContent(t,e,!0,"ReplaceableNormalColumn")},t.prototype.__replaceOperandColumnContent=function(t,e){return this._replaceContent(t,e,!0,"ReplaceableOperandColumn")},t.prototype.__transitionEntityPageLargeColumnContent=function(t,e){return this._replaceContent(t,e,!1,"EntityPageReplaceableLargeColumn")},t.prototype.__transitionLargeColumnContent=function(t,e){return this._replaceContent(t,e,!1,"ReplaceableLargeColumn")},t.prototype.__transitionNormalColumnContent=function(t,e){return this._replaceContent(t,e,!1,"ReplaceableNormalColumn")},t.prototype.__transitionOperandColumnContent=function(t,e){return this._replaceContent(t,e,!1,"ReplaceableOperandColumn")},t.prototype._replaceContent=function(t,e,i,n){var o=new Autotask.AjaxRequestData(t,!0).__serialize(),a=this;this._requestCoordinator.__sendRequest(o,(function(t){a._onResponseProcessing(t,e)}),null,i,n);return new Autotask.AjaxRequestCanceler((function(){a._requestCoordinator.__cancelRequest()}))},t}(),Autotask.TaskTimelineItem=function(){"use strict";function t(t,e,i,n){autotask.instanceManagement.__addRegistrationKey(this,t),this._timelineItemElement=document.getElementById(t),this._page=n,this._progressBarElementId=i,this._titleTextElementId=e}return t.prototype._timelineItemElement=null,t.prototype._page=null,t.prototype._progressBarElementId=null,t.prototype._titleTextElementId=null,t.prototype._onClick=function(){this._page.__open(null)},t.prototype.__registerHandlers=function(){for(var t="#"+this._titleTextElementId+",#"+this._progressBarElementId,e=this._timelineItemElement.querySelectorAll(t),i=0;i<e.length;i++)e[i].addEventListener("click",autotask.proxy(this._onClick,this))},t}(),Autotask.TimelineContextOverlayConnector=function(){"use strict";function t(t,e,i,n){autotask.instanceManagement.__addRegistrationKey(this,t),this._launchingElement=document.getElementById(i),this._eventsManagement=new Autotask.ContextOverlayEventsManagement,this._overlay=new Autotask.ContextOverlay(e,!1),this._isOverlayPositionedAboveLaunchingElement=n}return t.prototype._launchingElement=null,t.prototype._contextOverlay=null,t.prototype._eventsManagement=null,t.prototype._isOverlayPositionedAboveLaunchingElement=null,t.prototype._overlayPositioning=function(t){var e=new Autotask.ContextOverlayDirectionPriority,i=t.__get_launchingElementWidth()/2-t.__get_overlayWidth()/2;return this._isOverlayPositionedAboveLaunchingElement?(e.set_firstPriorityDirection(Autotask.ContextOverlayPositionDirection.Top),t.get_topPosition().set_topOffset(-12),t.get_topPosition().set_leftOffset(i)):(e.set_firstPriorityDirection(Autotask.ContextOverlayPositionDirection.Bottom),e.set_secondPriorityDirection(Autotask.ContextOverlayPositionDirection.Top),t.get_topPosition().set_topOffset(-12),t.get_topPosition().set_leftOffset(i),t.get_bottomPosition().set_topOffset(12),t.get_bottomPosition().set_leftOffset(i)),t.__overridePriority(e),t.__set_isArrowCentered(!0),!0},t.prototype.__initialize=function(){},t.prototype.__registerHandlers=function(){this._overlay.__addPositioning(autotask.proxy(this._overlayPositioning,this)),this._eventsManagement.__registerSelection(this._launchingElement,null,autotask.proxy(this._show,this),autotask.proxy(this._hide,this))},t.prototype._hide=function(){this._overlay.hide()},t.prototype._show=function(){this._overlay.show(this._launchingElement)},t}(),window.Autotask.RefreshTimeEntryTimelineRoute=function(){"use strict";function t(t){this._requestCoordinator=new Autotask.AjaxRequestCoordinator("GET",t)}return t.prototype._requestCoordinator=null,t.prototype._onResponseProcessing=function(t,e){var i=new Autotask.AjaxResponseHtmlAndJavaScript(t.htmlAndJavaScript);e(t.timelineId,i.htmlForInstanceTrackerContainer,i.script)},t.prototype.refresh=function(t,e){var i=new Autotask.AjaxRequestData(t,!1).__serialize(),n=this;this._requestCoordinator.__sendRequest(i,(function(t){n._onResponseProcessing(t,e)}),null,!1,"RefreshTimeEntryTimeline");return new Autotask.AjaxRequestCanceler((function(){n._requestCoordinator.__cancelRequest()}))},t}(),window.Autotask.PrintPreviewPagerChangeEventArgs=function(){"use strict";function t(t){this._value=t}return t.prototype._value=null,t.prototype.get_value=function(){return this._value},t}(),window.Autotask.PrintPreviewPager=function(){"use strict";function t(t,e){autotask.instanceManagement.__addRegistrationKey(this,t);var i=document.getElementById(t),n=i.getElementsByClassName("PagePrevious")[0],o=i.getElementsByTagName("select")[0],a=i.getElementsByClassName("PageNext")[0];this._activeCssClass="Active",this._changeDelegate=e,this._pageNext=a,this._pageNumberText=i.getElementsByClassName("PageNumber")[0],this._pagePrevious=n,this._pageSelect=o,n.addEventListener("click",autotask.proxy(this._pagePreviousClick,this)),o.onchange=autotask.proxy(this._pageSelectChange,this),a.addEventListener("click",autotask.proxy(this._pageNextClick,this))}return t.prototype._activeCssClass=null,t.prototype._changeDelegate=null,t.prototype._pageNext=null,t.prototype._pageNumberText=null,t.prototype._pagePrevious=null,t.prototype._pageSelect=null,t.prototype._pageNextClick=function(){var t=this._pageSelect.selectedIndex;t<this._pageSelect.length-1&&(this._pageSelect.selectedIndex=++t,this._updateButtonState(t),this._updateText(t),this._onChange(this._pageSelect.value))},t.prototype._pagePreviousClick=function(){var t=this._pageSelect.selectedIndex;t>0&&(this._pageSelect.selectedIndex=--t,this._updateButtonState(t),this._updateText(t),this._onChange(this._pageSelect.value))},t.prototype._pageSelectChange=function(){var t=this._pageSelect.selectedIndex;this._updateButtonState(t),this._updateText(t),this._onChange(this._pageSelect.value)},t.prototype._updateButtonState=function(t){t>0&&this._pagePrevious.classList.add(this._activeCssClass),t<this._pageSelect.length-1&&this._pageNext.classList.add(this._activeCssClass),t===this._pageSelect.length-1&&this._pageNext.classList.remove(this._activeCssClass),0===t&&this._pagePrevious.classList.remove(this._activeCssClass)},t.prototype._updateText=function(t){this._pageNumberText.textContent=autotask.convert.integerToString(t+1)},t.prototype._onChange=function(t){var e=new Autotask.PrintPreviewPagerChangeEventArgs(t);this._changeDelegate(e)},t}(),window.UrlCreator=function(){"use strict";function t(){}return t.prototype.createUrl=function(t){return new Autotask.Url(t)},t}(),window.Autotask.ListValueMultipleDataSelectorCreateValueDialogRoute=function(){"use strict";function t(t){this._requestCoordinator=new Autotask.AjaxRequestCoordinator("POST",t)}return t.prototype._requestCoordinator=null,t.prototype.makeRequest=function(t){var e=new Autotask.AjaxRequestData({},!0).__serialize(),i=this;this._requestCoordinator.__sendRequest(e,(function(e){i._onResponseProcessing(e,t)}),null,!0,"UserDefinedFieldMultipleDataSelectorCreateValueDialog");return new Autotask.AjaxRequestCanceler((function(){i._requestCoordinator.__cancelRequest()}))},t.prototype._onResponseProcessing=function(t,e){var i=new Autotask.AjaxResponseHtmlAndJavaScript(t.htmlJavaScriptPair);autotask.dialogManagement.__loadDialog(i),null!=e&&e(t.dialogId)},t}(),window.Autotask.PopulateListValueMultipleDataSelectorRoute=function(){"use strict";function t(t,e){this._requestCoordinator=new Autotask.AjaxRequestCoordinator("POST",t),this._modelParameterName=e}return t.prototype._requestCoordinator=null,t.prototype._modelParameterName=null,t.prototype.get_modelParameterName=function(){return this._modelParameterName},t.prototype.sendPopulateRequest=function(t,e){var i=new Autotask.AjaxRequestData(t,!0).__serialize(),n=this;this._requestCoordinator.__sendRequest(i,(function(t){n._onResponseProcessing(t,e)}),null,!1,"PopulateUserDefinedFieldMultipleDataSelector");return new Autotask.AjaxRequestCanceler((function(){n._requestCoordinator.__cancelRequest()}))},t.prototype._onResponseProcessing=function(t,e){var i=new Autotask.InstanceTracker(t.selectionInstanceId,null);i.__loadScript(t.script);var n=autotask.find(t.selectionInstanceId).chipInformation,o=null;null!==t.itemCreatorContainerId&&(o=autotask.find(t.itemCreatorContainerId).itemCreators);var a=autotask.find(t.responseDataId);i.__dispose(),e(a,t.isLocked,t.isBrowseOnly,t.placeholderText,n,t.html,o)},t}(),Autotask.AutomatedValidationSummary=function(){"use strict";var t=1,e=2,i=3,n=4,o=5,a=6,s=1,r=2,l=3,_=4;function u(t,e,i){this._formValidation=t.lastElementChild,this._errorContent=this._formValidation.firstElementChild,this._errorContent.addEventListener("click",autotask.proxy(this._onErrorContentClick,this)),this._transitionContainer=this._errorContent.firstElementChild,this._count=this._transitionContainer.querySelector(".Count:not(.Spacer)"),this._message=this._transitionContainer.querySelector(".Message"),this._nextMessageButton=this._formValidation.querySelector(".Down"),this._nextMessageButton.addEventListener("click",autotask.proxy(this._onNextMessageButtonClick,this)),this._previousMessageButton=this._formValidation.querySelector(".Up"),this._previousMessageButton.addEventListener("click",autotask.proxy(this._onPreviousMessageButtonClick,this)),this._errorMessage=e,this._reminderMessage=i,this._closedOverlayEditorIds=[],this._editorValidationData=[],this._isActive=!1,this._isNextMessageButtonDisabled=!1,this._isPreviousMessageButtonDisabled=!1,this._validationSpotlightingPointers=[]}return u.prototype._count=null,u.prototype._errorContent=null,u.prototype._message=null,u.prototype._nextMessageButton=null,u.prototype._previousMessageButton=null,u.prototype._formValidation=null,u.prototype._transitionContainer=null,u.prototype._closedOverlayEditorIds=null,u.prototype._currentEditorValidationIndex=null,u.prototype._editorValidationData=null,u.prototype._errorMessage=null,u.prototype._errorSwitchedPointer=null,u.prototype._isActive=null,u.prototype._isNextMessageButtonDisabled=null,u.prototype._isPreviousMessageButtonDisabled=null,u.prototype._lastEditorCorrectedPointer=null,u.prototype._reminderMessage=null,u.prototype._tabEditorFailedPointer=null,u.prototype._transitioningTimeoutId=null,u.prototype._validationSpotlightingPointers=null,u.prototype.__get_hasErrors=function(){return this._editorValidationData.length>0},u.prototype.__get_isActive=function(){return this._isActive},u.prototype._onCorrectionComplete=function(){this._transitioningTimeoutId=null,this._applyTransitioningState(r)},u.prototype._onCorrectionEnding=function(e){this._applySummaryState(t),this._refreshDisplay(),null!==e&&e(),this._applyTransitioningState(l);var i=this;this._transitioningTimeoutId=window.setTimeout((function(){i._onCorrectionComplete()}),250)},u.prototype._onErrorContentClick=function(){this._spotlight()},u.prototype._onNextMessageButtonClick=function(){this._isNextMessageButtonDisabled||(this._cancelTransitioning(),this._displayNextError())},u.prototype._onOverlayClose=function(t){this._closedOverlayEditorIds.indexOf(t.participantId)<0&&this._closedOverlayEditorIds.push(t.participantId)},u.prototype._onPreviousMessageButtonClick=function(){this._isPreviousMessageButtonDisabled||(this._cancelTransitioning(),this._displayPreviousError())},u.prototype.__activate=function(){if(!this._isActive){var t=o;this._editorValidationData.length>1&&(t=i),this._applySummaryState(t),this._isActive=!0}},u.prototype.__addValidationSpotlighting=function(t){this._validationSpotlightingPointers.push(t)},u.prototype.__customValidationFailureAdded=function(){autotask.globalValidationOverlay.hide(null),this._isActive&&0===this._editorValidationData.length&&(this._cancelTransitioning(),this._hideReminder())},u.prototype.__customValidationFailureRemoved=function(){autotask.globalValidationOverlay.hide(null),this._isActive&&0===this._editorValidationData.length&&(this._cancelTransitioning(),this._displayReminder())},u.prototype.__deactivate=function(){this._isActive&&0===this._editorValidationData.length&&(this._currentEditorValidationIndex=null,this._editorValidationData=[],this._isActive=!1,this._cancelTransitioning(),this._applySummaryState(a))},u.prototype.__displayFirstError=function(t){this._currentEditorValidationIndex=0,this._refreshDisplay(),t||this._spotlight()},u.prototype.__editorCorrected=function(t){this._isActive?this._startCorrection(t):this._removeEditorValidationData(t),autotask.globalValidationOverlay.hide(t);var e=this._closedOverlayEditorIds.indexOf(t);e>-1&&this._closedOverlayEditorIds.splice(e,1)},u.prototype.__editorFailed=function(t,e,i,n,o,a){if(this._addEditorValidationData(t,e,i,n,o),this._isActive){this._cancelTransitioning();var s=this._findEditorValidationDataIndex(t);null!==s&&(this._currentEditorValidationIndex=s),this._refreshDisplay()}if(a)if(this._closedOverlayEditorIds.indexOf(t)<0){var r=autotask.find(t);if("function"!=typeof r.validate){var l=1===i,_=r.__get_allowedConcurrentlyVisibleOverlays();autotask.globalValidationOverlay.show(e,t,n,l,autotask.proxy(this._onOverlayClose,this),_)}}else autotask.globalValidationOverlay.hide(null)},u.prototype.__removeErrors=function(t){for(var e=0;e<t.length&&(this._removeEditorValidationData(t[e]),0!==this._editorValidationData.length);e++);this._cancelTransitioning(),this._isActive&&(this._refreshDisplay(),0===this._editorValidationData.length&&this._displayReminder())},u.prototype.__setErrorSwitched=function(t){this._errorSwitchedPointer=t},u.prototype.__setLastEditorCorrected=function(t){this._lastEditorCorrectedPointer=t},u.prototype.__setTabEditorFailed=function(t){this._tabEditorFailedPointer=t},u.prototype._addEditorValidationData=function(t,e,i,n,o){var a=null,s=this._findEditorValidationDataIndex(t);null===s?(0===this._editorValidationData.length&&this._incrementCurrentIndex(),(a={}).editorId=t,a.element=e,a.positionRequirement=i,this._editorValidationData.push(a)):a=this._editorValidationData[s],a.basicMessage=n,a.detailedMessage=o},u.prototype._applySummaryState=function(s){var r="Corrected",l="Reminder",_="Single",u="Valid";switch(s){case t:this._formValidation.classList.remove(u),this._formValidation.classList.remove(l),this._formValidation.classList.remove(r);break;case e:this._formValidation.classList.remove(u),this._formValidation.classList.remove(l),this._formValidation.classList.add(r);break;case i:this._formValidation.classList.remove(u),this._formValidation.classList.remove(_),this._formValidation.classList.remove(l);break;case n:this._formValidation.classList.remove(u),this._formValidation.classList.remove(r),this._formValidation.classList.remove(_),this._formValidation.classList.add(l);break;case o:this._formValidation.classList.remove(u),this._formValidation.classList.remove(l),this._formValidation.classList.add(_);break;case a:this._formValidation.classList.remove(r),this._formValidation.classList.remove(_),this._formValidation.classList.remove(l),this._formValidation.classList.add(u);break;default:autotask.throwException("An unknown summary state was identified: "+s+".")}},u.prototype._applyTransitioningState=function(t){var e="Fade",i="Transitioning";switch(t){case s:case r:this._transitionContainer.classList.remove(i),this._transitionContainer.classList.remove(e);break;case l:this._transitionContainer.classList.remove(e);break;case _:this._transitionContainer.classList.add(i),this._transitionContainer.classList.add(e);break;default:autotask.throwException("An unknown transitioning state was identified: "+t+".")}},u.prototype._cancelTransitioning=function(){null!==this._transitioningTimeoutId&&(window.clearTimeout(this._transitioningTimeoutId),this._transitioningTimeoutId=null,this._applySummaryState(t),this._applyTransitioningState(s))},u.prototype._createCorrectionEndingDelegate=function(){var t={hasCustomValidationFailure:!1};this._lastEditorCorrectedPointer(t);var e=autotask.proxy(this._displayReminder,this);return t.hasCustomValidationFailure&&(e=autotask.proxy(this._hideReminder,this)),e},u.prototype._decrementCurrentIndex=function(){null===this._currentEditorValidationIndex||0===this._currentEditorValidationIndex?this._currentEditorValidationIndex=null:this._currentEditorValidationIndex--},u.prototype._displayNextError=function(){this._incrementCurrentIndex(),this._refreshDisplay(),this._errorSwitchedPointer(),this._spotlight()},u.prototype._displayPreviousError=function(){this._decrementCurrentIndex(),this._refreshDisplay(),this._errorSwitchedPointer(),this._spotlight()},u.prototype._displayReminder=function(){this._applySummaryState(n),this._message.innerText=this._reminderMessage},u.prototype._findEditorValidationDataIndex=function(t){for(var e=null,i=0;i<this._editorValidationData.length;i++)if(t===this._editorValidationData[i].editorId){e=i;break}return e},u.prototype._hideReminder=function(){this._applySummaryState(a)},u.prototype._incrementCurrentIndex=function(){null===this._currentEditorValidationIndex?this._currentEditorValidationIndex=0:this._currentEditorValidationIndex++},u.prototype._refreshDisplay=function(){this._refreshCount(),this._refreshMessage(),this._refreshNavigationButtonState()},u.prototype._refreshCount=function(){var t=o;this._editorValidationData.length>1&&(t=i),this._applySummaryState(t);var e=null;if(null!==this._currentEditorValidationIndex&&this._editorValidationData.length>1&&this._currentEditorValidationIndex<this._editorValidationData.length){var n=this._currentEditorValidationIndex+1;e=(e=(e=this._errorMessage).replace("{0}",n)).replace("{1}",this._editorValidationData.length)}this._count.innerText=e},u.prototype._refreshMessage=function(){var t=null;null!==this._currentEditorValidationIndex&&this._currentEditorValidationIndex<this._editorValidationData.length&&(void 0!==this._editorValidationData[this._currentEditorValidationIndex]&&null===(t=this._editorValidationData[this._currentEditorValidationIndex].detailedMessage)&&(t=this._editorValidationData[this._currentEditorValidationIndex].basicMessage));this._message.innerText=t},u.prototype._refreshNavigationButtonState=function(){var t="DisabledState";null===this._currentEditorValidationIndex||this._currentEditorValidationIndex===this._editorValidationData.length-1?(this._isNextMessageButtonDisabled=!0,this._nextMessageButton.classList.add(t)):(this._isNextMessageButtonDisabled=!1,this._nextMessageButton.classList.remove(t)),null===this._currentEditorValidationIndex||0===this._currentEditorValidationIndex?(this._isPreviousMessageButtonDisabled=!0,this._previousMessageButton.classList.add(t)):(this._isPreviousMessageButtonDisabled=!1,this._previousMessageButton.classList.remove(t))},u.prototype._removeEditorValidationData=function(t){var e=this._findEditorValidationDataIndex(t);null!==e&&(0===e&&1===this._editorValidationData.length?(this._editorValidationData=[],this._currentEditorValidationIndex=null):((e<this._currentEditorValidationIndex||e===this._currentEditorValidationIndex&&e===this._editorValidationData.length-1&&this._editorValidationData.length>1)&&this._currentEditorValidationIndex--,this._editorValidationData.splice(e,1)))},u.prototype._selectTab=function(t){var e=t.closest(".TabContainer");if(null!==e){var i=e.id,n={};n.tabId=i,this._tabEditorFailedPointer(n)}},u.prototype._spotlight=function(){if(null!==this._currentEditorValidationIndex){var t=this._editorValidationData[this._currentEditorValidationIndex];if(null!==t){var e={};e.editorId=t.editorId;for(var i=0;i<this._validationSpotlightingPointers.length;i++)this._validationSpotlightingPointers[i](e);autotask.toggleManagement.__expandSectionByElement(t.element),this._selectTab(t.element),autotask.scrolling.__scrollUntilVisible([t.element],70,!1);var n=autotask.find(t.editorId);n.focus();var o=this;window.setTimeout((function(){if("function"==typeof n.validate)n.validate();else{var e=1===t.positionRequirement,i=n.__get_allowedConcurrentlyVisibleOverlays();autotask.globalValidationOverlay.show(t.element,t.editorId,t.basicMessage,e,autotask.proxy(o._onOverlayClose,o),i)}}),10)}}},u.prototype._startCorrection=function(t){var i=null,n=this._findEditorValidationDataIndex(t);if(null!==n){this._cancelTransitioning(),0===n&&1===this._editorValidationData.length&&(i=this._createCorrectionEndingDelegate()),this._removeEditorValidationData(t),this._applySummaryState(e),this._applyTransitioningState(_);var o=this;this._transitioningTimeoutId=window.setTimeout((function(){o._onCorrectionEnding(i)}),750)}},u}(),Autotask.CustomValidationSummary=function(){"use strict";function t(t,e,i,n){var o="Valid";this._customSummary=t.firstElementChild,this._hasFailure=!this._customSummary.classList.contains(o),this._messages={},this._messageAddedDelegate=e,this._messageRemovedDelegate=i,this._messagesClearedDelegate=n,this._validClass=o}return t.prototype._customSummary=null,t.prototype._hasFailure=null,t.prototype._messages=null,t.prototype._messageAddedDelegate=null,t.prototype._messageRemovedDelegate=null,t.prototype._messagesClearedDelegate=null,t.prototype._validClass=null,t.prototype.get_hasValidationFailure=function(){return this._hasFailure},t.prototype.addMessage=function(t,e){var i=document.createElement("div");i.innerText=e,this._customSummary.insertAdjacentElement("beforeend",i),this._messages[t]=e,this._hasFailure=!0,this.__manageDisplay(),this._messageAddedDelegate()},t.prototype.clearMessages=function(){this._hasFailure&&(this._customSummary.innerHTML="",this._messages={},this._hasFailure=!1,this.__manageDisplay(),this._messagesClearedDelegate())},t.prototype.removeMessage=function(t){var e=this._customSummary.children,i=this._messages[t],n=!1;if(void 0!==i){for(var o=0;o<e.length;o++)e[o].innerText.replace(/\s/g,"")===i.replace(/\s/g,"")&&(delete this._messages[t],e[o].remove(),n=!0);var a=0;for(var s in this._messages)this._messages.hasOwnProperty(s)&&a++;0===a&&(this._hasFailure=!1),n&&(this.__manageDisplay(),this._messageRemovedDelegate())}},t.prototype.__manageDisplay=function(){this._hasFailure?this._customSummary.classList.remove(this._validClass):this._customSummary.classList.add(this._validClass)},t}(),Autotask.GridDisplayValidation=function(t){"use strict";function e(e){t.call(this,e)}return autotask.inherit(e,t),e.prototype.___findValidationElements=function(e){var i=t.prototype.___findValidationElements.call(this,e),n=e.querySelector(".Edit");if(null!==n){var o=t.prototype.___findValidationElements.call(this,n);i=i.filter((function(t){return-1===o.indexOf(t)}))}return i},e}(Autotask.ContainerValidation),Autotask.GridEditingValidation=function(t){"use strict";function e(e){t.call(this,e)}return autotask.inherit(e,t),e}(Autotask.ContainerValidation),Autotask.GridFilterValidation=function(t){"use strict";function e(e){t.call(this,e)}return autotask.inherit(e,t),e}(Autotask.ContainerValidation),Autotask.PostedContainerValidation=function(t){"use strict";function e(e){t.call(this,e)}return autotask.inherit(e,t),e.prototype.___findValidationElements=function(e){for(var i=t.prototype.___findValidationElements.call(this,e),n=e.querySelectorAll(".Grid"),o=[],a=0;a<n.length;a++)o=o.concat(t.prototype.___findValidationElements.call(this,n[a]));return i.filter((function(t){return-1===o.indexOf(t)}))},e}(Autotask.ContainerValidation),window.PostedContainerValidationCreator=function(){"use strict";function t(){}return t.prototype.createValidation=function(t){return new Autotask.PostedContainerValidation(t)},t}(),Autotask.Validation=function(){"use strict";function t(){}return t.prototype._favorAbovePriority=null,t.prototype._favorBelowPriority=null,t.prototype._itemValueCountValidator=null,t.prototype._itemValueRequiredValidator=null,t.prototype._lengthValidator=null,t.prototype._multipleSelectionCountValidator=null,t.prototype._regularExpressionValidator=null,t.prototype._requiredConditionallyValidator=null,t.prototype._requiredValidator=null,t.prototype.__get_itemValueCount=function(){return null===this._itemValueCountValidator&&(this._itemValueCountValidator=new Autotask.ItemValueCountValidator),this._itemValueCountValidator},t.prototype.__get_itemValueRequired=function(){return null===this._itemValueRequiredValidator&&(this._itemValueRequiredValidator=new Autotask.ItemValueRequiredValidator),this._itemValueRequiredValidator},t.prototype.__get_length=function(){return null===this._lengthValidator&&(this._lengthValidator=new Autotask.StringLengthValidator),this._lengthValidator},t.prototype.__get_multipleSelectionCount=function(){return null===this._multipleSelectionCountValidator&&(this._multipleSelectionCountValidator=new Autotask.MultipleSelectionCountValidator),this._multipleSelectionCountValidator},t.prototype.__get_regularExpression=function(){return null===this._regularExpressionValidator&&(this._regularExpressionValidator=new Autotask.RegularExpressionValidator),this._regularExpressionValidator},t.prototype.__get_required=function(){return null===this._requiredValidator&&(this._requiredValidator=new Autotask.RequiredValidator),this._requiredValidator},t.prototype.__get_requiredConditionally=function(){return null===this._requiredConditionallyValidator&&(this._requiredConditionallyValidator=new Autotask.RequiredConditionallyValidator),this._requiredConditionallyValidator},t.prototype._get_favorAbovePriority=function(){if(null===this._favorAbovePriority){var t=new Autotask.ContextOverlayDirectionPriority;t.set_firstPriorityDirection(Autotask.ContextOverlayPositionDirection.Top),t.set_secondPriorityDirection(Autotask.ContextOverlayPositionDirection.Left),t.set_thirdPriorityDirection(Autotask.ContextOverlayPositionDirection.Right),t.set_fourthPriorityDirection(Autotask.ContextOverlayPositionDirection.Bottom),this._favorAbovePriority=t}return this._favorAbovePriority},t.prototype._get_favorBelowPriority=function(){if(null===this._favorBelowPriority){var t=new Autotask.ContextOverlayDirectionPriority;t.set_firstPriorityDirection(Autotask.ContextOverlayPositionDirection.Bottom),t.set_secondPriorityDirection(Autotask.ContextOverlayPositionDirection.Top),t.set_thirdPriorityDirection(Autotask.ContextOverlayPositionDirection.Left),t.set_fourthPriorityDirection(Autotask.ContextOverlayPositionDirection.Right),this._favorBelowPriority=t}return this._favorBelowPriority},t}(),Autotask.ValidationOverlayPositionRequirement={FavorAbove:0,FavorBelow:1},Autotask.ValidationSummary=function(){"use strict";function t(t,e,i){autotask.instanceManagement.__addRegistrationKey(this,t),this._summaryContainer=document.getElementById(t),this._automatedValidationSummary=new Autotask.AutomatedValidationSummary(this._summaryContainer,e,i),this._contentChangedPointers=[];var n=autotask.proxy(this._onCustomMessageAdded,this),o=autotask.proxy(this._onCustomMessageRemoved,this),a=autotask.proxy(this._onCustomMessagesCleared,this);this._customValidationSummary=new Autotask.CustomValidationSummary(this._summaryContainer,n,o,a),this._id=t,this._isActive=!1,this._isVisible=!1,this._tabCorrectedPointers=[],this._tabsFailedPointers=[],this._validationFailedPointers=[],this._validClass="Valid",this._visibilityChangedPointers=[]}return t.prototype._summaryContainer=null,t.prototype._containerElement=null,t.prototype._contentChangedPointers=null,t.prototype._customValidationSummary=null,t.prototype._automatedValidationSummary=null,t.prototype._id=null,t.prototype._isActive=null,t.prototype._isVisible=null,t.prototype._tabCorrectedPointers=null,t.prototype._tabsFailedPointers=null,t.prototype._transitioningTimeoutId=null,t.prototype._validationFailedPointers=null,t.prototype._validClass=null,t.prototype._visibilityChangedPointers=null,t.prototype.__get_customValidationSummary=function(){return this._customValidationSummary},t.prototype.__get_isActive=function(){return this._automatedValidationSummary.__get_isActive()},t.prototype._onCustomMessageAdded=function(){this._automatedValidationSummary.__customValidationFailureAdded();var t=!this._isActive;this._contentChanged(t)},t.prototype._onCustomMessageRemoved=function(){this._automatedValidationSummary.__customValidationFailureRemoved();var t=!this._automatedValidationSummary.__get_isActive()&&!this._customValidationSummary.get_hasValidationFailure();this._contentChanged(t)},t.prototype._onCustomMessagesCleared=function(){this._automatedValidationSummary.__customValidationFailureRemoved();var t=!this._automatedValidationSummary.__get_isActive();this._contentChanged(t)},t.prototype._onErrorSwitched=function(){this._contentChanged(!1)},t.prototype._onLastEditorCorrected=function(t){t.hasCustomValidationFailure=this._customValidationSummary.get_hasValidationFailure()},t.prototype._onTabEditorFailed=function(t){var e=[];e.push(t.tabId),this._tabsFailed(e)},t.prototype.__addValidationFailed=function(t){this._validationFailedPointers.push(t)},t.prototype.__addValidationSpotlighting=function(t){this._automatedValidationSummary.__addValidationSpotlighting(t)},t.prototype.__addContentChanged=function(t){this._contentChangedPointers.push(t)},t.prototype.__addTabCorrected=function(t){this._tabCorrectedPointers.push(t)},t.prototype.__addTabsFailed=function(t){this._tabsFailedPointers.push(t)},t.prototype.__addVisibilityChanged=function(t){this._visibilityChangedPointers.push(t)},t.prototype.__editorCorrected=function(t){this._automatedValidationSummary.__editorCorrected(t),this._automatedValidationSummary.__get_isActive()&&(this._manageTabDisplayOnSuccess(t),this._contentChanged(!1))},t.prototype.__editorFailed=function(t,e,i,n,o,a){this._automatedValidationSummary.__editorFailed(t,e,i,n,o,a),this._automatedValidationSummary.__get_isActive()&&(this._manageTabDisplayOnErrors([t]),this._contentChanged(!1))},t.prototype.__initialize=function(){this._containerElement=autotask.validationSummaryManagement.__findValidationSummaryContainer(this._summaryContainer),this._customValidationSummary.__manageDisplay(),this._manageSummaryDisplay()},t.prototype.__registerHandlers=function(){this._automatedValidationSummary.__setErrorSwitched(autotask.proxy(this._onErrorSwitched,this)),this._automatedValidationSummary.__setLastEditorCorrected(autotask.proxy(this._onLastEditorCorrected,this)),this._automatedValidationSummary.__setTabEditorFailed(autotask.proxy(this._onTabEditorFailed,this))},t.prototype.__removeErrors=function(t){this._automatedValidationSummary.__removeErrors(t),this._automatedValidationSummary.__get_isActive()&&this._contentChanged(!1)},t.prototype.__validationCompleted=function(t,e){autotask.globalValidationOverlay.hide(null);var i=!this._customValidationSummary.get_hasValidationFailure();if(t){var n=this._automatedValidationSummary.__get_hasErrors();i=i&&this._automatedValidationSummary.__get_isActive()&&!n,n||this._automatedValidationSummary.__deactivate()}else i=i&&!this._automatedValidationSummary.__get_isActive(),this._automatedValidationSummary.__activate();this._contentChanged(i),t||this._automatedValidationSummary.__displayFirstError(e)},t.prototype.__validationFailed=function(t){var e={};e.elementIds=t;for(var i=0;i<this._validationFailedPointers.length;i++)this._validationFailedPointers[i](e);this._manageTabDisplayOnErrors(t),this._expandCollapsibleContainers(t)},t.prototype._contentChanged=function(t){this._manageSummaryDisplay();var e=null;if(t)for(this._isVisible=!this._isVisible,this._isVisible?this._summaryContainer.classList.add("Active"):this._summaryContainer.classList.remove("Active"),e=0;e<this._visibilityChangedPointers.length;e++)this._visibilityChangedPointers[e]();else for(e=0;e<this._contentChangedPointers.length;e++)this._contentChangedPointers[e]()},t.prototype._expandCollapsibleContainers=function(t){for(var e=0;e<t.length;e++){var i=document.getElementById(t[e]);autotask.toggleManagement.__expandSectionByElement(i)}},t.prototype._manageTabDisplayOnErrors=function(t){for(var e=[],i=null,n=null,o=0;o<t.length;o++)null!==(i=document.getElementById(t[o]).closest(".TabContainer"))&&(n=i.id,e.indexOf(n)<0&&e.push(n));this._tabsFailed(e)},t.prototype._manageTabDisplayOnSuccess=function(t){var e=document.getElementById(t).closest(".TabContainer");if(null!==e){var i=e.id;this._tabCorrected(i)}},t.prototype._manageSummaryDisplay=function(){var t=this._customValidationSummary.get_hasValidationFailure()||this._automatedValidationSummary.__get_isActive();t&&!this._isActive?this._isActive=!0:!t&&this._isActive&&(this._isActive=!1)},t.prototype._tabCorrected=function(t){var e={};e.tabId=t;for(var i=0;i<this._tabCorrectedPointers.length;i++)this._tabCorrectedPointers[i](e)},t.prototype._tabsFailed=function(t){var e={};e.tabIds=t;for(var i=0;i<this._tabsFailedPointers.length;i++)this._tabsFailedPointers[i](e)},t}(),Autotask.ValidationSummaryManagement=function(){"use strict";function t(){}return t.prototype.__findValidationSummary=function(t){var e=null;if(null!==t){var i=autotask.validationSummaryManagement.__findValidationSummaryContainer(t);if(null!==i){var n=i.querySelector(".ValidationSummary");null!==n&&(e=autotask.find(n.getAttribute("id")))}}return e},t.prototype.__findValidationSummaryUsingElement=function(t){return this.__findValidationSummary(t)},t.prototype.__findValidationSummaryContainer=function(t){var e=null;if(null!==t){var i=t.closest(".Dialog2");if(null!==i)e=i;else{var n=t.closest("body");null!==n&&(e=n)}}return null===e&&autotask.throwException("The validation summary must be rendered within the body tag on a page or within a dialog."),e},t}(),Autotask.EmailAddressValidator=function(t){"use strict";function e(){t.call(this),this._delimiter="; "}return autotask.inherit(e,t),e.prototype._delimiter=null,e.prototype.get_delimiter=function(){return this._delimiter},e.prototype.validate=function(t){var e=!0;return this.___isNullOrEmpty(t)||(e=/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i.test(t)),e},e}(Autotask.Validator),Autotask.ItemValueCountValidator=function(t){"use strict";function e(){t.call(this)}return autotask.inherit(e,t),e.prototype.validate=function(t,e){var i=!0;return this.___isNullOrEmpty(t)||(i=t.length<=e),i},e}(Autotask.Validator),Autotask.ItemValueRequiredValidator=function(t){"use strict";function e(){t.call(this)}return autotask.inherit(e,t),e.prototype.validate=function(t){return null!==t},e}(Autotask.Validator),Autotask.MultipleSelectionCountValidator=function(t){"use strict";function e(){t.call(this)}return autotask.inherit(e,t),e.prototype.validate=function(t,e){var i=!0;return this.___isNullOrEmpty(t)||(i=t.length<=e),i},e}(Autotask.Validator),Autotask.RegularExpressionValidator=function(t){"use strict";function e(){t.call(this)}return autotask.inherit(e,t),e.prototype.validate=function(t,e){var i=!0;if(!this.___isNullOrEmpty(t)){var n=new RegExp(e).exec(t);i=n&&0===n.index&&n[0].length===t.length}return i},e}(Autotask.Validator),Autotask.RequiredConditionallyValidator=function(t){"use strict";function e(){t.call(this),this._modifierCssClass="Off",this._requiredCssClass="Required"}return autotask.inherit(e,t),e.prototype._modifierCssClass=null,e.prototype._requiredCssClass=null,e.prototype.initializeForValidation=function(t,e,i,n,o){var a=autotask.find(i);if(null!=a&&(this._updateRequiredIndicator(e,a.get_value(),n,o),"function"==typeof a.addChange)){var s=this;a.addChange((function(i){s._updateRequiredIndicator(e,i.clientInstance.get_value(),n,o),t.__validateLegacyEditor(e,!0)}))}},e.prototype.validate=function(t,e,i,n){var o=!0,a=autotask.find(e);return null!=a&&this._isRequiredCheckNeeded(a.get_value(),i,n)&&(o=!this.___isNullOrEmpty(t)),o},e.prototype._isRequiredCheckNeeded=function(t,e,i){var n=!1;return void 0!==t&&(!0===t?t="TRUE":!1===t&&(t="FALSE"),t=t.toUpperCase(),("ISEQUALTO"==e&&t==i||"ISNOTEQUALTO"==e&&t!=i)&&(n=!0)),n},e.prototype._updateRequiredIndicator=function(t,e,i,n){var o=document.querySelector("label[for="+t+"]");if(null!==o){var a=o.nextElementSibling;null!==a&&a.classList.contains(this._requiredCssClass)&&(this._isRequiredCheckNeeded(e,i,n)?a.classList.remove(this._modifierCssClass):a.classList.add(this._modifierCssClass))}},e}(Autotask.Validator),Autotask.RequiredValidator=function(t){"use strict";function e(){t.call(this)}return autotask.inherit(e,t),e.prototype.validate=function(t){return!this.___isNullOrEmpty(t)},e}(Autotask.Validator),Autotask.StringLengthValidator=function(t){"use strict";function e(){t.call(this)}return autotask.inherit(e,t),e.prototype.validate=function(t,e){var i=!0;return this.___isNullOrEmpty(t)||(i=this._getLength(t)<=e),i},e.prototype._getLength=function(t){var e=(t=t.replace("\r\n","\n")).match(/\n/g);return null!==e?t.length+e.length:t.length},e}(Autotask.Validator),Autotask.HtmlEditorVariableInsertionManager=function(t){"use strict";function e(e){t.call(this),this._htmlEditor=e}return autotask.inherit(e,t),e.prototype._htmlEditor=null,e.prototype.__lockKeyDownEvents=function(t){this._htmlEditor.__lockKeyDownEvents(t)},e.prototype.__insert=function(t){this._htmlEditor.__insert(t)},e}(Autotask.VariableInsertionManagerCore),Autotask.TextBoxVariableInsertionManager=function(t){"use strict";function e(e){t.call(this),this._textBox=e}return autotask.inherit(e,t),e.prototype._textBox=null,e.prototype.__lockKeyDownEvents=function(t){t?this._textBox.removeFocus():this._textBox.focus()},e.prototype.__insert=function(t){this._textBox.focus(),this._textBox.insertText(t)},e}(Autotask.VariableInsertionManagerCore),function(){"use strict";window.Autotask.TextWithVariableInsertion=function(t,e,i){autotask.instanceManagement.__addRegistrationKey(this,t),this._buttonContainerElement=document.querySelector(".InsertVariableButtonContainer"),this._textBoxId=e,this._variableInsertion=i},window.Autotask.TextWithVariableInsertion.prototype={_buttonContainerElement:null,_textBoxId:null,_variableInsertion:null,__initialize:function(){var t=autotask.find(this._textBoxId);this._variableInsertion.__set_variableInsertionManager(new Autotask.TextBoxVariableInsertionManager(t)),this._variableInsertion.__initialize()},__showVariableInsertionDialog:function(){this._variableInsertion.__show()}}}(),function(){"use strict";window.Autotask.VariableInsertion=function(t,e,i,n){this._dialogId=t,this._dropDownList=document.getElementById(e),this._listBox=document.getElementById(i),this._populateSelectRoute=n,this._registerHandlers()},window.Autotask.VariableInsertion.prototype={_dropDownList:null,_listBox:null,_populateSelectRoute:null,_variableInsertionManager:null,__set_variableInsertionManager:function(t){this._variableInsertionManager=t},_dropDownListChange:function(t){var e=new AutotaskRequestDataSystem.RequestData;e.addString("id",this._dropDownList.value),this._populateSelectRoute.makeRequest(e,autotask.proxy(this._populateSelectHandler,this))},_dialogHideFinished:function(){this._variableInsertionManager.__lockKeyDownEvents(!1)},_listBoxChange:function(t){var e=this._listBox.selectedOptions;e.length>1&&(this._listBox.value=e[0].value)},_listBoxClick:function(t){(t.shiftKey||t.ctrlKey)&&(t.preventDefault(),t.stopPropagation(),this._listBox.value=t.target.value)},_listBoxDoubleClick:function(t){this._variableInsertionManager.__insert(this._listBox.value),this.__hide()},_listBoxKeyDown:function(t){if(t.shiftKey){var e=t.which;(AutotaskDomSystem.KeyCode.isUp(e)||AutotaskDomSystem.KeyCode.isDown(e)||AutotaskDomSystem.KeyCode.isLeft(e)||AutotaskDomSystem.KeyCode.isRight(e))&&(t.preventDefault(),t.stopPropagation())}t.ctrlKey&&(t.preventDefault(),t.stopPropagation())},_populateSelectHandler:function(t){new Autotask.HtmlSelect(this._listBox).__populate(t)},__initialize:function(){var t=this;autotask.lifeCycleManagement.__addFinalInitializationDelegate((function(){var e=autotask.find(t._dialogId);e.__turnOnUnselectable(),e.__disableFocusWhenShown(),e.__addHideFinished(autotask.proxy(t._dialogHideFinished,t))}))},__show:function(){this._variableInsertionManager.__lockKeyDownEvents(!0),autotask.find(this._dialogId).show()},__hide:function(){autotask.find(this._dialogId).hide()},_registerHandlers:function(){this._dropDownList.addEventListener("change",autotask.proxy(this._dropDownListChange,this)),this._listBox.addEventListener("dblclick",autotask.proxy(this._listBoxDoubleClick,this)),this._listBox.addEventListener("click",autotask.proxy(this._listBoxClick,this)),this._listBox.addEventListener("keydown",autotask.proxy(this._listBoxKeyDown,this)),this._listBox.addEventListener("change",autotask.proxy(this._listBoxChange,this))}}}(),window.Autotask.PopulateSelectRoute=function(){"use strict";function t(t){this._requestCoordinator=new Autotask.AjaxRequestCoordinator("GET",t)}return t.prototype._requestCoordinator=null,t.prototype._onResponseProcessing=function(t,e){e(t.value)},t.prototype.makeRequest=function(t,e){var i=new Autotask.AjaxRequestData(t.__data,!1).__serialize(),n=this;this._requestCoordinator.__sendRequest(i,(function(t){n._onResponseProcessing(t,e)}),null,!1,"PopulateSelect");return new Autotask.AjaxRequestCanceler((function(){n._requestCoordinator.__cancelRequest()}))},t}(),window.Autotask.WalkMeIntegration=function(){"use strict";function t(){this._isEnabled=!1,this._localStorageIsDisabledKey="WalkMeIsDisabled"}return t.prototype._isEnabled=null,t.prototype._localStorageIsDisabledKey=null,t.prototype._url=null,t.prototype.disable=function(){autotask.localStorageManagement.__setItem(this._localStorageIsDisabledKey,"1")},t.prototype.initialize=function(t,e,i,n,o,a,s,r,l,_,u,c,d,h,p,y,g,m,f,v,C,w,S,k,b,E,A,x,D,R,I,P,T,B,M,L,q,O,H,V,F,z,K,N,j,U,G,W,J,Q,Y,X,$,Z,tt,et,it,nt,ot,at,st,rt,lt,_t,ut,ct,dt,ht,pt,yt,gt,mt){this._isEnabled=t,this._url=e,window.walkMeData={},window.walkMeData.userId=i,window.walkMeData.securityRoleIds=null===n?null:n.slice(),window.walkMeData.applicationVersionNumber=o,window.walkMeData.loginCount=a,window.walkMeData.lastLoginDaysElapsed=s,window.walkMeData.totalResourceCount=r,window.walkMeData.humanResourceCount=l,window.walkMeData.adminResourceCount=_,window.walkMeData.apiResourceCount=u,window.walkMeData.enterpriseId=c,window.walkMeData.companyName=d,window.walkMeData.lastName=h,window.walkMeData.firstName=p,window.walkMeData.narrativeFullName=y,window.walkMeData.resourceCreationDaysElapsed=g,window.walkMeData.databaseCreationDaysElapsed=m,window.walkMeData.isBcdrIntegrationConfiguredForDatabase=f,window.walkMeData.isBcdrIntegrationConfiguredForUser=C,window.walkMeData.isRmmIntegrationConfiguredForDatabase=v,window.walkMeData.isRmmIntegrationConfiguredForUser=w,window.walkMeData.isQuickbooksWebConnectorEnabledForDatabase=S,window.walkMeData.lastFullQuickbooksAccountsDataSyncDaysElapsed=k,window.walkMeData.hasQuickbooksWebConnector=b,window.walkMeData.isLiveMobileActive=E,window.walkMeData.customerType=A,window.walkMeData.activeIntegrationVendors=x,window.walkMeData.restApiVersions=D,window.walkMeData.soapApiVersions=R,window.walkMeData.hasNonApiResource=I,window.walkMeData.isNonApiResource=P,window.walkMeData.hasCustomizedLocalTerms=T,window.walkMeData.isCoManagedUser=B,window.walkMeData.hasSampleAccounts=M,window.walkMeData.databasePartnerType=L,window.walkMeData.enterpriseContentOne=q,window.walkMeData.enterpriseContentTwo=O,window.walkMeData.resourceContentOne=H,window.walkMeData.resourceContentTwo=V,window.walkMeData.theme=F,window.walkMeData.isAdminUser=z,window.walkMeData.hasUnmappedComanagedResources=K,window.walkMeData.isITCompleteConfiguredForDatabase=N,window.walkMeData.canUserEnableITComplete=j,window.walkMeData.localTermAccountPlural=U,window.walkMeData.localTermAccountSingular=G,window.walkMeData.localTermBusinessDivisionPlural=W,window.walkMeData.localTermBusinessDivisionSingular=J,window.walkMeData.localTermBusinessSubdivisionPlural=Q,window.walkMeData.localTermBusinessSubdivisionSingular=Y,window.walkMeData.localTermInstalledProductPlural=X,window.walkMeData.localTermInstalledProductSingular=$,window.walkMeData.localTermLaborPlural=Z,window.walkMeData.localTermLaborSingular=tt,window.walkMeData.localTermLocationPlural=et,window.walkMeData.localTermLocationSingular=it,window.walkMeData.localTermMilePlural=nt,window.walkMeData.localTermMileSingular=ot,window.walkMeData.localTermParentAccountPlural=at,window.walkMeData.localTermParentAccountSingular=st,window.walkMeData.localTermStatePlural=rt,window.walkMeData.localTermStateSingular=lt,window.walkMeData.localTermZipCodePlural=_t,window.walkMeData.localTermZipCodeSingular=ut,window.walkMeData.currencySymbol=ct,window.walkMeData.currencyPositiveFormat=dt,window.walkMeData.currencyNegativeFormat=ht,window.walkMeData.utcDate=pt,window.walkMeData.utcTime=yt,window.walkMeData.emailAddress=gt,window.walkMeData.invalidSendFromDomainCount=mt},t.prototype.isEnabled=function(){var t=null!==autotask.localStorageManagement.__getItem(this._localStorageIsDisabledKey);return this._isEnabled&&!autotask.debugManagement.__get_isDebugBuild()&&!t},t.prototype.start=function(){var t=document.createElement("script");t.async=!0,t.src=this._url,window.document.body.appendChild(t),window._walkmeConfig={smartLoad:!0}},t}(),window.autotask.culture=new Autotask.Culture,window.autotask.convert=new Autotask.Convert,window.autotask.browserDetection=new Autotask.BrowserDetection,window.autotask.deviceDetection=new Autotask.DeviceDetection,window.autotask.buttonInstanceManagement=new Autotask.DeprecatedButtonInstanceManagement,window.autotask.gridInstanceManagement=new Autotask.GridInstanceManagement,window.autotask.instanceLifeCycleManagement=new Autotask.InstanceLifeCycleManagement,window.autotask.lifeCycleManagement=new Autotask.LifeCycleManagement,window.autotask.exceptionManagement=new Autotask.ExceptionManagement,window.autotask.eventManagement=new Autotask.EventManagement,window.autotask.windowManagement=new Autotask.WindowManagement,window.autotask.overlayManagement=new Autotask.OverlayManagement,window.autotask.contextOverlayManagement=new AutotaskOverlaySystem.ContextOverlayManagement,window.autotask.transitionManagement=new Autotask.TransitionManagement,window.autotask.dialogManagement=new Autotask.DialogManagement,window.autotask.gridAlertDialogManagement=new Autotask.GridAlertDialogManagement,window.autotask.bookmarkManagement=new Autotask.BookmarkManagement,window.autotask.localStorageManagement=new Autotask.LocalStorageManagement,window.autotask.notificationEventManagement=new Autotask.NotificationEventManagement,window.autotask.securityManagement=new Autotask.SecurityManagement,window.autotask.layoutAnalysis=new Autotask.LayoutAnalysis,window.autotask.scrolling=new Autotask.Scrolling,window.autotask.workspaceLocator=new Autotask.WorkspaceLocator,window.autotask.siteNavigation=new Autotask.SiteNavigation,window.autotask.alertDialog=new Autotask.AlertDialog,window.autotask.confirmationDialog=new Autotask.ConfirmationDialog,window.autotask.progressBarDialog=new Autotask.ProgressBarDialog,window.autotask.ajax=new Autotask.Ajax,window.autotask.toggleManagement=new Autotask.ToggleManagement,window.autotask.validation=new Autotask.Validation,window.autotask.dataSelectorManagement=new Autotask.DataSelectorManagement,window.autotask.editorLayoutManagement=new Autotask.EditorLayoutManagement,window.autotask.validationSummaryManagement=new Autotask.ValidationSummaryManagement,window.autotask.quickEditManagement=new Autotask.QuickEditManagement,window.autotask.debugManagement=new Autotask.DebugManagement,window.autotask.walkMeIntegration=new Autotask.WalkMeIntegration,function(){"use strict";autotask.lifeCycleManagement.__addFirstInitializationDelegate((function(){window.autotask.culture._initialize(),window.autotask.convert._initialize(),window.autotask.overlayManagement.__initialize(),window.autotask.browserDetection.__initialize(),window.autotask.localStorageManagement.__initialize(),window.autotask.notificationEventManagement.__initialize(),autotask.exceptionManagement.__initialize(),window.autotask.debugManagement.__initialize()}));autotask.lifeCycleManagement.__addIntermediateInitializationDelegate((function(){window.autotask.findPage().__buttonEvents.initialize(),autotask.alertDialog.__initialize(),autotask.globalCalendarOverlayManagement.__initialize(),autotask.globalCurrencyOverlayManagement.__initialize(),autotask.globalColorPicker.initialize(),autotask.globalValidationOverlay.__initialize(),autotask.confirmationDialog.__initialize(),autotask.progressBarDialog.__initialize(),autotask.toggleManagement.__initialize(),autotask.bookmarkManagement.__initialize(),window.autotask.scrolling.__initialize(),window.autotask.windowManagement.__initialize(),window.autotask.tooltipContextOverlayLocator.initialize()}))}();


Autotask.Navigation={},function(){"use strict";Autotask.NavigationCore=function(){},Autotask.NavigationCore.prototype={errorPageCleanUp:function(){var t=autotask.workspaceLocator.__get_workspace(!0);if(t){var e=!window.top.autotask||!window.top.autotask.isLandingPage;t.onPageLoaded(e)}}}}(),Autotask.Navigation.SiteNavigationButton=function(t){"use strict";function e(e,o,i,s){t.call(this,e),this._contextOverlayId=o,this._isContextOverlayVisible=!1,this._primaryActionPage=s,this._primaryActionPointer=i,this.___set_primaryClickPointer(autotask.proxy(this._performPrimaryAction,this))}return autotask.inherit(e,t),e.prototype._contextOverlayId=null,e.prototype._contextOverlay=null,e.prototype._isContextOverlayEnabled=null,e.prototype._isContextOverlayVisible=null,e.prototype._primaryActionPage=null,e.prototype._primaryActionPointer=null,e.prototype.__get_contextOverlay=function(){return this._contextOverlay},e.prototype.___mouseEnter=function(e){return this.get_enabled()&&this._isContextOverlayEnabled?!e.__isMouseEvent&&this._isContextOverlayVisible?this._contextOverlay.hide():this._contextOverlay.show(this.___get_buttonElement()):this.get_enabled()&&t.prototype.___mouseEnter.call(this,e),!0},e.prototype.___mouseLeave=function(e){return this._isContextOverlayEnabled?this.get_enabled()&&this._contextOverlay.hide():t.prototype.___mouseLeave.call(this,e),!0},e.prototype._contextOverlayHiding=function(e){return this._isContextOverlayVisible=!1,t.prototype.___mouseLeave.call(this,e),!0},e.prototype._contextOverlayPositioning=function(t){var e=this._gatherPositionData(t.__get_overlayWidth()),o=new Autotask.ContextOverlayDirectionPriority;return o.set_firstPriorityDirection(Autotask.ContextOverlayPositionDirection.Bottom),t.__overridePriority(o),t.get_bottomPosition().set_isSlidingEnabled(!1),t.get_bottomPosition().set_topOffset(0),e.isSecondaryPositionActive&&!e.isSlidingNecessary?t.get_bottomPosition().set_leftOffset(e.secondaryLeft):e.isSlidingNecessary&&t.get_bottomPosition().set_isSlidingEnabled(!0),!0},e.prototype._contextOverlayShowing=function(e){return this._isContextOverlayVisible=!0,t.prototype.___mouseEnter.call(this,e),!0},e.prototype.__initialize=function(){null!==this._contextOverlayId?(this._contextOverlay=new Autotask.ContextOverlay(this._contextOverlayId,!1),this._contextOverlay.set_delayBeforeHiding(150),this._contextOverlay.set_delayBeforeShowing(window.autotask.deviceDetection.isTouch()?0:150),this._isContextOverlayEnabled=!0):this._isContextOverlayEnabled=!1},e.prototype.___determineIfContextOverlayShouldBeHidden=function(){return this._primaryActionPage||this._primaryActionPointer},e.prototype._gatherPositionData=function(t){var e=!1,o=!1,i=null,s=AutotaskDomSystem.Other.positionOffset(this.___get_buttonElement()).left;return s+t>document.body.offsetWidth&&(e=!0,-1*(i=this.___get_buttonElement().offsetWidth-t)>s&&(o=!0)),{secondaryLeft:i,isSecondaryPositionActive:e,isSlidingNecessary:o}},e.prototype._performPrimaryAction=function(t){this._primaryActionPointer?this._primaryActionPointer(t):this._primaryActionPage&&autotask.windowManagement.openPage(this._primaryActionPage,null,t.__ctrlKey)},e.prototype.__registerHandlers=function(){this._isContextOverlayEnabled&&(this._contextOverlay.__addShowing(autotask.proxy(this._contextOverlayShowing,this)),this._contextOverlay.__addHiding(autotask.proxy(this._contextOverlayHiding,this)),this._contextOverlay.__addPositioning(autotask.proxy(this._contextOverlayPositioning,this)))},e}(Autotask.ButtonCore),window.Autotask.Navigation.Ajax=function(){"use strict";function t(){}return t.prototype.__restrictedGetRequest=function(t,e,o){return new Autotask.Navigation.Ajax.AjaxRestrictedGetSender(t,e,o)},t.prototype.__restrictedPostRequest=function(t,e,o){return new Autotask.Navigation.Ajax.AjaxRestrictedPostSender(t,e,o)},t}(),window.Autotask.Navigation.Ajax.AjaxRestrictedGetSender=function(base){"use strict";function AjaxRestrictedGetSender(t,e,o){base.call(this,"GET",t,e,o)}return autotask.inherit(AjaxRestrictedGetSender,base),AjaxRestrictedGetSender.prototype._onAnnouncementsRefreshResponseProcessing=function(t){var e=t.areAnnouncementsAvailable;this.___executeSuccessDelegate(e)},AjaxRestrictedGetSender.prototype._onBundledNavigationRefreshResponseError=function(t,e,o,i,s,n,r,a,_,l,u){var c=e.__createLoadContentDelegateForError(t.get_defaultErrorMessage());o.executeTransition([c]);var p=i.__createLoadContentDelegateForError(t.get_defaultErrorMessage());s.executeTransition([p]);var h=n.__createLoadContentDelegateForError(t.get_defaultErrorMessage());r.executeTransition([h]);var g=a.__createLoadContentDelegateForError(t.get_defaultErrorMessage());_.executeTransition([g]);var d=l.__createLoadContentDelegateForError(t.get_defaultErrorMessage());u.executeTransition([d])},AjaxRestrictedGetSender.prototype._onBundledNavigationRefreshResponseProcessing=function(responseJson,bookmarksInstanceTracker,bookmarksTransitionCoordinator,liveLinksInstanceTracker,liveLinksTransitionCoordinator,myEntitiesInstanceTracker,myEntitiesTransitionCoordinator,recentItemsInstanceTracker,recentItemsTransitionCoordinator,recentSearchesInstanceTracker,recentSearchesTransitionCoordinator,workListInstanceTracker,parseringErrorDelegate){var result={bookmarksDataId:null,liveLinksDataId:null,myEntitiesDataId:null,recentItemsDataId:null,recentSearchesDataId:null,scheduleDataId:null,activeMonthAndYear:null,importantDates:null,slideOutDataId:null,workListBadgesTotalTicketCount:null,workListBadgesTotalTaskCount:null};if(this.__loadSiteNavigationMenu(responseJson.bookmarksPartialViewJson,bookmarksInstanceTracker,bookmarksTransitionCoordinator)&&(result.bookmarksDataId=responseJson.bookmarksChecksum),this.__loadSiteNavigationMenu(responseJson.liveLinksPartialViewJson,liveLinksInstanceTracker,liveLinksTransitionCoordinator)&&(result.liveLinksDataId=responseJson.liveLinksChecksum),this.__loadSiteNavigationMenu(responseJson.myEntitiesPartialViewJson,myEntitiesInstanceTracker,myEntitiesTransitionCoordinator)&&(result.myEntitiesDataId=responseJson.myEntitiesChecksum),this.__loadSiteNavigationMenu(responseJson.recentItemsPartialViewJson,recentItemsInstanceTracker,recentItemsTransitionCoordinator)&&(result.recentItemsDataId=responseJson.recentItemsChecksum),this.__loadSiteNavigationMenu(responseJson.recentSearchesPartialViewJson,recentSearchesInstanceTracker,recentSearchesTransitionCoordinator)&&(result.recentSearchesDataId=responseJson.recentSearchesChecksum),responseJson.scheduleDate&&(result.scheduleDataId=responseJson.scheduleChecksum,result.activeMonthAndYear=eval(responseJson.scheduleDate),result.importantDates=eval(responseJson.scheduleImportantDates)),void 0!==responseJson.workListHtml&&null!==responseJson.workListHtml){var parser=new AutotaskAjaxSystem.JavaScriptParser(responseJson.workListScript);parser.isParseSuccessful&&(workListInstanceTracker.__loadHtmlAndJavaScript(responseJson.workListHtml,parser.javaScriptExecutionDelegate),result.slideOutDataId=responseJson.workListChecksum)}null!==responseJson.workListBadgesTotalTicketCount&&(result.workListBadgesTotalTicketCount=responseJson.workListBadgesTotalTicketCount,result.workListBadgesTotalTaskCount=responseJson.workListBadgesTotalTaskCount),result.isAvailabilityAway=responseJson.isAvailabilityAway,this.___executeSuccessDelegate(result)},AjaxRestrictedGetSender.prototype._onHomePageRefreshResponseProcessing=function(responseJson){var homepage=null;null!==responseJson.homepage&&(homepage=eval(responseJson.homepage));var result={homepage};this.___executeSuccessDelegate(result)},AjaxRestrictedGetSender.prototype._onMyEntitiesRefreshResponseError=function(t,e){e.__loadError(t.get_defaultErrorMessage())},AjaxRestrictedGetSender.prototype._onRecentItemsRefreshResponseError=function(t,e){e.__loadError(t.get_defaultErrorMessage())},AjaxRestrictedGetSender.prototype._onScheduleRefreshResponseProcessing=function(responseJson){if(responseJson.scheduleDate){var activeMonthAndYear=eval(responseJson.scheduleDate),importantDates=eval(responseJson.scheduleImportantDates),result={dataId:responseJson.scheduleDataId,activeMonthAndYear,importantDates};this.___executeSuccessDelegate(result)}},AjaxRestrictedGetSender.prototype._onSiteNavigationMenuRefreshResponseProcessing=function(t,e,o,i){if(this.__loadSiteNavigationMenu(t.htmlJavaScriptPair,e,o)){var s=t[i+"Checksum"];this.___executeSuccessDelegate(s)}},AjaxRestrictedGetSender.prototype._onWorkListBadgesRefreshResponseProcessing=function(t){if(void 0!==t.workListBadgesTotalTicketCount){var e={workListBadgesTotalTicketCount:t.workListBadgesTotalTicketCount,workListBadgesTotalTaskCount:t.workListBadgesTotalTaskCount};this.___executeSuccessDelegate(e)}},AjaxRestrictedGetSender.prototype._onWorkListRefreshResponseProcessing=function(t,e){if(null!==t.html){var o=new AutotaskAjaxSystem.JavaScriptParser(t.script);if(o.isParseSuccessful){e.__loadHtmlAndJavaScript(t.html,o.javaScriptExecutionDelegate);var i=t.workListChecksum;this.___executeSuccessDelegate(i)}}},AjaxRestrictedGetSender.prototype.__announcementsRefresh=function(){var t=this;this.___sendRequest("AnnouncementsAvailability",(function(e){t._onAnnouncementsRefreshResponseProcessing(e)}),!1)},AjaxRestrictedGetSender.prototype.__bookmarksRefresh=function(t,e){var o=this;this.___sendRequest("SiteNavigationMenu",(function(i){o._onSiteNavigationMenuRefreshResponseProcessing(i,t,e,"bookmarks")}),!1)},AjaxRestrictedGetSender.prototype.__bundledNavigationRefresh=function(t,e,o,i,s,n,r,a,_,l,u){var c=this,p=function(u){c._onBundledNavigationRefreshResponseError(u,t,e,o,i,s,n,r,a,_,l)},h=new Autotask.AjaxResponseErrorEventArgs,g=function(){p(h)};this.___sendRequest("BundledNavigationRefresh",(function(p){c._onBundledNavigationRefreshResponseProcessing(p,t,e,o,i,s,n,r,a,_,l,u,g)}),!1,p)},AjaxRestrictedGetSender.prototype.__dashboardNavigationRefresh=function(t,e){var o=this;this.___sendRequest("SiteNavigationMenu",(function(i){o._onSiteNavigationMenuRefreshResponseProcessing(i,t,e,"dashboardNavigation")}),!1)},AjaxRestrictedGetSender.prototype.__homepageRefresh=function(){var t=this;this.___sendRequest("HomepageRefresh",(function(e){t._onHomePageRefreshResponseProcessing(e)}),!1)},AjaxRestrictedGetSender.prototype.__liveLinksRefresh=function(t,e){var o=this;this.___sendRequest("SiteNavigationMenu",(function(i){o._onSiteNavigationMenuRefreshResponseProcessing(i,t,e,"liveLinks")}),!1)},AjaxRestrictedGetSender.prototype.__myEntitiesRefresh=function(t,e){var o=this;this.___sendRequest("SiteNavigationMenu",(function(i){o._onSiteNavigationMenuRefreshResponseProcessing(i,t,e,"myEntities")}),!1,(function(e){o._onMyEntitiesRefreshResponseError(e,t)}))},AjaxRestrictedGetSender.prototype.__recentItemsRefresh=function(t,e){var o=this;this.___sendRequest("SiteNavigationMenu",(function(i){o._onSiteNavigationMenuRefreshResponseProcessing(i,t,e,"recentItems")}),!1,(function(e){o._onRecentItemsRefreshResponseError(e,t)}))},AjaxRestrictedGetSender.prototype.__recentSearchesRefresh=function(t,e){var o=this;this.___sendRequest("SiteNavigationMenu",(function(i){o._onSiteNavigationMenuRefreshResponseProcessing(i,t,e,"recentSearches")}),!1)},AjaxRestrictedGetSender.prototype.__scheduleRefresh=function(){var t=this;this.___sendRequest("ScheduleRefresh",(function(e){t._onScheduleRefreshResponseProcessing(e)}),!1)},AjaxRestrictedGetSender.prototype.__workListBadgesRefresh=function(){var t=this;this.___sendRequest("WorkListBadgesRefresh",(function(e){t._onWorkListBadgesRefreshResponseProcessing(e)}),!1)},AjaxRestrictedGetSender.prototype.__workListRefresh=function(t){var e=this;this.___sendRequest("WorkListRefresh",(function(o){e._onWorkListRefreshResponseProcessing(o,t)}),!1)},AjaxRestrictedGetSender.prototype.__loadSiteNavigationMenu=function(t,e,o){var i=!1;if(null!=t){var s=new AutotaskAjaxSystem.JavaScriptParser(t.JavaScript);if(s.isParseSuccessful){var n=new Autotask.AjaxResponseHtmlAndJavaScript(t),r=e.__createLoadContentDelegate(n.htmlForInstanceTrackerContainer,s.javaScriptExecutionDelegate);o.executeTransition([r]),i=!0}}return i},AjaxRestrictedGetSender}(Autotask.AjaxSender),Autotask.Navigation.BookmarkButton=function(t){"use strict";function e(e,o){t.call(this,e,o,null,null),this.___get_buttonElement().classList.add("Transition"),this._highlightButtonCssClass="Highlight"}return autotask.inherit(e,t),e.prototype._highlightButtonCssClass=null,e.prototype._onBookmarkUpdating=function(t){t&&(this._applyHighlight(),setTimeout(autotask.proxy(this._removeHighlight,this),1e3))},e.prototype.__registerHandlers=function(){Autotask.Navigation.SiteNavigationButton.prototype.__registerHandlers.call(this);var t=autotask.workspaceLocator.__get_realTimeDataManager();t&&t.addBookmarkUpdating(autotask.proxy(this._onBookmarkUpdating,this))},e.prototype._applyHighlight=function(){this.get_enabled()&&this.___get_buttonElement().classList.add(this._highlightButtonCssClass)},e.prototype._removeHighlight=function(){this.get_enabled()&&this.___get_buttonElement().classList.remove(this._highlightButtonCssClass)},e}(Autotask.Navigation.SiteNavigationButton),Autotask.DialogNavigationButton=function(t){"use strict";function e(e,o,i,s,n,r){t.call(this,e,o,i,s,n),this._isAnnouncementButton=r}return autotask.inherit(e,t),e.prototype._isAnnouncementButton=null,e.prototype.__registerHandlers=function(){t.prototype.__registerHandlers.call(this);var e=document.getElementById(this.__get_id()).querySelector(".AnnouncementsIndicator");null!==e&&(this._isAnnouncementButton?window.autotask.findPage().__announcementsIndicator.registerAnnouncementsElement(e):window.autotask.findPage().__announcementsIndicator.registerEngagementReportElement(e))},e}(Autotask.DefaultButton),Autotask.Navigation.GuideButton=function(t){"use strict";function e(e,o,i){t.call(this,e),this._contextOverlay=new Autotask.ContextOverlay(o,!1),this._contextOverlay.set_delayBeforeShowing(window.autotask.deviceDetection.isTouch()?0:150),this._isContextOverlayVisible=!1,this._primaryActionPointer=i,this.___set_primaryClickPointer(autotask.proxy(this._performPrimaryAction,this)),this._registerHandlers()}return autotask.inherit(e,t),e.prototype._contextOverlay=null,e.prototype._isContextOverlayVisible=null,e.prototype._primaryActionPointer=null,e.prototype.___mouseEnter=function(t){return autotask.findPage().security.get_isDashboardOnlyUser()||(!t.__isMouseEvent&&this._isContextOverlayVisible?this._contextOverlay.hide():this._contextOverlay.show(this.___get_buttonElement())),!0},e.prototype.___mouseLeave=function(t){return autotask.findPage().security.get_isDashboardOnlyUser()||this._contextOverlay.hide(),!0},e.prototype._contextOverlayHiding=function(e){return this._isContextOverlayVisible=!1,t.prototype.___mouseLeave.call(this,e),autotask.findPage().__guide.close(),!0},e.prototype._contextOverlayPositioning=function(t){var e=new Autotask.ContextOverlayDirectionPriority;return e.set_firstPriorityDirection(Autotask.ContextOverlayPositionDirection.Bottom),t.__overridePriority(e),t.get_bottomPosition().set_isSlidingEnabled(!1),t.get_bottomPosition().set_topOffset(0),!0},e.prototype._contextOverlayShowing=function(e){return this._isContextOverlayVisible=!0,t.prototype.___mouseEnter.call(this,e),!0},e.prototype.___determineIfContextOverlayShouldBeHidden=function(){return!0},e.prototype._performPrimaryAction=function(t){this._primaryActionPointer(t)},e.prototype._registerHandlers=function(){this._contextOverlay.__addShowing(autotask.proxy(this._contextOverlayShowing,this)),this._contextOverlay.__addHiding(autotask.proxy(this._contextOverlayHiding,this)),this._contextOverlay.__addPositioning(autotask.proxy(this._contextOverlayPositioning,this))},e}(Autotask.ButtonCore),Autotask.GuideIntegrationButton=function(t){"use strict";function e(e,o){t.call(this,e),this.___set_primaryClickPointer(o)}return autotask.inherit(e,t),e.prototype.__registerHandlers=function(){autotask.findPage().__buttonEvents.registerButton(this.___get_buttonElement())},e.prototype.___mouseEnter=function(e){e.__isMouseEvent?t.prototype.___mouseEnter.call(this,e):t.prototype.__onClick.call(this,e)},e}(Autotask.ButtonCore),Autotask.Navigation.GuideNavigationButton=function(t){"use strict";function e(e,o,i,s,n){t.call(this,e),this._isActiveByDefault=i,this._isSelected=!1,this._moduleId=o,this._primaryActionPage=n,this._primaryActionPointer=s,this.___set_primaryClickPointer(autotask.proxy(this._performPrimaryAction,this)),this._selectedButtonStateCssClass="SelectedState"}return autotask.inherit(e,t),e.prototype._moduleElement=null,e.prototype._isActiveByDefault=null,e.prototype._isSelected=null,e.prototype._moduleId=null,e.prototype._primaryActionPage=null,e.prototype._primaryActionPointer=null,e.prototype._selectedButtonStateCssClass=null,e.prototype.get_selected=function(){return this._isSelected},e.prototype.set_selected=function(t){this._isSelected!==t&&(this._isSelected=t,this.___calibratePermenantStates())},e.prototype.___mouseEnter=function(t){return autotask.findPage().__guide.switchModule(this),!0},e.prototype.___mouseLeave=function(t){return autotask.findPage().__guide.stopModuleSwitch(),!0},e.prototype.__activateModule=function(){this.set_selected(!0),this._moduleElement.classList.add("Active")},e.prototype.__deactivateModule=function(){this.set_selected(!1),this._moduleElement.classList.remove("Active")},e.prototype.__initialize=function(){this._moduleElement=document.getElementById(this._moduleId),this._isActiveByDefault&&autotask.findPage().__guide.addDefaultButton(this)},e.prototype.___calibratePermenantStates=function(){this.get_enabled()&&this.get_selected()?this.___modifyCssClass(this._selectedButtonStateCssClass):t.prototype.___calibratePermenantStates.call(this)},e.prototype.___determineIfContextOverlayShouldBeHidden=function(){return!0},e.prototype._performPrimaryAction=function(t){this._primaryActionPointer?this._primaryActionPointer(t):this._primaryActionPage&&autotask.windowManagement.openPage(this._primaryActionPage,null,t.__ctrlKey)},e}(Autotask.ButtonCore),Autotask.Navigation.HelpSiteNavigationButton=function(t){"use strict";function e(e,o,i){t.call(this,e,o,null,i)}return autotask.inherit(e,t),e.prototype.hideUpdateIndicator=function(){document.getElementById(this.__get_id()).querySelector(".WhatsNewIndicator").classList.remove("Active")},e.prototype.showUpdateIndicator=function(){document.getElementById(this.__get_id()).querySelector(".WhatsNewIndicator").classList.add("Active")},e.prototype.__registerHandlers=function(){Autotask.Navigation.SiteNavigationButton.prototype.__registerHandlers.call(this);var t=document.getElementById(this.__get_id()).querySelector(".AnnouncementsIndicator");window.autotask.findPage().__announcementsIndicator.registerSiteNavigationElement(t)},e}(Autotask.Navigation.SiteNavigationButton),Autotask.Navigation.RecentSearchMenuButton=function(t){"use strict";function e(e,o,i){t.call(this,e,autotask.proxy(this._search,this),!0,!0,!1),this._searchText=o,this._searchType=i}return autotask.inherit(e,t),e.prototype._searchText=null,e.prototype._searchType=null,e.prototype._search=function(t){autotask.navigation.searchCoordinator.performRecentSearch(this._searchText,this._searchType,t.__ctrlKey)},e}(Autotask.DefaultButton),function(){"use strict";window.Autotask.Navigation.PageLoadingEventArgs=function(t){this._isLoadingIndicatorEnabled=t},window.Autotask.Navigation.PageLoadingEventArgs.prototype={_isLoadingIndicatorEnabled:null,get_isLoadingIndicatorEnabled:function(){return this._isLoadingIndicatorEnabled},set_isLoadingIndicatorEnabled:function(t){this._isLoadingIndicatorEnabled=t}}}(),window.Autotask.Navigation.WorkList=function(){"use strict";function t(t,e,o,i,s,n,r,a,_,l,u,c,p){autotask.instanceManagement.__addRegistrationKey(this,t),this._workListElement=document.getElementById(t),this._workListResetAllLinkElement=this._workListElement.querySelector("#"+u),this._workListRemoveAllLinkElement=this._workListElement.querySelector("#"+l),this._workListNewWindowLinkElement=this._workListElement.querySelector("#"+a),this._workListSettingsLinkElement=this._workListElement.querySelector("#"+c),this._workListRefreshLinkElement=this._workListElement.querySelector("#"+_),this._workListItemContainerElement=this._workListElement.querySelector(".WorkListItems"),this._dialogUrl=i,this._removeAllWorkListItemsUrl=s,this._resetAllStopwatchesUrl=n,this._moveWorkListItemUrl=r,this._popupPage=e,this._removeAllItemsConfirmationMessage=o,this._isPopup=p,null!==this._workListItemContainerElement&&(this._workListItemContainerElement.scrollTop=autotask.workspaceLocator.__get_navigationWindow().autotask.findPage().slideOut.get_workListItemsScrollPosition()),this._isScrollingTheList=!1,this._dockingHandlers=[],this._removeAllDialogOpenedHandlers=[],this._settingsDialogOpenedHandlers=[]}return t.prototype._workListElement=null,t.prototype._workListItemContainerElement=null,t.prototype._workListNewWindowLinkElement=null,t.prototype._workListRefreshLinkElement=null,t.prototype._workListRemoveAllLinkElement=null,t.prototype._workListResetAllLinkElement=null,t.prototype._workListSettingsLinkElement=null,t.prototype._dialogUrl=null,t.prototype._dockingHandlers=null,t.prototype._dragAndDrop=null,t.prototype._isPopup=null,t.prototype._isScrollingTheList=null,t.prototype._moveWorkListItemUrl=null,t.prototype._popupPage=null,t.prototype._removeAllDialogOpenedHandlers=null,t.prototype._removeAllItemsConfirmationMessage=null,t.prototype._removeAllWorkListItemsUrl=null,t.prototype._resetAllStopwatchesUrl=null,t.prototype._settingsDialogOpenedHandlers=null,t.prototype.get_removeAllItemsConfirmationMessage=function(){return this._removeAllItemsConfirmationMessage},t.prototype.__get_isDragInProgress=function(){return this._dragAndDrop&&this._dragAndDrop.__get_isDragInProgress()},t.prototype.__get_isDragItemBeingHeld=function(){return this._dragAndDrop&&this._dragAndDrop.__get_isItemBeingHeld()},t.prototype.__get__isScrollingTheList=function(){return this._isScrollingTheList},t.prototype.__moveWorkListItem=function(t,e){var o=new Autotask.RestrictedJsonPostRoute(this._moveWorkListItemUrl),i=new AutotaskRequestDataSystem.RequestData;i.addString("itemMovedId",t),i.addString("itemDropAfterId",e),o.__makeRequest(i,autotask.proxy(this._moveWorkListItemSuccess,this),!0)},t.prototype._onNewWindowClick=function(t){if(t.preventDefault(),this.__get_isDragInProgress())return!1;if(this._isPopup)for(var e=0;e<this._dockingHandlers.length;e++)this._dockingHandlers[e]();else{var o=this._popupPage.__open(null);o&&(autotask.findPage().slideOut.set_popupWindow(o),autotask.findPage().slideOut.set_slideOutStateDisabled(!0))}return!0},t.prototype._onRefreshClick=function(t){t.preventDefault(),this._showLoadingIndicator(),autotask.workspaceLocator.__get_navigationWindow().autotask.findPage().slideOut.set_workListItemsScrollPosition(0),autotask.siteNavigation.refreshWorkList()},t.prototype._onRemoveAllTicketsClick=function(t){if(t.preventDefault(),this.__get_isDragInProgress())return!1;var e=new Autotask.ConfirmationDialogOptions;e.set_description(this.get_removeAllItemsConfirmationMessage()),e.set_confirmPointer(autotask.proxy(this._onRemoveAllTicketsCallback,this)),e.set_denyPointer((function(){autotask.siteNavigation.refreshWorkList()})),autotask.confirmationDialog.show(e);for(var o=0;o<this._removeAllDialogOpenedHandlers.length;o++)this._removeAllDialogOpenedHandlers[o]();return!0},t.prototype._onRemoveAllTicketsCallback=function(){this._showLoadingIndicator();new Autotask.RestrictedJsonPostRoute(this._removeAllWorkListItemsUrl).__makeRequest(null,(function(){autotask.siteNavigation.refreshWorkList()}),!0)},t.prototype._onResetAllStopwatchesClick=function(t){if(t.preventDefault(),this.__get_isDragInProgress())return!1;this._showLoadingIndicator();for(var e=this._workListElement.querySelectorAll("[data-work-list-item-id]"),o=autotask.notificationEventManagement.get_notificationTypes().StopwatchNotification,i=0;i<e.length;i++){var s=new Autotask.StopwatchNotification(e[i].getAttribute("data-work-list-item-id"),null,"Stopped",0,0,0,null,null,0,0);autotask.notificationEventManagement.__notify(o,s,null)}return new Autotask.RestrictedJsonPostRoute(this._resetAllStopwatchesUrl).__makeRequest(null,(function(){autotask.siteNavigation.refreshWorkList()}),!0),!0},t.prototype._onScroll=function(){null!==this._workListItemContainerElement?autotask.workspaceLocator.__get_navigationWindow().autotask.findPage().slideOut.set_workListItemsScrollPosition(this._workListItemContainerElement.scrollTop):autotask.workspaceLocator.__get_navigationWindow().autotask.findPage().slideOut.set_workListItemsScrollPosition(0)},t.prototype._onSettingsClick=function(t){return t.preventDefault(),!this.__get_isDragInProgress()&&(autotask.ajax.postRequest(this._dialogUrl,null,autotask.proxy(this._settingsDialogSuccessHandler,this)).dialog(),!0)},t.prototype._onTouchEnd=function(t){return!this._isScrollingTheList||(t.preventDefault(),this._isScrollingTheList=!1,!1)},t.prototype._onTouchScroll=function(t){if(t.touches){if(this.__get_isDragItemBeingHeld()||this.__get_isDragInProgress())return;t.preventDefault(),this._isScrollingTheList=!0}},t.prototype._settingsDialogSuccessHandler=function(){for(var t=0;t<this._settingsDialogOpenedHandlers.length;t++)this._settingsDialogOpenedHandlers[t]()},t.prototype.addDockingHandler=function(t){this._dockingHandlers.push(t)},t.prototype.addRemoveAllDialogOpenedHandler=function(t){this._removeAllDialogOpenedHandlers.push(t)},t.prototype.addSettingsDialogOpenedHandler=function(t){this._settingsDialogOpenedHandlers.push(t)},t.prototype.__initialize=function(){autotask.lifeCycleManagement.__addFinalInitializationDelegate(this._hideLoadingIndicator);var t=0,e=null!==this._workListItemContainerElement?this._workListItemContainerElement.querySelectorAll(".WorkListItem"):[];for(t=0;t<e.length;t++)autotask.find(e[t].id).__addWorkList(this);e.length>1&&(this._dragAndDrop=new window.Autotask.Navigation.WorkListEventManagement(this,this._workListItemContainerElement))},t.prototype.__registerHandlers=function(){null!==this._workListItemContainerElement&&(this._workListItemContainerElement.addEventListener("scroll",autotask.proxy(this._onScroll,this)),this._workListItemContainerElement.addEventListener("scroll",autotask.proxy(this._onTouchScroll,this)),this._workListItemContainerElement.addEventListener("touchend",autotask.proxy(this._onTouchEnd,this))),this._workListNewWindowLinkElement.addEventListener("click",autotask.proxy(this._onNewWindowClick,this)),this._workListRefreshLinkElement.addEventListener("click",autotask.proxy(this._onRefreshClick,this)),this._workListRemoveAllLinkElement.addEventListener("click",autotask.proxy(this._onRemoveAllTicketsClick,this)),this._workListResetAllLinkElement.addEventListener("click",autotask.proxy(this._onResetAllStopwatchesClick,this)),this._workListSettingsLinkElement.addEventListener("click",autotask.proxy(this._onSettingsClick,this))},t.prototype.__resumeRefreshActivity=function(){autotask.siteNavigation.resumeRefreshWorkListActivity()},t.prototype.__suspendRefreshActivity=function(){autotask.siteNavigation.suspendRefreshWorkListActivity()},t.prototype._moveWorkListItemSuccess=function(){},t.prototype._showLoadingIndicator=function(){document.body.querySelector(".WorkListLoadingIndicator").classList.add("Active")},t.prototype._hideLoadingIndicator=function(){document.body.querySelector(".WorkListLoadingIndicator").classList.remove("Active")},t}(),Autotask.Navigation.WorkListDragAndDrop=function(){"use strict";function t(t,e,o,i,s){this._draggingCssClass="Dragging",this._mouseMovementDelta=15,this._workListItemDragging=t,this._workListItems=e,this._startPageY=o,this._bottomPositionOfContainer=i,this._containerTopPostion=s,this._offsetBeyondContainer=10,this._initialize()}return t.prototype._lastItem=null,t.prototype._workListItemAfterDrop=null,t.prototype._workListItemDragging=null,t.prototype._workListItems=null,t.prototype._bottomPositionOfContainer=null,t.prototype._containerTopPostion=null,t.prototype._draggingCssClass=null,t.prototype._lastPageY=null,t.prototype._mouseMovementDelta=null,t.prototype._offsetBeyondContainer=null,t.prototype._originalItemAfterDragId=null,t.prototype._startPageY=null,t.prototype._wasMovingToTheBottom=null,t.prototype._workListItemDropIndicator=null,t.prototype._workListItemDraggingOuterHeight=null,t.prototype.__dispose=function(){this._workListItemDragging.classList.remove(this._draggingCssClass),this._workListItemDragging.style.top="",this._workListItemDropIndicator.__dispose(),this._workListItemDropIndicator=null},t.prototype.__getItemAfterDropId=function(){return this._getWorkListItemId(this._workListItemAfterDrop)},t.prototype.__getItemDraggingId=function(){return this._getWorkListItemId(this._workListItemDragging)},t.prototype.__hasItemMoved=function(){return this._originalItemAfterDragId!=this.__getItemAfterDropId()},t.prototype.__move=function(t){var e=this._startPositionTop+(t-this._startPageY);e<this._containerTopPostion-this._offsetBeyondContainer?e=this._containerTopPostion-this._offsetBeyondContainer:e+this._workListItemDraggingOuterHeight>this._bottomPositionOfContainer+this._containerTopPostion+this._offsetBeyondContainer&&(e=this._bottomPositionOfContainer+this._containerTopPostion+this._offsetBeyondContainer-this._workListItemDraggingOuterHeight),this._workListItemDragging.style.top=e.toString()+"px",this._calculateWorkListItemAfterDrop(t)},t.prototype.__scrolledToBottom=function(){this._workListItemAfterDrop=null,this._workListItemDropIndicator.__putAfter(this._lastItem)},t.prototype.__scrolledToTop=function(){this._workListItemAfterDrop=this._workListItems[0],this._workListItemDropIndicator.__putBefore(this._workListItemAfterDrop)},t.prototype._calculateWorkListItemAfterDrop=function(t){var e=t-this._lastPageY>0,o=this._wasMovingToTheBottom!==e;if(this._wasMovingToTheBottom=e,o||!(Math.abs(t-this._lastPageY)<this._mouseMovementDelta)){this._lastPageY=t;for(var i=AutotaskDomSystem.Other.positionOffset(this._workListItemDragging).top,s=e?i+this._workListItemDraggingOuterHeight:i,n=0;n<this._workListItems.length;n++){var r=this._workListItems[n],a=r.offsetHeight,_=AutotaskDomSystem.Other.positionOffset(r).top;if(_<=s&&s<=_+a)return void this._swapItemWithIndicator(r,e)}if(this._workListItemDropIndicator.__isMouseOver(null,s)){var l=this._workListItemDropIndicator.__getNext();null===l||l.classList.contains(this._draggingCssClass)?(this._workListItemAfterDrop=null,this._workListItemDropIndicator.__putAfter(this._lastItem)):this._workListItemAfterDrop=l}}},t.prototype._getWorkListItemId=function(t){return null===t?null:t.getAttribute("data-work-list-item-id")},t.prototype._initialize=function(){var t=this._workListItems.indexOf(this._workListItemDragging);this._workListItems.splice(t,1),this._lastPageY=this._startPageY,this._lastItem=this._workListItems[this._workListItems.length-1],this._workListItemDraggingOuterHeight=this._workListItemDragging.offsetHeight,this._startPositionTop=this._workListItemDragging.offsetTop-this._workListItemDragging.parentElement.scrollTop;var e=this._workListItemDragging.nextElementSibling;null!==e&&(this._originalItemAfterDragId=this._getWorkListItemId(e)),this._workListItemDropIndicator=new Autotask.DropIndicator("WorkListDropIndicator",this._workListItemDragging),this._workListItemDropIndicator.__height(this._workListItemDragging.offsetHeight),this._lastItem.after(this._workListItemDragging),this._workListItemDragging.classList.add(this._draggingCssClass),this._workListItemDragging.style.top=this._startPositionTop.toString()+"px"},t.prototype._swapItemWithIndicator=function(t,e){if(e){this._workListItemDropIndicator.__putAfter(t);var o=this._workListItemDropIndicator.__getNext();this._workListItemAfterDrop=null===o||o.classList.contains(this._draggingCssClass)?null:o}else this._workListItemAfterDrop=t,this._workListItemDropIndicator.__putBefore(this._workListItemAfterDrop)},t}(),Autotask.Navigation.WorkListEventManagement=function(t){"use strict";function e(e,o){t.call(this,o),this._workListManager=e,this._dragInProgressCssClass="DragInProgress",this._isTouchingInsideContainer=!1,this._isPointerTouch=!1,this._offsetToStartScrolling=30,this._initialize()}return autotask.inherit(e,t),e.prototype._workListHeld=null,e.prototype._dragInProgressCssClass=null,e.prototype._isPointerTouch=null,e.prototype._isTouchingInsideContainer=null,e.prototype._offsetToStartScrolling=null,e.prototype._scroller=null,e.prototype._state=null,e.prototype._workListDragAndDrop=null,e.prototype._workListManager=null,e.prototype.__get_isDragInProgress=function(){return this._state.__get_isDragInProgress()},e.prototype.__get_isItemBeingHeld=function(){return this._state.__get_isStarting()},e.prototype.__onContainerMouseEnter=function(t){this.__get_isDragInProgress()&&this._scroller.stopVerticalScrolling()},e.prototype.__onContainerMouseLeave=function(t){if(this.__get_isDragInProgress()){var e=t.touches?t.touches[0].pageY:t.pageY;if(e<this._getWorkListContainerOffsetTop()+this._offsetToStartScrolling)this._scroller.scrollUp();else{var o=AutotaskDomSystem.Other.getComputedStyle(this.__get_container()).height-this._offsetToStartScrolling;e>=this._getWorkListContainerOffsetTop()+o&&this._scroller.scrollDown()}}},e.prototype.__onContainerTouchEnterLeave=function(t){if(this.__get_isDragInProgress()){var e=document.elementFromPoint(t.touches[0].clientX,t.touches[0].clientY);if(null!==e){var o=e.closest("#WorkList > .WorkListItems");if(null===o){if(this._isTouchingInsideContainer)return this._isTouchingInsideContainer=!1,this.__onContainerMouseLeave(t)}else if(o==this.__get_container()){if(this._isMovingCloseToContainerEdge(t.touches[0].pageY))return this._isTouchingInsideContainer=!1,this.__onContainerMouseLeave(t);if(!this._isTouchingInsideContainer)return this._isTouchingInsideContainer=!0,this.__onContainerMouseEnter(t)}}}},e.prototype.__onMouseMove=function(t){this.__get_isDragInProgress()&&(this._isMovingCloseToContainerEdge(t.pageY)?this.__onContainerMouseLeave(t):this.__onContainerMouseEnter(t),t.preventDefault()),this._move(t.clientY,t.pageY)},e.prototype._onPointerDown=function(t){void 0!==t.pointerType&&"touch"==t.pointerType&&(this._isPointerTouch=!0)},e.prototype.__onStartDragging=function(t){t.preventDefault(),this.___startDrag(t.currentTarget.closest(".WorkListItem"))},e.prototype.__onTouchMove=function(t){this.__get_isDragInProgress()&&t.preventDefault();var e=t.changedTouches[0];this._move(e.clientY,e.pageY)},e.prototype._getWorkListContainerOffsetTop=function(){return this._isPointerTouch?79:AutotaskDomSystem.Other.positionOffset(this.__get_container()).top},e.prototype._getWorkListItems=function(){return this.__get_container().querySelectorAll(".WorkListItem")},e.prototype._initialize=function(){this._state=new Autotask.DragState(null,5),this._scroller=new AutotaskScrollingSystem.AnimatedScroller(this.__get_container()),this._scroller.overrideIsScrolledToBottom(autotask.proxy(this._isScrolledToBottom,this)),this.__registerHandlers()},e.prototype._isMovingCloseToContainerEdge=function(t){var e=AutotaskDomSystem.Other.getComputedStyle(this.__get_container()).height-this._offsetToStartScrolling;return t<this._getWorkListContainerOffsetTop()+this._offsetToStartScrolling||t>=this._getWorkListContainerOffsetTop()+e},e.prototype._isScrolledToBottom=function(){var t=this.__get_container().scrollTop==this.__get_container().scrollHeight-this.__get_container().offsetHeight;return t&&this._workListDragAndDrop.__scrolledToBottom(),t},e.prototype._isScrolledToTop=function(){var t=0===this.__get_container().scrollTop;return t&&this._workListDragAndDrop.__scrolledToTop(),t},e.prototype._move=function(t,e){if(this._state.__adjustPositionY(t),this._state.__get_isTornOff())if(null===this._workListDragAndDrop){this._workListHeld.classList.remove(this._dragInProgressCssClass);var o=AutotaskDomSystem.Other.getComputedStyle(this.__get_container()).width,i=o>AutotaskDomSystem.Other.getComputedStyle(this._workListHeld).width?autotask.scrolling.__get_scrollBarWidth():0;this._workListHeld.style.width=(o-i).toString()+"px",this._workListDragAndDrop=new Autotask.Navigation.WorkListDragAndDrop(this._workListHeld,Array.from(this._getWorkListItems()),e,this.__get_container().offsetHeight,this.__get_container().offsetTop-this.__get_container().parentElement.scrollTop)}else this._workListDragAndDrop.__move(e)},e.prototype.__registerHandlers=function(){if(t.prototype.__registerHandlers.call(this,".WorkListItem .Grip",this.__get_container(),document.getElementById("WorkList"),!1),autotask.browserDetection.isInternetExplorer())for(var e=this.__get_container().querySelectorAll(".WorkListItem .Grip"),o=0;o<e.length;o++)e[o].addEventListener("pointerdown",autotask.proxy(this._onPointerDown,this))},e.prototype.__reset=function(){this._workListDragAndDrop&&(this._workListDragAndDrop.__dispose(),this._workListDragAndDrop=null),this._state.__reset(),this._workListHeld&&(this._workListHeld.style.width="",this._workListHeld.classList.remove(this._dragInProgressCssClass),this._workListHeld=null),this.__get_container().classList.remove(this._dragInProgressCssClass),this._scroller.stopVerticalScrolling(),this._workListManager.__resumeRefreshActivity()},e.prototype.___startDrag=function(e){t.prototype.___startDrag.call(this,null!==this._workListHeld),this._workListManager.__suspendRefreshActivity(),this.__get_container().classList.add(this._dragInProgressCssClass),this._workListHeld=e,this._workListHeld.classList.add(this._dragInProgressCssClass),this._state.__start()},e.prototype.___stopDrag=function(){this._workListDragAndDrop&&this._workListDragAndDrop.__hasItemMoved()&&this._workListManager.__moveWorkListItem(this._workListDragAndDrop.__getItemDraggingId(),this._workListDragAndDrop.__getItemAfterDropId()),t.prototype.___stopDrag.call(this)},e}(Autotask.DragEventsManagement),window.Autotask.Navigation.WorkListItem=function(){"use strict";function t(t,e,o,i){autotask.instanceManagement.__addRegistrationKey(this,t),this._workListItemElement=document.getElementById(t),this._worklistItemButtonsElement=this._workListItemElement.querySelector(".WorkListItemButtons"),this._workListItemRemoveElement=this._worklistItemButtonsElement.querySelector(".WorkListRemove"),this._workListItemPopupElement=this._worklistItemButtonsElement.querySelector(".WorkListPopOut"),this._workListItemStopwatchContainerElement=this._workListItemElement.querySelector(".StopwatchContainer"),this._workListItemGripElement=this._workListItemElement.querySelector(".Grip"),this._workspacePage=e,this._defaultPage=o,this._removeItemUrl=i,this._gripImageHeight=7}return t.prototype._worklistItemButtonsElement=null,t.prototype._workListItemElement=null,t.prototype._workListItemGripElement=null,t.prototype._workListItemRemoveElement=null,t.prototype._workListItemPopupElement=null,t.prototype._workListItemStopwatchContainerElement=null,t.prototype._defaultPage=null,t.prototype._workList=null,t.prototype._gripImageHeight=null,t.prototype._removeItemUrl=null,t.prototype._workspacePage=null,t.prototype.get_Id=function(){return this._workListItemElement.getAttribute("data-work-list-item-id")},t.prototype._get_isClickSuspended=function(){return null!==this._workList&&(this._workList.__get_isDragInProgress()||this._workList.__get__isScrollingTheList())},t.prototype._get_isDragItemBeingHeld=function(){return null!==this._workList&&this._workList.__get_isDragItemBeingHeld()},t.prototype._onClick=function(t){return!(!this._isEventTouch(t)||!this._get_isClickSuspended())||(t.preventDefault(),!this._get_isDragItemBeingHeld()&&(this._workspacePage.__open(null),!0))},t.prototype._onGripClick=function(t){return t.stopPropagation(),!1},t.prototype._onPopupClick=function(t){return this._isEventTouch(t)&&this._get_isClickSuspended()||(t.stopPropagation(),this._defaultPage.__open(null)),!0},t.prototype._onRemoveClick=function(t){if(this._isEventTouch(t)&&this._get_isClickSuspended())return!0;t.stopPropagation(),this._showLoadingIndicator(),this._workListItemElement.classList.add("Fade");var e=new Autotask.RestrictedJsonPostRoute(this._removeItemUrl),o=new AutotaskRequestDataSystem.RequestData;return o.addString("workListItemId",this.get_Id()),e.__makeRequest(o,autotask.proxy(this._refreshWorkList,this),!0),!0},t.prototype._onStopwatchContainerClick=function(t){t.stopPropagation()},t.prototype._onTransitionEnd=function(){this._workListItemElement.classList.add("Hidden")},t.prototype.__addWorkList=function(t){this._workList=t},t.prototype.__initialize=function(){this._resizeGrip()},t.prototype.__registerHandlers=function(){this._workListItemElement.addEventListener("click",autotask.proxy(this._onClick,this)),this._workListItemElement.addEventListener("transitionend",autotask.proxy(this._onTransitionEnd,this)),null!==this._workListItemStopwatchContainerElement&&this._workListItemStopwatchContainerElement.addEventListener("click",autotask.proxy(this._onStopwatchContainerClick,this)),this._workListItemRemoveElement.addEventListener("click",autotask.proxy(this._onRemoveClick,this)),this._workListItemPopupElement.addEventListener("click",autotask.proxy(this._onPopupClick,this)),this._workListItemGripElement.addEventListener("click",autotask.proxy(this._onGripClick,this)),this._workListItemElement.addEventListener("contextmenu",(function(t){return!1}))},t.prototype._isEventTouch=function(t){return t.touches},t.prototype._resizeGrip=function(){var t=AutotaskDomSystem.Other.getComputedStyle(this._workListItemElement).height-this._worklistItemButtonsElement.offsetHeight;t=Math.floor(t/this._gripImageHeight)*this._gripImageHeight-this._gripImageHeight,this._workListItemGripElement.style.height=t.toString()+"px"},t.prototype._showLoadingIndicator=function(){document.body.querySelector(".WorkListLoadingIndicator").classList.add("Active")},t.prototype._hideLoadingIndicator=function(){document.body.querySelector(".WorkListLoadingIndicator").classList.remove("Active")},t.prototype._refreshWorkList=function(){autotask.siteNavigation.refreshWorkList()},t}(),window.Autotask.Navigation.WorkListLineItemDetailLink=function(){"use strict";function t(t,e){autotask.instanceManagement.__addRegistrationKey(this,t),this._workListLineItemDetailLinkElement=document.getElementById(t),this._page=e}return t.prototype._workListLineItemDetailLinkElement=null,t.prototype._page=null,t.prototype._onClick=function(t){t.stopPropagation(),this._page.__open(null)},t.prototype.__registerHandlers=function(){this._workListLineItemDetailLinkElement.addEventListener("click",autotask.proxy(this._onClick,this))},t}();
if(document.readyState === "interactive" || document.readyState === "complete"){autotask.lifeCycleManagement.__executeLifeCycle(false, null);}else{document.addEventListener("DOMContentLoaded", function(){autotask.lifeCycleManagement.__executeLifeCycle(false, null);})}
autotask.bookmarkManagement.__set_addBookmarkUrl('/Mvc/Navigation/Bookmark.mvc/AddBookmark');autotask.bookmarkManagement.__set_removeBookmarkUrl('/Mvc/Navigation/Bookmark.mvc/RemoveBookmark');
autotask.exceptionManagement.__set_errorUrl('/Mvc/Framework/Error.mvc');autotask.exceptionManagement.__set_errorWithRedirectButtonUrl('/Mvc/Framework/Error.mvc?isRedirectButtonVisibilityOverridden=True');autotask.exceptionManagement.__set_exceptionUrl('/Mvc/Maintenance/ClientException.mvc');
autotask.performanceInstrumentationManagement.__set_saveUrl('/Mvc/Framework/PerformanceInstrumentation.mvc/Save');
autotask.securityManagement.__set_authorizationFailureUrl('/Mvc/Security/Authorization.mvc/Failure');autotask.securityManagement.__set_logOnUrl('/Mvc/Framework/Authentication.mvc/Authenticate');
autotask.sessionExpirationNavigation.__set_expireSessionRestorePage(new Autotask.CurrentWindowPage('expiresessionrestore','/Mvc/Framework/sessionexpiration.mvc/expiresession',false,'restoreUrl',null,true));autotask.sessionExpirationNavigation.__set_expireSessionClosePage(new Autotask.CurrentWindowPage('expiresessionclose','/Mvc/Framework/sessionexpiration.mvc/expiresessionclose',false,null,null,true));autotask.sessionExpirationNavigation.__set_sessionExpiredByInactivityPage(new Autotask.CurrentWindowPage('sessionexpiredbyinactivity','/Mvc/Framework/sessionexpiration.mvc/sessionexpiredbyinactivity',false,'restoreUrl',null,true));autotask.sessionExpirationNavigation.__set_sessionExpiredByLogoutPage(new Autotask.CurrentWindowPage('sessionexpiredbylogout','/Mvc/Framework/sessionexpiration.mvc/sessionexpiredbylogout',false,'restoreUrl',null,true));autotask.sessionExpirationNavigation.__set_keepAliveUrl('/Mvc/Framework/sessionexpiration.mvc/keepalive');
autotask.localizedText.gridDeleteConfirmationDescription = 'Deletion cannot be undone.  Do you want to continue?';autotask.localizedText.gridDeleteConfirmationHeading = 'Are you sure you want to delete this item?';autotask.localizedText.confirmButtonText = 'Yes';autotask.localizedText.denyButtonText = 'No';autotask.localizedText.alertDialogDefaultTitle = 'Message';autotask.localizedText.alertDialogInformationTitle = 'Information';autotask.localizedText.alertDialogSuccessTitle = 'Success';autotask.localizedText.confirmationDialogDefaultTitle = 'Message';autotask.localizedText.confirmationDialogConfirmationTitle = 'Confirmation';autotask.localizedText.confirmationDialogWarningTitle = 'Warning';autotask.localizedText.okayButtonText = 'OK';autotask.localizedText.addBookmarkTitle = 'Bookmark this page';autotask.localizedText.removeBookmarkTitle = 'Remove bookmark';autotask.localizedText.elegantErrorText = 'Sorry, an error has occurred.';
autotask.debugManagement.__set_isDebugBuild(false);
